Did I find the right examples for you? yes no

# sympy.matrices.wronskian

All Samples(18)  |  Call(14)  |  Derive(0)  |  Import(4)
```Compute Wronskian for [] of functions

| f1    f2     ...   fn  |
| f1'   f2'    ...   fn' |
|  .     .     .      .  |
W(f1,...,fn) = |  .     .      .     .  |
|  .     .       .    .  |
|  n     n           n   |
| D(f1) D(f2)  ...  D(fn)|
(more...)
```

```        def wronskian(functions, var, method='bareis'):
"""Compute Wronskian for [] of functions

| f1    f2     ...   fn  |
| f1'   f2'    ...   fn' |
|  .     .     .      .  |
W(f1,...,fn) = |  .     .      .     .  |
|  .     .       .    .  |
|  n     n           n   |
| D(f1) D(f2)  ...  D(fn)|

see: http://en.wikipedia.org/wiki/Wronskian
"""

for index in xrange(0, len(functions)):
functions[index] = sympify(functions[index])
n = len(functions)
if n == 0:
return 1
W = Matrix(n, n, lambda i,j: functions[i].diff(var, j) )
return W.det(method)
```

```
from sympy.functions import cos, exp, im, log, re, sin, tan, sqrt, sign, Piecewise
from sympy.matrices import wronskian
from sympy.polys import Poly, RootOf, terms_gcd, PolynomialError
from sympy.polys.polytools import cancel, degree, div
```
```    gensols = r['list']
gsol = r['sol']
wr = wronskian(gensols, x)

if r.get('simplify', True):
```
```    negoneterm = (-1)**(order)
for i in gensols:
psol += negoneterm*C.Integral(wronskian([sol for sol in gensols if sol != i], x)*r[-1]/wr, x)*i/r[order]
negoneterm *= -1

```

```
from sympy.functions import cos, exp, im, log, re, sin, sign
from sympy.matrices import wronskian
from sympy.polys import RootsOf, discriminant, RootOf
from sympy.series import Order
```
```    gensols = r['list']
gsol = r['sol']
wr = wronskian(gensols, x)

if r.get('simplify', True):
```
```    negoneterm = (-1)**(order)
for i in gensols:
psol += negoneterm*C.Integral(wronskian(filter(lambda x: x != i, \
gensols), x)*r[-1]/wr, x)*i/r[order]
negoneterm *= -1
```

```from sympy.matrices.matrices import (ShapeError, MatrixError,
NonSquareMatrixError, DeferredVector)
from sympy.matrices import (
GramSchmidt, ImmutableMatrix, ImmutableSparseMatrix, Matrix,
SparseMatrix, casoratian, diag, eye, hessian,
```
```def test_wronskian():
assert wronskian([cos(x), sin(x)], x) == cos(x)**2 + sin(x)**2
assert wronskian([exp(x), exp(2*x)], x) == exp(3*x)
assert wronskian([exp(x), x], x) == exp(x) - x*exp(x)
assert wronskian([1, x, x**2], x) == 2
```

```from sympy.matrices.matrices import (ShapeError, MatrixError,
NonSquareMatrixError, DeferredVector)
from sympy.matrices import (
GramSchmidt, ImmutableMatrix, ImmutableSparseMatrix, Matrix,
SparseMatrix, casoratian, diag, eye, hessian,
```
```def test_wronskian():
assert wronskian([cos(x), sin(x)], x) == cos(x)**2 + sin(x)**2
assert wronskian([exp(x), exp(2*x)], x) == exp(3*x)
assert wronskian([exp(x), x], x) == exp(x) - x*exp(x)
assert wronskian([1, x, x**2], x) == 2
```