Abgeschlossen: Serie 3 Aufgabe 6: Grenzwerte berechnen

This commit is contained in:
Sandro Zimmermann 2026-10-04 15:17:45 +02:00
parent 8615beff5f
commit 106c8af867

View File

@ -1,6 +1,7 @@
# %%
# Grenzwerte mit python berechnen
import sympy as sp
from IPython.display import display
# Latex printing in interacitve windows initialisieren
sp.init_printing(use_latex=True)
@ -22,15 +23,14 @@ functions = [
(2 + (6 * n**6 / (2 + 3 * n**3)) - 7 * n**3) / (n + (1 + n) ** 3),
]
results = []
for function in functions:
a = sp.limit_seq(function, n) # Grenzwert berechnen
lim = sp.Limit(
function, n, sp.oo
) # erstellt symbolisches limes n -> unendlich funktion
results.append(
sp.Eq(lim, a)
) # erstellt den equation object und fügt ihn zur liste results hinzu
results # symbolische ausgabe
# erstellt symbolisches limes n -> unendlich funktion
lim = sp.Limit(function, n, sp.oo)
# erstellt den equation object
eq = sp.Eq(lim, a)
# Display equation object in interactive window
display(eq)