Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #16692
| From | Dana DeLouis <dana01@icloud.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Problems with Solve |
| Date | 2014-03-26 07:23 +0000 |
| Message-ID | <lgtva5$eve$1@smc.vnet.net> (permalink) |
| Organization | Time-Warner Telecom |
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
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar
Re: Problems with Solve Dana DeLouis <dana01@icloud.com> - 2014-03-26 07:23 +0000
csiph-web