feat: Uneigentliche Integrale berechnen
This commit is contained in:
parent
063e439d5e
commit
d6b1626761
44
src/analysis/task4.py
Normal file
44
src/analysis/task4.py
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# %%
|
||||||
|
# Init
|
||||||
|
import IPython.display as dp
|
||||||
|
import sympy as sp
|
||||||
|
|
||||||
|
sp.init_printing()
|
||||||
|
|
||||||
|
# Symbole
|
||||||
|
x = sp.symbols("x")
|
||||||
|
|
||||||
|
# Parameter
|
||||||
|
funktionen = [
|
||||||
|
sp.E ** (-x),
|
||||||
|
2 ** (-x),
|
||||||
|
1 / x,
|
||||||
|
1 / (x**2),
|
||||||
|
1 / x,
|
||||||
|
1 / (x ** (1 / 2)),
|
||||||
|
sp.E ** (-sp.Abs(x)),
|
||||||
|
1 / (x**2),
|
||||||
|
1 / (1 + x**2),
|
||||||
|
]
|
||||||
|
|
||||||
|
intervalle = [
|
||||||
|
(x, 0, sp.oo),
|
||||||
|
(x, 0, sp.oo),
|
||||||
|
(x, 1, sp.oo),
|
||||||
|
(x, 1, sp.oo),
|
||||||
|
(x, 0, 1),
|
||||||
|
(x, 0, 1),
|
||||||
|
(x, -sp.oo, sp.oo),
|
||||||
|
(x, -sp.oo, sp.oo),
|
||||||
|
(x, -sp.oo, sp.oo),
|
||||||
|
]
|
||||||
|
|
||||||
|
# Berechnungen
|
||||||
|
for f in zip(funktionen, intervalle):
|
||||||
|
symbolic_f = sp.Integral(f[0], f[1])
|
||||||
|
F = sp.integrate(f[0], f[1])
|
||||||
|
|
||||||
|
# Ausgabe
|
||||||
|
dp.display(symbolic_f)
|
||||||
|
dp.display(F)
|
||||||
|
print()
|
||||||
Loading…
x
Reference in New Issue
Block a user