### The Maxima on-line user's manual

Algebra Calculator

#### Ratsimp

Function: ratsimp (<expr>)

Function: ratsimp (<expr>, <x_1>, ..., <x_n>) Simplifies the expression <expr> and all of its subexpressions, including the arguments to non-rational functions. The result is returned as the quotient of two polynomials in a recursive form, that is, the coefficients of the main variable are polynomials in the other variables. Variables may include non-rational functions (e.g., sin (x^2 + 1)) and the arguments to any such functions are also rationally simplified.

ratsimp (<expr>, <x_1>, ..., <x_n>) enables rational simplification with the specification of variable ordering as in ratvars.

When ratsimpexpons is true, ratsimp is applied to the exponents of expressions during simplification.

See also ratexpand. Note that ratsimp is affected by some of the flags which affect ratexpand.

Examples:

(%i1) sin (x/(x^2 + x)) = exp ((log(x) + 1)^2 - log(x)^2);
2      2
x         (log(x) + 1)  - log (x)
(%o1)        sin(------) = %e
2
x  + x
(%i2) ratsimp (%);
1          2
(%o2)                  sin(-----) = %e x
x + 1
(%i3) ((x - 1)^(3/2) - (x + 1)*sqrt(x - 1))/sqrt((x - 1)*(x + 1));
3/2
(x - 1)    - sqrt(x - 1) (x + 1)
(%o3)           --------------------------------
sqrt((x - 1) (x + 1))
(%i4) ratsimp (%);
2 sqrt(x - 1)
(%o4)                    - -------------
2
sqrt(x  - 1)
(%i5) x^(a + 1/a), ratsimpexpons: true;
2
a  + 1
------
a
(%o5)                        x

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

(%o1)                                true
(%i2)

### Related Examples

##### ratsimp-rhs-solve

Np(p):=1+(p0-p)/e;

Ng(p,Nq) := kp * Np(p...

Sp:solve(Ng(x,1)=Ng(p...

Calculate

##### ratsimp-sqrt

ratsimp(sqrt(2*c11*c2...

Calculate

A: k^2/(k^2-1);

ratsimp(A);

Calculate

##### ratsimp

ratsimp(2/(a-2)-2/(a+...

Calculate

##### ratsimp-xthru

a: 1/(c-d)-c/(c^2-d^2...

xthru(a);

b:ratsimp(a);

Calculate

##### ratsimp-solve-sqrt

y:sqrt(169-(13-v*t/60...

ratsimp(y);

solve(sqrt(1560*v*t-t...

Calculate

##### ratsimp-sqrt

c:17*79*1009*2351/(2*...

e:(40*c+64-32*sqrt((c...

g:sqrt(e/2);

Calculate

##### ratsimp

f(x,a):=(x/a+a/x)/2;

a: ratsimp(f(x,2));

b: ratsimp(f(a,2));

Calculate

##### ratsimp

ratsimp((131004903667...

Calculate

##### ratsimp-risch-sqrt-subst

xgtr1:d - (d/r_1)*(sq...

ratsimp(subst(t = 2*y...

Calculate