How to find the 'delta' between two equations?

Hi,
I have simple question. I have two equations like so:
z = x + 2y and z = x + 3y
How can I find the difference between them?
Essentially, what I am trying to do is find a list of 'values' which are unique to each equation.
So for example; if z1 = y, and z2 = 2y; then both equations will have some common values. However, I am trying to find values that are unique to equation z1 = y and values unique to z2 = 2y.
Does this make sense?
Thanks

2 Comments

  • is 3y short for 3*y ?
  • is y3 a name of a variable?
Yes to both.

Sign in to comment.

Answers (1)

If I understand correctly your are looking for values of x and y that result in different z values for the two equations. Since the two equations are both linear the best approach is to find (x,y) pairs for which the two equations "are equal" (intersection points of the two planes). So
z1 = x + 2*y == z2 = x + 3*y
or
x + 2*y = x + 3*y -> 2*y = 3*y -> y = 0
In other words, whenever y = 0, z1 = z2. And therefore, whenever y is not equal to zero you get different values for your two equations.

6 Comments

Thank you for your response.
Actually, what I am trying to do is the exact opposite. I am trying to use MatLab to figure out values of x and y where the two equations DO NOT equal each other.
I am trying to find each equation's "unique set of values".
I think we are talking about the same thing.
Whenever, y is not equal to zero, the two equations are different. That is, for your two equations you can pick any values for x and y, the only restriction is that y is not zero.
But would this work for just any formula? or only the ones I posted?
Thank you
Also, to rephrase what you said. I am trying to find different values Of x and y for the same z.
If z = x + 2*y then y = (z - x)/2 for all arbitrary x. There is no challenge involved unless you restrict to integers .
If you have one linear equation in two unknowns, then the solutions define a plane.
If you have two simultaneous equations in three unknowns, then the solutions define a line at the intersection of the two planes.
If you have three simultaneous equations in three unknowns, then the solution defines a point at the mutual intersection of all three planes.
If you have two simultaneous linear equations in three unknowns and you want to find the points that are unique to each of the two equations, then for each equation take the plane defined by each equation, and remove from that plane the line that is the intersection of the two planes. There is no simple formula that will give you exactly that space: it is like saying you want a formula that gives you all of the real numbers except for "7".
Thank you for this answer. It does make sense. Sounds like it may be a manual job.
I'd like to ask just two more follow-up questions. Is it possible to do this with non-linear (i.e., surfaces) and with 2 or more of them?
Thank you

Sign in to comment.

Tags

Asked:

A
A
on 8 Mar 2014

Commented:

A
A
on 9 Mar 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!