Solving four variable simultaneous equations

chwala
Gold Member
Messages
2,825
Reaction score
413

Homework Statement


given
##mx + ny =7##
##mx^2 + ny^2=49##
##mx^3+ny^3=133##
##mx^4+ny^4=406##
find ##2014(x+y-xy)-100(m+n)##

Homework Equations

The Attempt at a Solution


##(mx+ny)(mx-ny)=7(mx-ny)##
##m^2x^2-n^2y^2=7(mx-ny)##
##mx^2+ny^2=49##[/B]
 
Physics news on Phys.org
Try the standard technique of eliminating a variable. I would start by eliminating m, leaving three equations without it.
 
I have done it quite lengthy... You end up solving cubic equations in y, then get x, then get n and finally m. Lengthy I say, will post my summary tomorrow morning.. Malaysia time
 
chwala said:
I have done it quite lengthy... You end up solving cubic equations in y, then get x, then get n and finally m. Lengthy I say, will post my summary tomorrow morning.. Malaysia time
No need to solve any cubics, or even quadratics.
Eliminate m between the first two equations. What do you get?
Use the same method to eliminate m between the second two, and so on.
You now have three equations, no m.
Next get rid of n.
You should now have two equations involving x, y and xy; no higher powers.
 
The problem is a Vandermonde system -- it has a very nice solution solution with Vandermonde matrices and determinants (unlike your last problem which had pesky cross terms to get rid of which led to some nasty bugs in my approach).

I'll post a solution once you've posted yours.
 
##x+y= 2.5,x+y-xy=4,xy=-3/2## my very last steps...
 
thus the solution is ##x=-0.5, y=3, n=5, m=16## trying out the long method...still stuck let me see the vandermonde matrix method...
 
Last edited:
chwala said:
ok seen the mistake ##x=-0.5, y=3, n=5, m=16##
using post 4 method...
 
For the avoidance of doubt... These are my final working ##72030y^3-375585y^2+380730y+293265=0##
Giving ##y=3## or ##y=-0.5##
##n= 1470/(98y^2-133y-7y^3)##
##n=5##
##x= (ny^3-133)/(ny^2-49), ##
If ##y=3,x=-0.5##
##m= (7-ny) /(x) ##
##m=16##
On substitution into our problem the solution is ##5956##
Regards
 
  • #10
haruspex said:
No need to solve any cubics, or even quadratics.
Eliminate m between the first two equations. What do you get?
Use the same method to eliminate m between the second two, and so on.
You now have three equations, no m.
Next get rid of n.
You should now have two equations involving x, y and xy; no higher powers.
I solved it using cubic method!
 
  • #11
chwala said:
##x+y= 2.5,x+y-xy=4,xy=-3/2## my very last steps...
Well done.
 
  • Like
Likes chwala
  • #12
chwala said:
For the avoidance of doubt... These are my final working ##72030y^3-375585y^2+380730y+293265=0##
Giving ##y=3## or ##y=-0.5##
##n= 1470/(98y^2-133y-7y^3)##
##n=5##
##x= (ny^3-133)/(ny^2-49), ##
If ##y=3,x=-0.5##
##m= (7-ny) /(x) ##
##m=16##
On substitution into our problem the solution is ##5956##
Regards
The long method,... I used two methods in solving the problem.
 
  • #13
Here is haruspex' approach, worked out:

Given

##mx + ny =7##......(1)
##mx^2 + ny^2=49##.....(2)
##mx^3+ny^3=133##...(3)
##mx^4+ny^4=406##...(4)

Eliminate m from (1) and (2).

##mx^2 + ny^2=49##
##-mx^2 - nyx = - 7x##
______________________
##ny(y-x) = 49-7x##.....(5)

Eliminate m from (2) and (3).

##mx^3+ny^3=133##
##-mx^3 - nxy^2=-49x##
______________________
##ny^2(y-x) = 133-49x##.....(6)

Eliminate m from (3) and (4).

