Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Realroots Calculator

Realroots

Function: realroots (<expr>, <bound>)

define (f(x),(x^3 + x -13)/ (5*x^3) );
f(-1);
 	float(f(-6));
float(realroots(f(x)=0));
define( fp(x), diff(f(x),x));
fp(1.5);
float(find(realroots(f(x)=fp(x))));
a:1.5;
b:3;
h: b-a;
dq: (f(a+h)-f(a))/h;

Function: realroots (<eqn>, <bound>)

Function: realroots (<expr>)

Function: realroots (<eqn>) Computes rational approximations of the real roots of the polynomial <expr> or polynomial equation <eqn> of one variable, to within a tolerance of <bound>. Coefficients of <expr> or <eqn> must be literal numbers; symbol constants such as %pi are rejected.

realroots assigns the multiplicities of the roots it finds to the global variable multiplicities.

realroots constructs a Sturm sequence to bracket each root, and then applies bisection to refine the approximations. All coefficients are converted to rational equivalents before searching for roots, and computations are carried out by exact rational arithmetic. Even if some coefficients are floating-point numbers, the results are rational (unless coerced to floats by the float or numer flags).

When <bound> is less than 1, all integer roots are found exactly. When <bound> is unspecified, it is assumed equal to the global variable rootsepsilon.

When the global variable programmode is true, realroots returns a list of the form [x = <x_1>, x = <x_2>, ...]. When programmode is false, realroots creates intermediate expression labels %t1, %t2, ..., assigns the results to them, and returns the list of labels.

Examples:

          (%i1) realroots (-1 - x + x^5, 5e-6);
                                         612003
          (%o1)                     [x = ------]
                                         524288
          (%i2) ev (%[1], float);
          (%o2)                 x = 1.167303085327148
          (%i3) ev (-1 - x + x^5, %);
          (%o3)                - 7.396496210176905E-6

          (%i1) realroots (expand ((1 - x)^5 * (2 - x)^3 * (3 - x)), 1e-20);
          (%o1)                 [x = 1, x = 2, x = 3]
          (%i2) multiplicities;
          (%o2)                       [5, 3, 1]

(%o1)                                true
(%i2) 

Realroots Example

Related Examples

realroots

"*"/* Fehlende Koordi...

"*"/* Funktion eingeb...

"*"/* Bei Punkt A ken...

Calculate

realroots

realroots(7+x^3-8*(8*...

Calculate

realroots

g(x,y):=y=2*x^3-30*x^...

x1:0;

y3:2500;

Calculate

realroots

f(x):=(2*x^3-14*x^2+2...

realroots(f(x));

Calculate

realroots

f(x):=(2*x^2-2*x-4)/(...

realroots(f(x));

Calculate

realroots

realroots(1.762*x^3+1...

Calculate

realroots

(g(x)=x^2+4*x-3);

realroots (g(x)=0);

Calculate

realroots

realroots(0.18*t^3+0....

Calculate

realroots

realroots(3*x^4-x^3+1...

Calculate

realroots-sqrt

realroots(50-sqrt(x)+3);

Calculate