1. Grundlagen

Beispiele aus https://docs.sympy.org/latest/tutorial/intro.html

from sympy import *
init_printing(use_unicode=True) # This will make all further examples pretty print with unicode characters.

1.1. Parameter definieren

x, t, z = symbols('x t z')


Take the derivative of \(sin(x)e^x\).

diff(sin(x)*exp(x), x)


Compute \(∫(e^x sin(x)+e^x cos(x))dx\)

integrate(exp(x)*sin(x) + exp(x)*cos(x), x)

Compute \(\int_{∞}^{−∞}sin(x^2)dx\)

integrate(sin(x**2), (x, -oo, oo))

Gleichung lösen

Solve \(x^2−2=0\)

solve(x**2 - 2, x)

Differentialgleichung lösen

Solve the differential equation \(y′′−y=e^t\)

y = Function('y')
dsolve(Eq(y(t).diff(t, t) - y(t), exp(t)), y(t))