##mx^4+ny^4=406##
##-mx^4 - nxy^3=-49x##
______________________
##ny^3(y-x) = 406-133x##.....(7)

Eliminate n from (5) and (6).

##ny^2(y-x) = 133-49x##
##-ny^2(y-x) = -49y+7xy##
__________________________
##0=133-49x-49y+7xy##......(8)

Eliminate n from (6) and (7).

##ny^3(y-x) = 406-133x##
##-ny^3(y-x) = -133y+49xy##
__________________________
##0=406-133x-133y+49xy##......(9)

Eliminate y from (8) and (9).

##y=\frac {19-7x} {7-x}##
##0=406-133x-133\frac {19-7x} {7-x}+49x\frac {19-7x} {7-x}##
##0=(133-7*49)x^2+(49*19-406)x +406*6-133*19##
##x= -\frac 1 2## or ##x = 3##

By symmetry
##x= -\frac 1 2, y = 3##
##m = 16, n = 5##
 
  • #14
Here is the Vandermonde setup. If you aren't familiar with looking at Vandermonde matrices and Newton sums in a Hankel matrix, it may not make too much sense.

- - - -
0.)

Consider

##\mathbf W := \begin{bmatrix}
1& x\\
1 & y
\end{bmatrix}##

where ##\mathbf W## is a ##2## x ##2## Vandermonde matrix.

note that

##\begin{bmatrix}
1& x & x^2\\
1 & y& y^2
\end{bmatrix}##
is a 2 x 3 Vandermonde matrix, which is implicitly referenced during this writeup with ##\mathbf H_{big}##.

now also consider the following two diagonal matrices

##\mathbf D := \begin{bmatrix}
x& 0\\
0 & y
\end{bmatrix}##

##\mathbf M := \begin{bmatrix}
m& 0\\
0 & n
\end{bmatrix}##

Putting these together, we have:

##\mathbf W^T \mathbf M \mathbf W = \mathbf H_0= \left[\begin{matrix}m+n & 7\\7 & 49\end{matrix}\right]
##

##\mathbf W^T \mathbf M \mathbf D \mathbf W = \mathbf H_1 =\left[\begin{matrix}7 & 49\\49 & 133\end{matrix}\right]##

where ##\mathbf H_0## and ##\mathbf H_1## are both Hankel matrices carrying the relevant Newton sums. (e.g. see problem 112 on page 75 of this: http://perso.ens-lyon.fr/serre/DPF/exobis.pdf .)

1.)
now consider the enlarged Hankel matrix, which takes into account all of your information:

##\mathbf H_{big} = \left[\begin{matrix}m+n & 7&49\\7 & 49&133\\49&133&406 \end{matrix}\right]##

we know that this has at most rank 2 (why? -- and a we'll see it is in fact rank 2 momentarily). Since, ##rank\big(\mathbf H_{big}\big) \lt 3##, we know ##det\big(\mathbf H_{big}\big) = 0##.

##det\big(\mathbf H_{big}\big) = 0 = 2205(m + n) - 46305 \to m + n = 21##

we now know ##\big(m +n\big)
## which is directly useful as part of the final answer, and it allows us to refine ##\mathbf H_0##

##\mathbf W^T \mathbf M \mathbf W = \mathbf H_0= \left[\begin{matrix}21 & 7\\7 & 49\end{matrix}\right]
##

- - - -
edit:
The below steps work to get the solution, but they are a bit ugly. I subsequently came up with a more satisfying approach in post #18. You can skip the below steps and jump straight into post #18 if you are so inclined.
- - - -

2.)
note that ##det\big(\mathbf H_0\big) = 980 \neq 0##, which tells us that ##m \neq 0##, ##n \neq 0##, and ##x \neq y## (why?).

##det\big(\mathbf H_1\big) =-1470##

tells us similar things. If we divide one determinant by the other, we get:

