sympy/sympy — pull request #1316 by Krastanov (2012-05-26 23:45:33+00:00)
Title: Vector analysis 2

Half of these commits are already in my previous pull request.

Work on itegral curves in the differential geometry module.

Two new functions were added to the differential geometry module that deal with
integral curves. Tests for these functions are supplied.

Integral curves are inherently represented in coordinate dependent way because
there is no coordinate independent way to present movement from point to point
on a general manifold (i.e. there is no such thing as difference between two
points).

The first function is `intcurve_series`. It produces the series expantion of an
integral curve when given the starting point and the coordinate system in which
it must work.

Specify a starting point and a vector field:
>>> start_point = R2_r.point([x, y])
>>> vector_field = R2_r.d_dx

Calculate the series:
>>> series = intcurve_series(vector_field, t, start_point, n=3)
>>> series[0]
[x]
[y]
>>> series[1]
[t]
[0]
>>> series[2]
[0]
[0]

The second function is `intcurve_diffequ` that works in the same way as the
first one, however it returns a system of differential equations describing the
integral curve.

Specify a starting point and a vector field:
>>> start_point = R2_r.point([1, 0])
>>> vector_field = -R2.y*R2.d_dx + R2.x*R2.d_dy

Get the equation:
>>> equations, init_cond = intcurve_diffequ(vector_field, t, start_point)
>>> equations
[f_1(t) + Derivative(f_0(t), t), -f_0(t) + Derivative(f_1(t), t)]