0
SaswatPadhi's Avatar, Join Date: May 2009
~ Б0ЯИ Τ0 С0δЭ ~
Oh, I see .. looks like shabbir referred to this thread (from Physics Forum) for the answers : http://www.physicsforums.com/showthread.php?t=315700.

But, the correct answers are not 3, -2, -1.

The answers are :

x= 2 cos (20)
y= 2 cos (140)
z= 2 cos (260)

Probably shabbir didn't read the last post carefully. It mentioned a nice short-cut method to solve, assuming X=3, Y=-2, Z=-1. But, they are not the real answers.

Anyway, congrats xpi0t0s
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
This code found multiple results; it only searches for approximations (hence if test1>=-0.05 && test2<=0.05) but all the results revolve around 6 hence the guess that there was an integral solution that was precisely 6.0. But this would make x,y,z non-integral and therefore irrational.
Code:
void powers()
{
	FILE *fp;
	fp=fopen("results.txt","a");
	double x,y,z;
	for (x=1.5; x<=10.0; x+=0.00001)
	{
		for (y=-10.0; y<=10.0; y+=0.00001)
		{
			// don't need to loop over z; from x+y+z=0 we can calc z
			z=-(x+y);
			double test1=x*x*x+y*y*y+z*z*z-3.0;			
			if (test1>-0.05 && test1<0.05)
			{
				double test2=x*x*x*x*x+y*y*y*y*y+z*z*z*z*z-15.0;
				if (test2>-0.05 && test2<0.05)
				{
					fprintf(fp,"Sum of squares of x,y,z=%f; x=%f y=%f z=%f\n",x*x+y*y+z*z,x,y,z);
				}
			}
		}
	}
	fclose(fp);
}
The closest results found were:
Sum of squares of x,y,z=6.000000; x=1.879390 y=-1.532080 z=-0.347310
Sum of squares of x,y,z=6.000000; x=1.879390 y=-0.347310 z=-1.532080

and I'm still working on getting this in surd form which is proving difficult (for me), basically on paper what I did was to try to solve by simultaneous equations and use Gaussian elimination:

[1] x+y+z=0
[2] x^3+y^3+z^3=3
[3] x^5+y^5+z^5=15

First step is to eliminate y from [2] and [3]
[1]->y=-(x+z)

So [2]->x^3-(x+z)^3+z^3=3
-> 3x^2+3zx^2=-3 [2a]

and [3]-> x^5-(x+z)^5+z^5=15 [3a]

So now we rearrange [2] as (3x)z^2+(3x^2)z+3=0 which gives us x in terms of x and we can use the standard quadratic solver (-b+/-sqrt(b^2-4ac))/2a whicg gives

[4] z=-x/2 +/- sqrt((x^3-4)/4x)

hence the inequality - for z to be real, x^3-4>=0 so x>cube root of 4 or x>=4^(1/3), which is why x is initialised in the program as x=1.5: 1.5<4^(1/3).


So the next step in Gaussian elimination is to eliminate z from [3]. This equation becomes:
[3a] 5x^4z + 10x^3z^2 + 10x^2z^4 + 5xz^4 = -15

and the next step (which I woke up with this morning) is to rearrange this as z=f(x) then to replace z with [4] and there's an equation purely in terms of x which can then be solved to give a range of values for x.

I can't be arsed doing that on paper now so I've installed Maxima to see if I can do it with that.
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
Here we go, in installation time plus about 5 seconds:

(%i1) solve([x+y+z=0,x^3+y^3+z^3=3,x^5+y^5+z^5=15],[x,y,z]);
(%o1) [[x = - 0.34729635646322, y = 1.879385232208487, z = - 1.532088888888889], [x = - 1.532088888888889, y = 1.879385232208487, z = - 0.34729635646322],
[x = - 0.34729635646322, y = - 1.532088888888889, z = 1.879385232208487], [x = 1.879385232208487, y = - 1.532088888888889, z = - 0.34729635646322],
[x = - 1.532088888888889, y = - 0.34729635646322, z = 1.879385232208487], [x = 1.879385232208487, y = - 0.34729635646322, z = - 1.532088888888889]]


and [x = 1.879385232208487, y = - 1.532088888888889, z = - 0.34729635646322] pretty much matches what I got.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Yes. I saw the 2 cos one post but then missed that one.