Maxima can be used as a powerful calucator:

`144*17 - 9;`

2439

Maxima can compute with very large numbers. The following expample
computes the 25^{th} power of 144:

```
144^25;
910043815000214977332758527534256632492715260325658624
```

This is more than a pocket calculator can do!

Now we compute the 25^{th} root of that result:

` %^(1/25);`

The percent sign is a special variable, its value is always the last result. The arrow is the exponentiation operator. In our input we have to use some elementary mathematical knowledge: We write the root as a power with a fractional exponent. We obtain this answer:

144

But computer algebra is more than just computation with numbers. It is computation with symbols.

Let us play with a polynomial in two variables:

(%i1) (x + 2*y)^4; 4 (%o1) (x + 2 y) (%i2) expand(%); 4 3 2 2 3 4 (%o2) 16 y + 32 x y + 24 x y + 8 x y + x (%i3) factor(%); 4 (%o3) (x + 2 y)

Explanations to this session:

- The command expand causes products of sums and exponentiated sums to be multiplied out.
- The command factor factors its argument into factors that are irreducible over the integers.

Maxima can compute derivatives:

(%i4) diff(sin(x)*cos(x), x); 2 2 (%o4) cos (x) - sin (x) (%i5) trigsimp(%); 2 (%o5) 2 cos (x) - 1 (%i6) diff(%, x); (%o6) - 4 cos(x) sin(x) (%i7) diff(sin(x)*cos(x), x, 2); (%o7) - 4 cos(x) sin(x)

Explanations to this session:

The command diff computes the derivative of its first argument with respect to its second argument.

The command trigsimp is one of several function to rewrite trigonometric and hyperbolic expressions. Specifically, trigsimp uses the identities

`$$\begin{array}{l}{\mathrm{sin}}^{2}\left(x\right)+{\mathrm{cos}}^{2}\left(x\right)=1\\ {\mathrm{cosh}}^{2}\left(x\right)-{\mathrm{sinh}}^{2}\left(x\right)=1\end{array}$$`

to reduce the number of different kinds of trigonometric (or hyperbolic) functions in an expression.

The input labelled

**(%i6)**asks for the computation of the derivative of the result labelled with**(%o5)**.The input labelled

**(%i7)**demonstrates a way to immediately compute the second derivative of the expression from input**(%i4)**. It is not a surprise that the results shown in fields**(%o6)**and**(%07)**agree.

As mentioned, Maxima provides serveral function to rewrite trigonometric and hyperbolic expressions in different ways.

Maxima can rewrite trigonometric expressions in a canonical form, namely as finite Fourier sums:

```
(%i8) trigreduce(sin(x)^5);
10 sin(x) - 5 sin(3 x) + sin(5 x)
(%o8) ---------------------------------
16
```

Maxima can compute indefinite integrals:

```
(%i10) integrate((x + 1)/(x^3 - 8), x);
2 + 2 x
2 atan(---------)
log(x + 2 x + 4) 2 sqrt(3) log(x - 2)
(%o10) (- -----------------) + --------------- + ----------
8 4 sqrt(3) 4
```

Here is a longer example that shows that Maxima can compute quite complicated integrals and can also often reconstruct the given integrand:

(%i11) assume(m > 4); (%o11) [m > 4] (%i12) integrate(x^m*(a + b*x)^3, x); 3 m + 4 2 m + 3 2 m + 2 3 m + 1 b x 3 a b x 3 a b x a x (%o12) --------- + ------------- + ------------- + --------- m + 4 m + 3 m + 2 m + 1 (%i13) diff(%, x); 3 m + 3 2 m + 2 2 m + 1 3 m (%o13) b x + 3 a b x + 3 a b x + a x (%i14) factor(%); m 3 (%o14) x (a + b x)

Maxima can do a lot of other things, some of which are shown in greater detail in other sections of this tutorial.