Re: wrong result in solving equation and parametric ploting
- To: mathgroup at smc.vnet.net
- Subject: [mg111940] Re: wrong result in solving equation and parametric ploting
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Fri, 20 Aug 2010 07:06:38 -0400 (EDT)
On 8/19/10 at 7:20 AM, tmatsoukas at me.com (Themis Matsoukas) wrote: >I don't claim to understand the equations you are solving but aren't >x,y,z supposed to be real numbers? >range = 300000000; intersec = {x, y, z} /. Solve[{1*((x - y)^2 >+ (y - z)^2 + (z - x)^2)^2 + 1000*((x - y)^3 + >(y - z)^3 + (z - x)^3)^1 == 2*(250*10^6)^4, 0 == x + y + z}, {z, y}]; >intersec /. x -> range/10.0 > >{{3.*10^7, -1.5*10^7 + 1.37486*10^8 I, -1.5*10^7 - 1.37486*10^8 >I}, {3.*10^7, -1.5*10^7 - 1.37486*10^8 I, -1.5*10^7 + >1.37486*10^8 I}, {3.*10^7, 1.17486*10^8, -1.47486*10^8}, {3.*10^7, >-1.47486*10^8, 1.17486*10^8}} >For some values of x (x=0, for example), all roots are complex. The reason complex numbers arise is due to using machine precision for when substituting for x. Specifically, range/10.0 is machine precision. And that simply isn't enough precision to get accurate answers when the exact solution involves differences of values with large exponents. >Moreover, intersec is not a list of three numbers, as ParametricPlot3D assumes, but a list of four sets of {x,y,z} roots. It seems to me that you should be choosing the appropriate roots somehow. This is definitely an issue that would have to be corrected. But it will not resolve the need for higher precision arithmetic to get accurate answers and an accurate plot. And note In[26]:= Log[2, 2*(250*10^6)^4] // N Out[26]= 112.589 That is the constant the equation is set equal to is a 113 bit integer. Looking at one of the higher power terms in intersec before x is given a value results in In[30]:= Log[2, 387420489000000 x^10 /. x -> range/10] // N Out[30]= 296.845 which is a 297 bit integer using exact arithmetic. It should be clear no simple conversion of such large integers to a machine representation with only 64 bits can result in accurate answers.