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:

Ratsubst Calculator

Ratsubst

Function: ratsubst (<a>, <b>, <c>) Substitutes <a> for <b> in <c> and returns the resulting expression. <b> may be a sum, product, power, etc.

c*2;
p:x+y+1/(x+y);
ratsubst(z,y+x,p);

ratsubst knows something of the meaning of expressions whereas subst does a purely syntactic substitution. Thus subst (a, x + y, x + y + z) returns x + y + z whereas ratsubst returns z + a.

When radsubstflag is true, ratsubst makes substitutions for radicals in expressions which dont explicitly contain them.

Examples:

          (%i1) ratsubst (a, x*y^2, x^4*y^3 + x^4*y^8);
                                        3      4
          (%o1)                      a x  y + a
          (%i2) cos(x)^4 + cos(x)^3 + cos(x)^2 + cos(x) + 1;
                         4         3         2
          (%o2)       cos (x) + cos (x) + cos (x) + cos(x) + 1
          (%i3) ratsubst (1 - sin(x)^2, cos(x)^2, %);
                      4           2                     2
          (%o3)    sin (x) - 3 sin (x) + cos(x) (2 - sin (x)) + 3
          (%i4) ratsubst (1 - cos(x)^2, sin(x)^2, sin(x)^4);
                                  4           2
          (%o4)                cos (x) - 2 cos (x) + 1
          (%i5) radsubstflag: false$
          (%i6) ratsubst (u, sqrt(x), x);
          (%o6)                           x
          (%i7) radsubstflag: true$
          (%i8) ratsubst (u, sqrt(x), x);
                                          2
          (%o8)                          u

There are also some inexact matches for ratsubst. Try ?? ratsubst to see them.

(%o1)                                true
(%i2) 

Ratsubst Example

Related Examples

ratsubst

eq: (yx+1)*(x^2-y)^2-...

eq1: ratsubst(x^2,a+y...

eq2: ratsubst(a,a-z,eq);

Calculate

ratsubst-solve

f1: N = A / l_p^2;

f2: E = (1/2) * N * k...

f3: E = M * c^2;

Calculate

ratsubst-solve

f1: N = A / l_p^2;

f2: E = (1/2) * N * k...

f3: E = M * c^2;

Calculate

ratsubst-solve-sqrt

Z0: ((x/a) - (b/c))/SE;

Z1: ratsubst(sqrt(p*(...

Z2: ratsubst(((x/a)*a...

Calculate

ratsubst-solve

f1: N = A / l_p^2;

f2: E = (1/2) * N * k...

f3: E = M * c^2;

Calculate

ratsubst-sqrt

Z : (p1 - p2)/SE;

ratsubst(x*p2,p1,Z);

ratsubst(sqrt(p*(1-p)...

Calculate

ratsubst

eq: (yx+1)*(x^2-y)^2-...

eq1: ratsubst(x^2,a+y...

eq2: ratsubst(x^2,a+y...

Calculate

ratsubst-solve

f1: N = A / l_p^2;

f2: E = (1/2) * N * k...

f3: E = M * c^2;

Calculate

ratsubst-solve

f1: N = A / l_p^2;

f2: E = (1/2) * N * k...

f3: E = M * c^2;

Calculate

ratsubst-solve

f1: N = A / l_p^2;

f2: E = (1/2) * N * k...

f3: E = M * c^2;

Calculate