How to find the 'delta' between two equations?
Show older comments
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
per isakson
on 8 Mar 2014
- is 3y short for 3*y ?
- is y3 a name of a variable?
A
on 8 Mar 2014
Answers (1)
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
A
on 8 Mar 2014
Mischa Kim
on 8 Mar 2014
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.
A
on 8 Mar 2014
A
on 8 Mar 2014
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
on 9 Mar 2014
Categories
Find more on Structural Mechanics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!