[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Biquadratic equation
From: |
Ben Abbott |
Subject: |
Re: Biquadratic equation |
Date: |
Sun, 02 Aug 2009 19:14:22 -0400 |
On Aug 2, 2009, at 4:33 AM, address@hidden wrote:
Hi,
I have a simple request: How to get a solving of biquadratic
equation like 16x^4-4x^2-2=0 in GNU Octave. I dont have enough
skills to do it myself.
Thanks
Octave has a nice function for solving for the roots of polynomials.
x1 = roots ([16, 0, -4, 0, -2]);
avoid reduce numerical errors ...
x2 = (sqrt(roots([16 -4, -2]))*[1 -1])(:)
sort(x1)-[-0.5i;0.5i;1/sqrt(2);-1/sqrt(2)]
ans =
0.0000e+00
0.0000e+00
7.7716e-16
-8.8818e-16
sort(x2)-[-0.5i;0.5i;1/sqrt(2);-1/sqrt(2)]
ans =
0.0000e+00
0.0000e+00
1.1102e-16
-1.1102e-16
Ben