Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Dana DeLouis

Posts: 24
Registered: 11/18/12
Re: Problems with Solve
Posted: Mar 26, 2014 3:23 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.