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:

Ratcoef Calculator

Ratcoef

Function: ratcoef (<expr>, <x>, <n>)

Function: ratcoef (<expr>, <x>) Returns the coefficient of the expression <x>^<n> in the expression <expr>. If omitted, <n> is assumed to be 1.

The return value is free (except possibly in a non-rational sense) of the variables in <x>. If no coefficient of this type exists, 0 is returned.

ratcoef expands and rationally simplifies its first argument and thus it may produce answers different from those of coeff which is purely syntactic. Thus ratcoef ((x + 1)/y + x, x) returns (y + 1)/y whereas coeff returns 1.

ratcoef (<expr>, <x>, 0), viewing <expr> as a sum, returns a sum of those terms which do not contain <x>. Therefore if <x> occurs to any negative powers, ratcoef should not be used.

Since <expr> is rationally simplified before it is examined, coefficients may not appear quite the way they were envisioned.

Example:

          (%i1) s: a*x + b*x + 5$
          (%i2) ratcoef (s, a + b);
          (%o2)                           x

(%o1)                                true
(%i2) 

Ratcoef Example

Related Examples

ratcoef

s: a*x + b*x + 5;

ratcoef (s, a + b);

Calculate

ratcoef-ratsimp

poly:(x-a)*(x-b)*(x-c...

ratsimp(poly);

ratcoef(poly,1);

Calculate

ratcoef

poly:(x-a)*(x-b)*(x-c...

ratcoef(poly,1);

Calculate

ratcoef

poly:(x-a)*(x-b)*(x-c...

ratcoef(poly,x);

Calculate

ratcoef

eq1:Ncg/(sumNo-sumNwo...

eq2:(Nc-Ncg)/(sumNwo+...

eq3:eq1 / eq2 - Kc = 0;

Calculate

ratcoef-ratsimp

poly:(x-a)*(x-b)*(x-c...

ratsimp(poly);

ratcoef(poly,1);

Calculate

ratcoef-ratsimp

poly:(x-a)*(x-b)*(x-c...

ratsimp(poly);

ratcoef(poly,1);

Calculate

ratcoef-ratsimp

poly:(x-a)*(x-b)*(x-c...

ratsimp(poly);

ratcoef(poly,1);

Calculate

ratcoef

s: a*x*2 + b*x + 5;

ratcoef (s, a + b);

Calculate

ratcoef

poly:(x-a)*(x-b)*(x-c...

ratcoef(poly,x);

Calculate