Re:Does anyone have an apparent fix for this mathematica problem?
- To: mathgroup at yoda.ncsa.uiuc.edu
- Subject: Re:Does anyone have an apparent fix for this mathematica problem?
- From: uunet!mathnx.byu.edu!smithw (William V. Smith)
- Date: Thu, 7 Jun 90 22:16:39 MDT
Yes. There is a fix. It is available from your local friendly NeXT Rep. Here's what happens with the fix: In[1]:= InputForm[(b*c*(a + d - (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))^3)/ (4*(a - d + (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))* (a^2 + 4*b*c - 2*a*d + d^2)^(1/2)) - (b*c*(a + d + (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))^ 3)/ (4*(a - d - (a^2 + 4*b*c - 2*a*d + d^2)^(1/2)) * (a^2 + 4*b *c - 2*a*d + d^2)^(1/2))] Out[1]//InputForm= (b*c*(a + d - (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))^3)/ (4*(a^2 + 4*b*c - 2*a*d + d^2)^(1/2)* (a - d + (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))) - (b*c*(a + d + (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))^3)/ (4*(a^2 + 4*b*c - 2*a*d + d^2)^(1/2)* (a - d - (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))) In[2]:= rule={a->1,b->2,c->3,d->4} Out[2]= {a -> 1, b -> 2, c -> 3, d -> 4} In[3]:= N[res//.rule] Out[3]= res In[4]:= res=%1; In[5]:= N[res//.rule] Out[5]= 37. In[6]:= N[Together[Expand[res]]//.rule] Out[6]= 37. In[7]:= N[Simplify[res]//.rule] Out[7]= 37. The bad result was from a known bug in the Together function which is called by Simplify so both gave the wrong answer.