Lab Report 04
Lab Report 04
(a) 𝑦 = 𝑡2
(c) 𝑦 = 𝑒 2t sin(2𝑡)
import matplotlib.pyplot as
* init_printing()
f1 = t*t
F1=laplace_transform(f1,t,s,noconds = True)
print(F1)
f2 = exp(-a*t)-exp(-3*a*t)
F2 = laplace_transform(f2,t,s,noconds =
True) print(F2)
f3 = exp(2*t)*sin(2*t)
F3 = laplace_transform(f3,t,s,noconds =
True) print(F3)
f4 = exp(3*t)+cos(6*t)-exp(-3*t)*cos(6*t)
F4 = laplace_transform(f4,t,s,noconds =
True) print(F4)
F5 = laplace_transform(f5,t,s,noconds = True)
print(F5)
2. Consider the two functions (𝑡) = 𝑢(𝑡)𝑢(3 − 𝑡) and 𝑔(𝑡) = 𝑢(𝑡) − 𝑢(𝑡 − 3).
(a) Are the two functions identical?
(b) Show that [𝑓(𝑡)] = 𝐿[𝑔(𝑡)]
import matplotlib.pyplot as
* init_printing()
f1 = Heaviside(t)*Heaviside(3-t)
F1 = laplace_transform(f1,t,s,noconds=True)
f2 = Heaviside(t)-Heaviside(t-3)
F2 = laplace_transform(f2,t,s,noconds=True)
print(f1)
print(f2)
print(F1)
print(F2)
3. Using the definition, find [𝑓(𝑡)], if it exists. If the Laplace transform exists then find the
domain of (𝑠).
0, 0 ≤ 𝑡 < 1
f(t)= 𝑡 − 1, 1 ≤ 𝑡 < 2
0, 2 ≤ t
import matplotlib.pyplot as
* init_printing()
f1 = (t-1)*(Heaviside(t-1)-Heaviside(t-2))
F1 = laplace_transform(f1,t,s,noconds =
True) print(f1)
print(F1)
plot(f1)
plot(F1)
import matplotlib.pyplot as plt import numpy as np
from sympy import * init_printing()
t,s = symbols('t, s')
a = symbols('a', real=True, positive=True) f1 = 1/s
F1 = inverse_laplace_transform(f1,s,t) print(F1)
f2 = 10/(s**2 +25) + 4/(s-3)
F2 = inverse_laplace_transform(f2,s,t) print(F2)
f3 = (exp(-3*t)*(2*s+7))/(s**2+16)
F3 = inverse_laplace_transform(f3,s,t) print(F3)
f4 = (s**2 +5*s - 3)/((s**2 +16)*(s-2)) F4 = inverse_laplace_transform(f4,s,t) print(F4)
5. The graph of (𝑡) is given below. Represent (𝑡) as a combination of Heaviside step functions
calculate the Laplace transform of 𝑓(𝑡).
import numpy as np
* init_printing()
t,s = symbols('t,s')
f = (t-2)*Heaviside(t-2)-(t-3)*Heaviside(t-3)-Heaviside(t-4)
print(f)
print(F)
plot(f)
plot(F)