##\frac{-1470}{980}= \frac{det\big(\mathbf H_1\big)}{det\big(\mathbf H_0\big)} = \frac{det\big(\mathbf W^T\big) det\big(\mathbf M\big)det \big( \mathbf D\big)det \big(\mathbf W \big)}{det\big(\mathbf W^T\big) det\big(\mathbf M\big) det\big(\mathbf W\big) } = det\big(\mathbf D\big) = xy##

hence we have

##xy = -\frac{3}{2}##

Two down, one to go.

3.)

This final part can certainly could be done by hand -- we've all done 2x2 matrix multiplication and 2x2 matrix inversion by hand, but this is the one part that I think is a bit too unpleasant to do by hand (and hence doing the matrix multiplication and inversion with the help of a computer is a lot nicer).

reconsider

##\mathbf W^T \mathbf M \mathbf W = \mathbf H_0= \left[\begin{matrix}21 & 7\\7 & 49\end{matrix}\right]
##

we know ##det\big(\mathbf W\big)\neq 0##, hence ##\mathbf W^{-1}## exists. Thus we have##\mathbf M = \big(\mathbf W^T\big)^{-1} \mathbf H_0 \big(\mathbf W\big)^{-1} = \left[\begin{matrix}\frac{1}{\left(x - y\right)^{2}} \left(- 7 y \left(- 3 y + 1\right) - 7 y + 49\right) & \frac{1}{\left(x - y\right)^{2}} \left(7 x \left(- 3 y + 1\right) + 7 y - 49\right)\\\frac{1}{\left(x - y\right)^{2}} \left(7 x - 7 y \left(3 x - 1\right) - 49\right) & \frac{1}{\left(x - y\right)^{2}} \left(7 x \left(3 x - 1\right) - 7 x + 49\right)\end{matrix}\right]
##

The left hand side is diagonal, so the right hand side is as well, i.e.

##\mathbf M = \left[\begin{matrix}\frac{1}{\left(x - y\right)^{2}} \left(- 7 y \left(- 3 y + 1\right) - 7 y + 49\right) & 0\\ 0 & \frac{1}{\left(x - y\right)^{2}} \left(7 x \left(3 x - 1\right) - 7 x + 49\right)\end{matrix}\right]##

so if we look at that bottom left corner, we see:

##\frac{1}{(x - y)^{2}} \big(7 x - 7 y \left(3 x - 1\big) - 49\right) = 0##

i.e. we know

##7 x - 7 y \left(3 x - 1\right) = 7x -21xy +7y = 49 ##

equivalently:

## x -3xy +y = 7##

substituting in the value of ##xy## we see

##x - 3\big(-\frac{3}{2}\big) +y = x + \frac{9}{2} +y = \frac{14}{2}##
##x + y = \frac{5}{2}##

- - - -
At this stage we could easily solve for individual values of x and y (just root finding of a quadratic polynomial) and also m and n, though we don't need them.

Thus the solution to your question is

##2014\Big(\big(x+y\big)-\big(xy\big)\Big)-100\Big(m+n\Big) = 2014\Big(\big(\frac{5}{2}\big) - \big(-\frac{3}{2}\big) \Big) - 100\Big(21\Big) = 2014\big(4\big) - 2100 = 5956 ##
 
Last edited:
  • #15
chwala said:
thus the solution is ##x=-0.5, y=3, n=5, m=16## trying out the long method...still stuck let me see the vandermonde matrix method...
Since the equations are 4th order, there should be 4 solutions. Here's one of the alternate solutions: x = 3, y = -0.5, m = 5, n = 16. But in this case 2014*(x+y-x*y)-100*(m+n) = 5956 is the same answer.
 
  • #16
aabottom said:
Since the equations are 4th order, there should be 4 solutions. Here's one of the alternate solutions: x = 3, y = -0.5, m = 5, n = 16. But in this case 2014*(x+y-x*y)-100*(m+n) = 5956 is the same answer.
In general there may be four solutions, but sometimes there are fewer. E.g. x2-2x+1=0 has only one "repeated" solution.
In the present case there are two, but as @tnich noted there is a symmetry between x and y, both in the information provided and in the question asked, so the two solutions are effectively the same.
 
  • #17
