Tarea s13 Laplace

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

from sympy import symbols, laplace_transform, Heaviside, exp, sin, cos, plot

# Definir las variables simbólicas


t, s = symbols('t s')

# Ejemplo de funciones
f1 = 4*t**2 - 3*exp(2*t) # Función 4t^2-3e^2t
f3 = t * exp(-3*t) # Función t*e^-3t
f5 = exp(2*t) * sin(5*t) # Función (e^2t)*sin(5t)
f7 = exp(4*t) + cos(2*t) # Función e^(4t)+cos(2t)
f9 = (t + 3) * Heaviside(t - 3) # Función (t + 3)u(t - 3) con escalón unitario

# Calcular las transformadas de Laplace


L_f1 = laplace_transform(f1, t, s)
L_f3 = laplace_transform(f3, t, s)
L_f5 = laplace_transform(f5, t, s)
L_f7 = laplace_transform(f7, t, s)
L_f9 = laplace_transform(f9, t, s)

# Imprimir los resultados


print("L{4t^2-3e^2t} : F(s) =", L_f1[0])
print("L{t*e^-3t} : F(s) =", L_f3[0])
print("L{(e^2t)*sin(5t)} : F(s) =", L_f5[0])
print("L{e^(4t)+cos(2t)} : F(s) =", L_f7[0])
print("L{(t + 3)u(t - 3)} : F(s) =", L_f9[0])

L{4t^2-3e^2t} : F(s) = -3/(s - 2) + 8/s**3


L{t*e^-3t} : F(s) = (s + 3)**(-2)
L{(e^2t)*sin(5t)} : F(s) = 5/((s - 2)**2 + 25)
L{e^(4t)+cos(2t)} : F(s) = s/(s**2 + 4) + 1/(s - 4)
L{(t + 3)u(t - 3)} : F(s) = (6/s + s**(-2))*exp(-3*s)
Haz doble clic (o pulsa Intro) para editar

You might also like