Solve three simultaneous polynomial equations in three variables....

My apologies, I made a mistake in my working. The correct equations should be as follows:$$x^3 - y^3 = 3(x-y)\\y^3 - z^3 = (y-z)\\z^3 - x^3 = 4(z-x)$$Hence,$$x^3 = x(3-y) + y^3$$Sub into third equation:$$z^3 - y^3 -3(x-y) = 4(z-x)$$Since $$z^3 - y^3 = -(y-z)$$,$$-(y-z) -3(x-y) = 4
  • #1
chwala
Gold Member
2,746
387

Homework Statement


## x^2 +xy + y^2 = 3##
## y^2+yz+z^2=1##
##z^2+zx+x^2=4##

Homework Equations

The Attempt at a Solution


##yz^2-xz^2+yx^2-xy^2=4y-x##
##z^2(y-x)-xy(y-x)=4(y-x)## thus
##z^2-xy=4##
or
##z^2=4+xy##
......on working out i end up with
## z^4-8z+16+(z^2-4)y^2+y^4= 3y^2## and
## z^4-8z^2+16+(z^2-4)xz+x^2z^2= x^2##
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
I tried solving this by hand, and I think I got somewhere. What I am about to tell you still requires a graphing calculator or some sort of system that solves linear simultaneous equations (the GC I use can't solve exponents).

What I tried was to use the identity of cubic equations, and then subbing into other equations to obtain simultaneous linear equations in terms of x, y, and z.

http://www.ask-math.com/factorization-of-cubic-polynomial.html

Refer to equations 1 and 2 in the link. I used equation for difference of cubes exclusively.

Hope this helps.
 
  • Like
Likes ehild
  • #3
chwala said:

Homework Statement


## x^2 +xy + y^2 = 3##
## y^2+yz+z^2=1##
##z^2+zx+x^2=4##

Homework Equations

The Attempt at a Solution


##yz^2-xz^2+yx^2-xy^2=4y-x##
##z^2(y-x)-xy(y-x)=4(y-x)## thus
##z^2-xy=4##
or
##z^2=4+xy##
......on working out i end up with
## z^4-8z+16+(z^2-4)y^2+y^4= 3y^2## and
## z^4-8z^2+16+(z^2-4)xz+x^2z^2= x^2##
Each of the equations at the top represents a rotated ellipse, one that is rotated by an angle of 45°. The easiest way to solve this system is to use a new coordinate axis system that is revolved by this amount, and write the three equations in terms of the new coordinate system. Doing this will eliminate the mixed term (xy, yz, or xz) in each equation.

See https://en.wikibooks.org/wiki/Conic_Sections/Rotation_of_Axes.
 
  • #4
Alloymouse said:
I tried solving this by hand, and I think I got somewhere. What I am about to tell you still requires a graphing calculator or some sort of system that solves linear simultaneous equations (the GC I use can't solve exponents).

What I tried was to use the identity of cubic equations, and then subbing into other equations to obtain simultaneous linear equations in terms of x, y, and z.

http://www.ask-math.com/factorization-of-cubic-polynomial.html

Refer to equations 1 and 2 in the link. I used equation for difference of cubes exclusively.

Hope this helps.
still can't see how you did that
 
  • #5
Mark44 said:
Each of the equations at the top represents a rotated ellipse, one that is rotated by an angle of 45°. The easiest way to solve this system is to use a new coordinate axis system that is revolved by this amount, and write the three equations in terms of the new coordinate system. Doing this will eliminate the mixed term (xy, yz, or xz) in each equation.

See https://en.wikibooks.org/wiki/Conic_Sections/Rotation_of_Axes.
what next after transforming to polar form of equation Mark.
 
  • #6
chwala said:
what next after transforming to polar form of equation Mark.
This isn't polar form -- it is just transforming the coordinate system by rotation so as to eliminate the xy, yz, and xz terms. The equations are still in rectangular (or Cartesian) form, but are in terms of coordinates in a rotated axis system.

For example, your first equation was ##x^2 + xy + y^2 = 3##. In the new coordinates the equation becomes ##\frac 3 2 X^2 + \frac 1 2 Y^2 = 3##. The other two equations are transformed similarly, which would make solving the system of three equations much simpler.

All the information is in the link in my previous post.
 
  • Like
Likes chwala
  • #7
chwala said:
still can't see how you did that

For instance, multiply your first equation on both sides by (x-y)

Rearrange for X^3 and sub that into second equation multiplied on both sides by (y-z)

You should be able to get a linear equation.

Rinse and repeat for other pairings to get 3 linear equations.

Unfortunately I am at work with no camera access, so do tell me if you need an image of my rough working for the steps listed above
$$x^3 - y^3 = 3(x-y)\\
y^3 - z^3 = (y-z)\\
z^3 - x^3 = 4(z-x)$$

Hence,
$$x^3 = x(3-y) + y^3$$

Sub into third equation:
$$z^3 - y^3 -3(x-y) = 4(z-x)$$
Since $$z^3 - y^3 = -(y-z)$$,
$$-(y-z) -3(x-y) = 4(z-x)$$

Simplifying we get:
$$5z - 4y = x$$

Repeat for other equations.
Indeed this is not as efficient, but I think this is a simple enough algebraic method.
 
Last edited by a moderator:
  • Like
Likes tnich
  • #8
Mark44 said:
This isn't polar form -- it is just transforming the coordinate system by rotation so as to eliminate the xy, yz, and xz terms. The equations are still in rectangular (or Cartesian) form, but are in terms of coordinates in a rotated axis system.

For example, your first equation was ##x^2 + xy + y^2 = 3##. In the new coordinates the equation becomes ##\frac 3 2 X^2 + \frac 1 2 Y^2 = 3##. The other two equations are transformed similarly, which would make solving the system of three equations much simpler.

All the information is in the link in my previous post.

still not getting it properly,
## AX^2+ Bxy+ Cy^2=0##
##(xcos θ -y sin θ)^2##+ ##(xcos θ -ysin θ)(xsin θ+ycosθ)##... is this what you did?
 
Last edited by a moderator:
  • #9
Alloymouse said:
For instance, multiply your first equation on both sides by (x-y)

Rearrange for X^3 and sub that into second equation multiplied on both sides by (y-z)

You should be able to get a linear equation.

Rinse and repeat for other pairings to get 3 linear equations.

Unfortunately I am at work with no camera access, so do tell me if you need an image of my rough working for the steps listed above

$$x^3 - y^3 = 3(x-y)$$

$$y^3 - z^3 = (y-z)$$

$$z^3 - x^3 = 4(z-x)$$

Hence,
$$x^3 = x(3-y) + y^3$$

Sub into third equation:

$$z^3 - y^3 -3(x-y) = 4(z-x)$$

Since $$z^3 - y^3 = -(y-z)$$,

$$-(y-z) -3(x-y) = 4(z-x)$$

Simplifying we get:

$$5z - 4y = x$$

Repeat for other equations.

Indeed this is not as efficient, but I think this is a simple enough algebraic method.
your equations seem to be wrong
## z^3-y^3=4z-x-3y## and ##z^3-y^3=z-y##
therefore
##4z-x-3y = z-y##
to give,
##3z-2y=x## and not ##5z-4y=x##
 
  • #10
chwala said:
your equations seem to be wrong
## z^3-y^3=4z-x-3y## and ##z^3-y^3=z-y##
therefore
##4z-x-3y = z-y##
to give,
##3z-2y=x## and not ##5z-4y=x##
@chwala oops yep just a sign change error

But do you see any pitfalls of the methodology?
 
  • #11
chwala said:

Homework Statement


## x^2 +xy + y^2 = 3##
## y^2+yz+z^2=1##
##z^2+zx+x^2=4##

Homework Equations

The Attempt at a Solution


##yz^2-xz^2+yx^2-xy^2=4y-x##
##z^2(y-x)-xy(y-x)=4(y-x)## thus
##z^2-xy=4##
or
##z^2=4+xy##
......on working out i end up with
## z^4-8z+16+(z^2-4)y^2+y^4= 3y^2## and
## z^4-8z^2+16+(z^2-4)xz+x^2z^2= x^2##

You made an error in your second line: you went from ##4y-x## on the right of line 1 (which is correct) to ##4(y-x)## on the right of line 2 (which is incorrect). Also, even if you had a factor ##y-x## on both sides, you cannot automatically cancel; if you have ##(y-x)A = (y-x)B## then either ##A = B## or ##y-x = 0##.
 
  • Like
Likes chwala
  • #12
chwala said:

Homework Statement


## x^2 +xy + y^2 = 3##
## y^2+yz+z^2=1##
##z^2+zx+x^2=4##

Homework Equations

The Attempt at a Solution


##yz^2-xz^2+yx^2-xy^2=4y-x##
##z^2(y-x)-xy(y-x)=4(y-x)## thus
##z^2-xy=4##
or
##z^2=4+xy##
......on working out i end up with
## z^4-8z+16+(z^2-4)y^2+y^4= 3y^2## and
## z^4-8z^2+16+(z^2-4)xz+x^2z^2= x^2##

If you have access to a Groebner Basis package on a computer algebra system, then solving the equations becomes much easier. For example, using Maple I get
> f1:=x^2+x*y+y^2-3:
> f2:=y^2+y*z+z^2-1:
> f3:=z^2+z*x+x^2-4:
> with(Groebner);
> sys:=[f1,f2,f3];
sys := [x^2 + x y + y^2 - 3, y^2 + y z + z^2 - 1, x^2 + x z + z^2 - 4]
> B:=Basis(sys,tdeg(x,y,z));
B := [x + 2 y - 3 z, 2 y z - z^2 , 2 y^2 + 3 z^2 - 2, 7 z^3 - 4 z]

This means that setting f1,f2,f3 to zero is equivalent to setting the elements of B to zero, so
$$\begin{array}{l}
x+2y-3z=0\\
2yz - z^2 = 0\\
2y^2+3z^2-2=0\\
7z^3-4z=0
\end{array}
$$

In principle, you ought to be able to find a Groebner basis by hand (using published algorithms), but in practice you almost always require a computer to do it.
 
  • #13
chwala said:
still not getting it properly,
## AX^2+ Bxy+ Cy^2=0##
##(xcos θ -y sin θ)^2##+ ##(xcos θ -ysin θ)(xsin θ+ycosθ)##... is this what you did?
No, not quite. You have to figure out what ##\theta## is from the formula ##\tan(2\theta) = \frac B {A - C}##.

Your first equation was ##x^2 + xy + y^2 = 3##, so A = 1, B = 1, and C = 1. Since ##\frac B {A - C} = \frac 1 {1 - 1} = \frac 1 0##, I interpreted this to mean that ##2\theta = \frac \pi 2## so ##\theta = \frac \pi 4##. If you convert x and y in the first equation to X and Y in the rotated coordinate system, the xy term drops out.
 
  • #14
Alloymouse said:
For instance, multiply your first equation on both sides by (x-y)

Rearrange for X^3 and sub that into second equation multiplied on both sides by (y-z)

You should be able to get a linear equation.

Rinse and repeat for other pairings to get 3 linear equations.

Unfortunately I am at work with no camera access, so do tell me if you need an image of my rough working for the steps listed above

$$x^3 - y^3 = 3(x-y)$$

$$y^3 - z^3 = (y-z)$$

$$z^3 - x^3 = 4(z-x)$$

Hence,
$$x^3 = x(3-y) + y^3$$

Sub into third equation:

$$z^3 - y^3 -3(x-y) = 4(z-x)$$

Since $$z^3 - y^3 = -(y-z)$$,

$$-(y-z) -3(x-y) = 4(z-x)$$

Simplifying we get:

$$5z - 4y = x$$

Repeat for other equations.

Indeed this is not as efficient, but I think this is a simple enough algebraic method.
This is a brilliant first step. Chwala already pointed out that the result is x = 3z - 2y. From there, it is easy to substitute for x in the third equation and get an expression for y2 in terms of z and y. Substituting that for y2 in the second equation yields z in terms of y. Then you can keep substituting and get values for x, y and z.
 
  • Like
Likes chwala
  • #15
Mark44 said:
No, not quite. You have to figure out what ##\theta## is from the formula ##\tan(2\theta) = \frac B {A - C}##.

Your first equation was ##x^2 + xy + y^2 = 3##, so A = 1, B = 1, and C = 1. Since ##\frac B {A - C} = \frac 1 {1 - 1} = \frac 1 0##, I interpreted this to mean that ##2\theta = \frac \pi 2## so ##\theta = \frac \pi 4##. If you convert x and y in the first equation to X and Y in the rotated coordinate system, the xy term drops out.
I had seen this , but i thought 1/0 taking limits this is →∞, i may be wrong, sorry been held up a bit however i will work on the problem today.
 
  • #16
tnich said:
This is a brilliant first step. Chwala already pointed out that the result is x = 3z - 2y. From there, it is easy to substitute for x in the third equation and get an expression for y2 in terms of z and y. Substituting that for y2 in the second equation yields z in terms of y. Then you can keep substituting and get values for x, y and z.
i would be comfortable with this, algebraic approach to the problem, i am working on it and will post my findings.
 
  • Like
Likes Alloymouse
  • #17
Mark44 said:
No, not quite. You have to figure out what ##\theta## is from the formula ##\tan(2\theta) = \frac B {A - C}##.

Your first equation was ##x^2 + xy + y^2 = 3##, so A = 1, B = 1, and C = 1. Since ##\frac B {A - C} = \frac 1 {1 - 1} = \frac 1 0##, I interpreted this to mean that ##2\theta = \frac \pi 2## so ##\theta = \frac \pi 4##. If you convert x and y in the first equation to X and Y in the rotated coordinate system, the xy term drops out.
and i have a problem with a variable, just dropping out like that, unless the theorem specifies so.
 
  • #18
chwala said:
and i have a problem with a variable, just dropping out like that, unless the theorem specifies so.
Why? Any time you have a quadratic equation in two variables, and there is a mixed term (such as xy in your first equation), you can eliminate this mixed term by working with a new, rotated coordinate axis system. That's the whole purpose of this rotation business.

I did the calculation for ##\theta## for the 1st of your three equations, and got a new equation without the xy term. I've thrown out my scratch work, but it was something like ##\frac 3 2 X^2 + \frac 1 2 Y^2 = 3##, the equation of an unrotated ellipse in the new coordinate system. As I said before, everything I used was in the link I posted earlier.

If this is a problem from an old textbook, I'm almost certain that their intent was to transform the three equations to a new coordinate system. The old textbooks couldn't rely on graphing software or computer algebra systems. In all three equations the angle of rotation is the same -- ##\pi/4##.
 
  • Like
Likes chwala
  • #19
chwala said:
what next after transforming to polar form of equation Mark.
Mark44 said:
Each of the equations at the top represents a rotated ellipse, one that is rotated by an angle of 45°. The easiest way to solve this system is to use a new coordinate axis system that is revolved by this amount, and write the three equations in terms of the new coordinate system. Doing this will eliminate the mixed term (xy, yz, or xz) in each equation.

See https://en.wikibooks.org/wiki/Conic_Sections/Rotation_of_Axes.
Are you sure this will work? You would have rotate all three elliptical cylinders simultaneously to preserve the their intersections. So you need one 3-D rotation matrix that eliminates all three cross-terms. Is this possible? Is seems that you would have to choose two rotation angles to eliminate three cross-terms.
 
  • #20
tnich said:
Are you sure this will work?
I hadn't considered that, so it's likely that my advice isn't helpful.

tnich said:
You would have rotate all three elliptical cylinders simultaneously to preserve the their intersections. So you need one 3-D rotation matrix that eliminates all three cross-terms. Is this possible? Is seems that you would have to choose two rotation angles to eliminate three cross-terms.
I did some work only with the first equation. If all three equations had been only in x and y, my advice would have been fruitful, but given that we have three variables, I agree that we're dealing with elliptic cylinders, not just ellipses.

Anyway, I apologize for steering the discussion in a direction that isn't helpful. Mea culpa.
 
Last edited:
  • #21
FWIW, another computational approach, via optimization, not Groebner bases, is to recognize that the equations are quadratic forms, e.g. with the first one being

##\big(x\mathbf{e_1} + y\mathbf e_2\big)^T \mathbf A \big(x\mathbf{e_1} + y\mathbf e_2\big)##

where

##
\mathbf A = \begin{bmatrix}
1 & \frac{1}{2} & \frac{1}{2}\\
\frac{1}{2} & 1 & \frac{1}{2}\\
\frac{1}{2} & \frac{1}{2} & 1
\end{bmatrix} = \frac{1}{2}\big(\mathbf{11}^T + \mathbf I\big)##

and as usual for standard basis vectors

##\mathbf {I} =\bigg[\begin{array}{c|c|c|c|c}
\mathbf e_1 & \mathbf e_2 & \mathbf e_{3}
\end{array}\bigg] ##

##\mathbf A## is positive definite -- as a result I believe this is a convex optimization problem. You can model this as quadratically constrained optimization problem with a constant objective function equal to zero -- and in fact this is what I did with IpOpt.

If you're not using a computational method... this seem quite unpleasant. I did start thinking that since the quadratic constraints are equality constraints there may be a way to backdoor solve it with lagrange multipliers, but that dead-ended.
- - -
It's a rather small point, but I should highlight that the solution is not unique. In particular, suppose you find a solution where each variable is positive-- then there is also a solution where each of the three variables is negative.
 
  • #22
Alloymouse said:
$$x^3 - y^3 = 3(x-y)\\
y^3 - z^3 = (y-z)\\
z^3 - x^3 = 4(z-x)$$

The three equations added together result in 3(x-y)+y-z+4(z-x)=0 ---> - x - 2y + 3z = 0. Substitute x=3z-2y into the first equation in the OP , and compare with the second one. You get a product equal to zero, which allows you to find the solutions in a few steps.
 
  • Like
Likes chwala and Mark44
  • #23
ehild said:
The three equations added together result in 3(x-y)+y-z+4(z-x)=0 ---> - x - 2y + 3z = 0. Substitute x=3z-2y into the first equation in the OP , and compare with the second one. You get a product equal to zero, which allows you to find the solutions in a few steps.

##x= 2y - 3z## kindly correct that...
 
  • #24
chwala said:
##x= 2y - 3z## kindly correct that...

##-x-2y+3z = 0 ##----> ##x = -2y+3z##
 
  • #25
ehild said:
##-x-2y+3z = 0 ##----> ##x = -2y+3z##
yep correct, in that case (applying basis under linear algebra), ##y,z## can be deemed as independent variables and ##x## dependent, correct?
 
  • #26
chwala said:
yep correct, in that case (applying basis under linear algebra), ##y,z## can be deemed as independent variables and ##x## dependent, correct?
Or whatever -- any two variables can be arbitrary, and the third on depends on the other two.
 
  • Like
Likes chwala
  • #27
chwala said:
##x= 2y - 3z## kindly correct that...

which op equation are you talking about?

##x^2+xy+y^2=3## or ##x^3-y^3=3x-3y##?
you talk of few steps, am not seeing that...
 
  • #28
chwala said:
which op equation are you talking about?

##x^2+xy+y^2=3## or ##x^3-y^3=3x-3y##?
you talk of few steps, am not seeing that...
##x^2+xy+y^2=3## simplify and compare with the second equation in the OP: ##y^2+yz+z^2=1##
 
  • #29
ehild said:
##x^2+xy+y^2=3## simplify and compare with the second equation in the OP: ##y^2+yz+z^2=1##
I have solved the simultaneous equation and my results are z=2y and therefore x=4y, using x=3z-2y but surprisingly they don't solve the simultaneous equation, the exact values should be I think 2,1 and 0. If the latter is correct then it implies that x=3z-2y may not be correct.
 
  • #30
Sorry the correct solution is
( x, y, z)=(-2,1,0 )or (2,-1,0 )how to get this but from x=3z-2y,if we assume that z=0,then the results follow but again why assume for z? Why not y?
 
  • #31
I have found the solution. There are two possible values for z.
From ##6z^2 - 12zy =0 ##
We have ## 6z(z-2y)=0##
##6z=0## or ##z=2y##
Picking ##z=0## solves the simultaneous equations,
Since ##x=3z-2y##
##x=-2y##
##y=1, x=2##
##y=-1, x=-2##
Thanks guys,
Algebra is the best take on this, my thoughts.
 
  • Like
Likes Alloymouse
  • #32
chwala said:
I have found the solution. There are two possible values for z.
From ##6z^2 - 12zy =0 ##
We have ## 6z(z-2y)=0##
##6z=0## or ##z=2y##
Picking ##z=0## solves the simultaneous equations,
Since ##x=3z-2y##
##x=-2y##
##y=1, x=2##
##y=-1, x=-2##
The result is not quite correct. Recall that ##x=-2y##, If y=1, x=-2, and if y=-1, x=2.

Also there is one more solution set, for ##z-2y=0##.
 
  • #33
chwala said:
I have found the solution. There are two possible values for z.
From ##6z^2 - 12zy =0 ##
We have ## 6z(z-2y)=0##
##6z=0## or ##z=2y##
Picking ##z=0## solves the simultaneous equations,
Since ##x=3z-2y##
##x=-2y##
##y=1, x=2##
##y=-1, x=-2##
Thanks guys,
Algebra is the best take on this, my thoughts.

You have made some sign errors. There are four solutions:
$$\begin{array}{ccc}
x=2, &y=-1,&z=0\\
x=-2, &y=1, &z=0\\
x=4/\sqrt{7}, &y=1/\sqrt{7}, &z=2/\sqrt{7} \\
x=-4/\sqrt{7}, &y=-1/\sqrt{7},& z = -2/\sqrt{7}
\end{array}
$$
You can get the values of ##z## from the last equation in post #12, then substitute those values in the original equations to find ##x## and ##y##; or, you can use the other equations in post #12 to find the corresponding values of ##x,y##.
 
  • Like
Likes chwala
  • #34
ehild said:
The result is not quite correct. Recall that ##x=-2y##, If y=1, x=-2, and if y=-1, x=2.

Also there is one more solution set, for ##z-2y=0##.
What do you mean? I clearly said considering ##6z=0## from my working will give you the solution. Kindly note that there are two values for ##z## and clearly ##z-2y=0## will not give you the solution.
 
  • #35
chwala said:
What do you mean? I clearly said considering ##6z=0## from my working will give you the solution.
In Post #31, you got ##6z(z-2y)=0##. That means two possibilities: either ##6z=0## or ##z-2y=0##. Assuming z=0 gives one sets of solutions. Assuming z-2y=0 gives the other set.
 
  • Like
Likes chwala
Back
Top