haruspex said:
In general there may be four solutions, but sometimes there are fewer. E.g. x2-2x+1=0 has only one "repeated" solution.
In the present case there are two, but as @tnich noted there is a symmetry between x and y, both in the information provided and in the question asked, so the two solutions are effectively the same.
In my solution, I wound up with a quadratic equation in x, thus there are two different solutions for x: x = -0.5 or 3 for the negative and positive root respectively. This lead to two solutions for y, m, and n. Yes, the equations are symmetric. The two solutions that I found are symmetric also:
a) x, y, m, n = -0.5, 3, 16, 5
b) x, y, m, n = 3, -0.5, 5, 16
 
  • #18
I thought the finish to my prior solution was ugly. Here's a much more satisfying finish.

Do step 1 in my prior post, then skip the above remaining steps and do the below instead.
- - - - -
At the end of step one we know the value of ##\big(m + n\big) = 21##

##\mathbf W^T \mathbf M \mathbf W = \mathbf H_0= \left[\begin{matrix}21 & 7\\7 & 49\end{matrix}\right]##

The Right Hand Side is real symmetric positive definite, hence the Left hand side is as well. We can immediately see that ##m \gt0 ## and ##n \gt 0## -- why? either application of determinants, or better, application of Sylvester's Law of Inertia. (Either works so long as x and y are real numbers -- there's a way to address the case where x and y could have non-zero imaginary components, but it's a lot messier and really a distraction.)

Because each side is full rank, we know ##x \neq y##, hence all of these Newton sums are generated by 2 unique numbers, and there are ##m## of the ##x's## and ##n## of the ##y's##. Ideally ##m## and ##n## are natural numbers (we don't know this yet) but both being positive is enough via a re-scaling argument. (If one of ##m## or ##n## was negative, some special handling would be needed in order to take the minimal polynomial approach.)

so consider some diagonalizable matrix ##\mathbf A## with ##m + n = 21## eigenvalues, only two of which are distinct -- i.e. they are ##x## with multiplicity ##m## and ##y##, with multiplicity ##n##.

The minimal polynomial of ##\mathbf A## is given by

##p\big(\mathbf A\big) = \mathbf A^2 + c_1 \mathbf A + c_2 \mathbf I = \mathbf 0##

re-arrange terms:
##c_2 \mathbf I + c_1 \mathbf A = - \mathbf A^2##

also consider what happens when we multiply each side by ##\mathbf A##

## c_2 \mathbf A + c_1 \mathbf A^2 = - \mathbf A^3##

now take the trace of each side:

##(21)c_2 + (7) c_1 = trace\big(\mathbf I\big)c_2 + trace\big(\mathbf A\big)c_1 = - trace\big(\mathbf A^2\big) = -49##
##(7) c_2 + (49) c_1 = trace\big(\mathbf A\big)c_2 + trace\big(\mathbf A^2\big)c_1 = - trace\big(\mathbf A^3\big) = -133##

In matrix form we have:

##\left[\begin{matrix}21 & 7\\7 & 49\end{matrix}\right]\begin{bmatrix}
c_2\\
c_1
\end{bmatrix} = \begin{bmatrix}
-49\\
-133
\end{bmatrix}##

solve:

##\begin{bmatrix}
c_2\\
c_1
\end{bmatrix}= \left[\begin{matrix}- \frac{3}{2}\\- \frac{5}{2}\end{matrix}\right]##

now we relate coefficients of the minimal polynomial, to the (unique) roots and see that

##-(x+y) = c_1 = -\frac{5}{2}##
##x+y = \frac{5}{2}##

and
##+(xy) = c_2 = -\frac{3}{2}##

which completes the exercise.
 
Last edited:
Back
Top