Solving 3rd order equation by solve.



Thank you, Andre.
# I missed your e-mail. Sorry for late reply.

It is very useful information for me.
-
ICHIKAWA, Yuji

On 2013/02/24, at 23:59, maxima-request at math.utexas.edu wrote:

> Date: Sun, 24 Feb 2013 15:52:32 +0100
> From: andre maute <andre.maute at gmx.de>
> To: maxima at math.utexas.edu
> Subject: Re: [Maxima] Solving 3rd order equation by solve.
> Message-ID: <512A2930.4050504 at gmx.de>
> Content-Type: text/plain; charset=ISO-2022-JP
> 
> On 02/24/2013 02:54 PM, ?? ?? wrote:
>> Thank you, Jaime.
>> 
>> It works!
>> How about this problem? (I change an equation just a little.)
>> 
>> Executing
>> 	float(rectform(solve(x^3-3*x^2-2*x+1,x)));
> 
> For your information this polynomial has discriminant D=257
> there is no factorization of the polynomial, so we have casus
> irreducibilis here.
> 
> see http://en.wikipedia.org/wiki/Casus_irreducibilis
> 
> Andre
> 
>> results
>> 	[x=.3433795689528897-2.220446049250313*10^-16*%i,x=2.220446049250313*10^-16*%i-.8342431843139217,x=1.110223024625157* 10^-16*%i+3.490863615361032]
>> though
>> 	realroots(x^3-3*x^2-2*x+1);
>> is
>> 	[x=-27992557/33554432,x=11521907/33554432,x=117133945/33554432].
>> 
>> I want to know general methods to avoid a small imaginary error.
>> 
>> Thanks,
>> -
>> ICHIKAWA, Yuji
>> 
>> On 2013/02/24, at 21:49, Jaime Villate <villate at fe.up.pt> wrote:
>> 
>>> On 02/24/2013 11:24 AM, ?? ?? wrote:
>>>> Executing
>>>> 	solution: solve(x^3-x^2+1=0, x), rectform;
>>>> ...
>>>> 
>>>> The second one in solution is a real root.
>>>> To know the concrete value, executing
>>>> 	solution, float;
>>>> results
>>>> 	[x=0.744861766619749*%i+.8774388331233485,x=-.7548776662466969,x=.8774388331233485-0.744861766619749*%i].
>>>> 
>>>> I want to get this result by single command.
>>>> But executing
>>>> 	solution: solve(x^3-x^2+1=0, x), rectform, float;
>>>> results
>>>> 	[x=.7448617666197254*%i+.8774388331233376,x=-8.480870326997723*10^-17*%i-.7548776662466756,x=.8774388331233378-
>>>> .7448617666197253*%i].
>>>> 
>>>> The second one includes a very small imaginary part.
>>>> 
>>>> How can I avoid it?
>>> Hi,
>>> try
>>> solution: float( rectform( solve( x^3-x^2+1=0, x)));
>>> 
>>> which allows you to make the three things in the order you want them to be made. In your original command
>>> 
>>> solution: solve(x^3-x^2+1=0, x), rectform, float;
>>> 
>>> you used function ev(), which is more unpredictable in the way the modifiers rectform and float will be applied.
>>> 
>>> Regards,
>>> Jaime
>>> 
>> _______________________________________________
>> Maxima mailing list
>> Maxima at math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
>> 
> 
> 
> 
> ------------------------------