In [ ]:

```
from sympy import *
init_printing()
```

In [ ]:

```
var('x y z a')
```

Use the function solve to resolve equations (the right hand side is always 0).

In [ ]:

```
solve(x**2 - a, x)
```

In [ ]:

```
x = Symbol('x')
solve_univariate_inequality(x**2 > 4, x)
```

This function also accepts systems of equations (here a linear system).

In [ ]:

```
solve([x + 2*y + 1, x - 3*y - 2], x, y)
```

Non-linear systems are also supported.

In [ ]:

```
solve([x**2 + y**2 - 1, x**2 - y**2 - S(1)/2], x, y)
```

In [ ]:

```
solve([x + 2*y + 1, -x - 2*y - 1], x, y)
```

Now, let's solve a linear system using matrices with symbolic variables.

In [ ]:

```
var('a b c d u v')
```

In [ ]:

```
M = Matrix([[a, b, u], [c, d, v]]); M
```

In [ ]:

```
solve_linear_system(M, x, y)
```

In [ ]:

```
det(M[:2,:2])
```

You'll find all the explanations, figures, references, and much more in the book (to be released later this summer).

IPython Cookbook, by Cyrille Rossant, Packt Publishing, 2014 (500 pages).