In [3]:
from sympy import *
x = Symbol('x')
y = Symbol('y')
In [4]:
integrate(x**3, (x, -1, 1))
Out[4]:
In [5]:
integrate( 1/x )
Out[5]:
In [7]:
integrate( 1/(1 +2*x) )
Out[7]:
In [8]:
integrate( 1/(1 - 2*x) )
Out[8]:
In [9]:
solve([x + 5*y - 2, -3*x + 6*y - 15], [x, y])
Out[9]:
In [12]:
f, g = symbols('f g', cls=Function)
In [14]:
f(x).diff(x, x) + f(x)
Out[14]:
In [15]:
dsolve(f(x).diff(x, x) + f(x), f(x))
Out[15]:
In [16]:
dsolve(sin(x)*cos(f(x)) + cos(x)*sin(f(x))*f(x).diff(x), f(x), hint='separable')
Out[16]:
In [17]:
diff(x, x)
Out[17]:
In [19]:
diff(1/x, x)
Out[19]:
In [21]:
diff(1/(2*y), y)
Out[21]:
In [25]:
diff(1/x, x) - diff(1/(2*y), y)
Out[25]:
In [28]:
from __future__ import division
from sympy import *
x, y, z, t = symbols('x y z t')
k, m, n = symbols('k m n', integer=True)
f, g, h = symbols('f g h', cls=Function)
In [30]:
eq = (Eq(Derivative(x(t),t), 12*t*x(t) + 8*y(t)), Eq(Derivative(y(t),t), 21*x(t) + 7*t*y(t)))
eq
Out[30]:
In [31]:
dsolve(eq)
Out[31]:
In [32]:
eq1 = (Eq(Derivative(x(t),t), 12*t*x(t) + 8*y(t)))
eq1
Out[32]:
In [33]:
dsolve(eq1)
Out[33]:
In [56]:
eq1 = (Eq(Derivative(1/x,x)- Derivative((2*y)**(-1), y)))
eq1
Out[56]:
In [57]:
dsolve(eq1)
In [ ]: