1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Math Riddle | 17 Jul 2009

Discussion in '$1 Daily Competition' started by shabbir, Jul 17, 2009.

  1. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    A bit tricky and interesting as well

    x+y+z=0
    x^3+y^3+z^3=3
    x^5+y^5+z^5=15

    x^2+y^2+z^2=?

    ^ = Power of
     
  2. rik625

    rik625 New Member

    Joined:
    Jun 15, 2009
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Seeking-As-For-Yet
    Location:
    USA
    Hey...

    x^2+y^2+z^2 =1

    Im i right???
     
  3. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    It'd better not be as simple as that...after several hours and sheets of paper I'm just about to give up on solving it with simultaneous equations...
     
  4. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    However that did give me a useful inequality...so I'm going to register a guess, that x^2+y^2+z^2 is an integer and is precisely 6. Just running another, more accurate, test but it'll take a while to produce results.
     
    naimish likes this.
  5. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    Yes that is the right Answer :D

    I have the values of x,y,z as well if you want to.
     
  6. naimish

    naimish New Member

    Joined:
    Jun 29, 2009
    Messages:
    1,046
    Likes Received:
    18
    Trophy Points:
    0
    Occupation:
    Software Engineer
    Location:
    On Earth
    @ xpi0t0s, Congrs Buddy :)
     
  7. SaswatPadhi

    SaswatPadhi ~ Б0ЯИ Τ0 С0δЭ ~

    Joined:
    May 5, 2009
    Messages:
    1,343
    Likes Received:
    55
    Trophy Points:
    0
    Occupation:
    STUDENT !
    Location:
    Orissa, INDIA
    Home Page:
    Of course X^2+y^2+z^2 can be real even if x, y, z are all complex. But, I'm just curious .. Do these equations have any real solutions ?? :crazy:
     
  8. SaswatPadhi

    SaswatPadhi ~ Б0ЯИ Τ0 С0δЭ ~

    Joined:
    May 5, 2009
    Messages:
    1,343
    Likes Received:
    55
    Trophy Points:
    0
    Occupation:
    STUDENT !
    Location:
    Orissa, INDIA
    Home Page:
    I wonder why I keep getting 60 as the answer. :(
     
  9. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    The answer is 6 and X=3, y=-2 and Z=-1
     
  10. SaswatPadhi

    SaswatPadhi ~ Б0ЯИ Τ0 С0δЭ ~

    Joined:
    May 5, 2009
    Messages:
    1,343
    Likes Received:
    55
    Trophy Points:
    0
    Occupation:
    STUDENT !
    Location:
    Orissa, INDIA
    Home Page:
    But 3^3 + (-2)^3 + (-1) ^3 = 27-8-1 = 18 ?? :crazy:

    Further, 3^2 + (-2)^2 + (-1)^2 = 9 + 4 + 1 = 14 ?! :crazy:
     
  11. SaswatPadhi

    SaswatPadhi ~ Б0ЯИ Τ0 С0δЭ ~

    Joined:
    May 5, 2009
    Messages:
    1,343
    Likes Received:
    55
    Trophy Points:
    0
    Occupation:
    STUDENT !
    Location:
    Orissa, INDIA
    Home Page:
    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 :)
     
  12. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    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.
     
  13. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    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.
     
  14. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    Yes. I saw the 2 cos one post but then missed that one.
     

Share This Page