How to find a real positive root of a bi-quadratic equation

3 Ansichten (letzte 30 Tage)
Atom
Atom am 15 Apr. 2013
Kommentiert: Joel Mathew am 19 Sep. 2016
Suppose a bi-quadratic equation x^4+4*x^2-7=0. How to find a positive real root of it.
solve(x^4+4*x^2-7=0, x, Real, Positive)
Is the above correct?
How to use fsolve here?

Antworten (1)

Matt J
Matt J am 15 Apr. 2013
Bearbeitet: Matt J am 15 Apr. 2013
Why not just use ROOTS?
>> roots([1 0 4 -7])
ans =
-0.6277 + 2.2764i
-0.6277 - 2.2764i
1.2554
  5 Kommentare
Matt J
Matt J am 15 Apr. 2013
OK, then
sol=roots([1 0 4 -7]);
sol=sol(imag(sol)==0 & sol>=0);
Joel Mathew
Joel Mathew am 19 Sep. 2016
Thank you this worked for me

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by