How to find the 'delta' between two equations?

2 views (last 30 days)
A
A on 8 Mar 2014
Commented: A on 9 Mar 2014
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

Answers (1)

Mischa Kim
Mischa Kim on 8 Mar 2014
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
Walter Roberson
Walter Roberson on 8 Mar 2014
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".
A
A on 9 Mar 2014
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.

Categories

Find more on Functions in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!