On Sun, Apr 03, 2011 at 06:08:15PM +1000, David Billinghurst wrote:
> On 3/04/2011 3:51 PM, Daniel Dalton wrote:
> >4) Finally, I'm having trouble solving some more complicated equations
> >with maxima. According to my text book there is real solutions. How can
> >I find the real solution for the below equation? Input/output is
> >below. (Note, I'm not familiar with complex numbers.)
> Hi Dan,
Hi David,
>
> There are at least two ways to attack 4)
>
> 1. Float isn't always sufficient with complex numbers. Try
> rectform(float(expression))). You are left with a small imaginary
> part due to rounding errors.
>
> 2. Use the realroots() function to extract the real roots. It
> returns rational approximations to the real solution, which can be
> converted to floating point using float(). Try realroots(x^2-2=0).
This does the job perfectly! Thank you.
> Do you understand that maxima approximating the irrational number
> sqrt(2)?
Yes.
Thanks for your help,
Dan