Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Problems with Solve
Replies: 3   Last Post: Mar 26, 2014 3:23 AM

 Messages: [ Previous | Next ]
 Dana DeLouis Posts: 24 Registered: 11/18/12
Re: Problems with Solve
Posted: Mar 26, 2014 3:23 AM

On Sunday, March 23, 2014 5:01:17 AM UTC-4, totarefugium wrote:
> Hello,
>
> In[1]:= N[Solve[z + 5 (z^2 - 1) + 1 z^3 == 1, z]]
>
> Out[1]= {{z -> 0.925423 + 0. I}, {z -> -4.47735 + 2.22045*10^-16 I}, {z
>
> -> -1.44807 - 4.44089*10^-16 I

> > This equation has 3 real solutions. However, the answers returned when I ask mathematica for a decimal answer are complex (which I need to do later on when an integration needs solving numerically):
>
> > {{z -> 0.925423 + 0. I}, {z -> -4.47735 +
>
> > 2.22045*10^-16 I}, {z -> -1.44807 - 4.44089*10^-16 I}}

(* A complex solution *)

sol=z/.Solve[z+5 (z^2-1)+1 z^3==1,z];

sol//ComplexExpand//FullSimplify

{1/3 (-5+Sqrt[22] Cos[1/3 ArcTan[(9 Sqrt[503])/43]]+Sqrt[66] Sin[1/3 ArcTan[(9 Sqrt[503])/43]]),
1/3 (-5-2 Sqrt[22] Cos[1/3 ArcTan[(9 Sqrt[503])/43]]),
1/3 (-5+Sqrt[22] Cos[1/3 ArcTan[(9 Sqrt[503])/43]]-Sqrt[66] Sin[1/3 ArcTan[(9 Sqrt[503])/43]])}

N[%,25]

0.9254229177777078310769981,
-4.477352348008969997944065,
-1.448070569768737833132933

Date Subject Author
3/23/14 Bob Hanlon
3/23/14 Murray Eisenberg
3/26/14 Dana DeLouis