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:

Ratnumer

Function: ratnumer (<expr>) Returns the numerator of <expr>, after coercing <expr> to a canonical rational expression (CRE). The return value is a CRE.

H1(z):=((z-2/3)*(z+3/4)*(z+2/5))/(z^3);
l:solve(ratnumer(H1(z)),z);
nullst:[];
re(x):=abs(x)*cos(carg(x));
im(x):=abs(x)*sin(carg(x));
for i:1 thru length(l) step 1 do(    a:rhs(l[i]),    nullst:append(nullst,[[re(a),im(a)]]));
l:solve(denom(H1(z)),z);
pole:[];
for i:1 thru length(l) step 1 do(    a:rhs(l[i]),    pole:append(pole,[[re(a),im(a)]]));
plot2d([sqrt(1-x^2),-sqrt(1-x^2),[discrete,nullst],[discrete,pole]],[x,-2,2],[y,-2,2],[style,[lines,0.4],[lines,0.4],[points],[points]],[point_type, circle, circle,circle,times],[color,black,black,red,blue],[legend,false],[gnuplot_preamble, "set size ratio -1"]);

<expr> is coerced to a CRE by rat if it is not already a CRE. This conversion may change the form of <expr> by putting all terms over a common denominator.

num is similar, but returns an ordinary expression instead of a CRE. Also, num does not attempt to place all terms over a common denominator, and thus some expressions which are considered ratios by ratnumer are not considered ratios by num.

(%o1)                                true
(%i2) 

Related Examples

ratnumer

ratnumer(0.5);

Calculate

ratnumer-solve

H1(z):=((z-2/3)*(z+3/...

l:solve(ratnumer(H1(z...

nu;

Calculate

ratnumer

ratnumer(0.5);

ratnumer(1.7);

Calculate

ratnumer

ratnumer(0.5);

Calculate

ratnumer-solve

H1(z):=((z-2/3)*(z+3/...

l:solve(ratnumer(H1(z...

nu;

Calculate

ratnumer

ratnumer(0.5);

ratnumer(1.7);

Calculate