You are a guest. Restricted access. Read more.
SCaVis manual

SimPy is a pure Python library and this means you might find it a bit slower than using the pure-Java calculations based on Jasymca. Let us show a simple SymPy example. Start SCaVis IDE and type:

>>> from sympy import *
>>> var('x y')
>>> Rational(3,2)*pi + exp(I*x) / (x**2 + y)

The output of this code is

(3/2)*pi + 1/(y + x**2)*exp(I*x)

Look at other SymPy example in this wiki.

Check out a few other examples:

Calculate an integral
>>> from sympy import *
>>> var('x')
>>> integrate(x**2 * cos(x), x)

The output is:

-2*sin(x) + x**2*sin(x) + 2*x*cos(x)
Solve an equation
>>> from sympy import *
>>> var('x y')
>>> solve([Eq(x + 5*y, 2), Eq(-3*x + 6*y, 15)], [x, y])

The output is:

{x: -3, y: 1}
man/symbolic/sympy/introduction.txt · Last modified: 2013/05/31 16:11 (external edit)
CC Attribution-Share Alike 3.0 Unported
Powered by PHP Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 Valid HTML5