Laboratorijske vaje Matematika 4
2. Vaja Laplaceova transformacija
B. Jurˇciˇc Zlobec1
1Univerza v Ljubljani, Fakulteta za Elektrotehniko 1000 Ljubljana, Trˇzaˇska 25, Slovenija
Matematika 4 FE, Ljubljana, 14. marec 2013
Lapalaceova transformacija
S pomoˇcjo integrala poiˇsˇci Laplaceovo transformacijo funkcije f(t) =t2
f[t_]=t^2;
Integrate[f[t] Exp[-s t],{t,0,Infinity}, Assumptions->{s>0}]
2/s^3
Poiˇsˇci Laplaceovo transformacijo funkcije f(t) s pomoˇcjo Mathematice
LaplaceTransform[f[t],t,s]}
InverseLaplaceTransform[%,s,t]
2/s^3 t^2
Laplaceova transformacija
Poiˇsˇci Laplaceovo transformacijo funkcij:
f(t) ={1,t,eat,sin(at),cos(at)}
LaplaceTransform[{1, t, t^n, Exp[a t], Sin[ a t], Cos[a t]}, t, s]
FullSimplify[Gamma[n + 1], Assumptions ->
{n \[Element] Integers, n > 0}]
{1/s, 1/s^2, s^(-1 - n) Gamma[1 + n],
1/(-a + s), a/(a^2 + s^2), s/(a^2 + s^2)}
n!
Pravila prema transformacija
Laplaceova transformacija odvoda LaplaceTransform[D[f[t],t],t,s]
-f[0] + s LaplaceTransform[f[t], t, s]
Laplaceova transformacija integrala
LaplaceTransform[Integrate[f[u],{u,0,t}],t,s]
LaplaceTransform[f[t], t, s]/s
Laplaceova transformacija konvolucije (pregiba)
LaplaceTransform[Integrate[f[u]g[t-u],{u,0,t}],t,s]
LaplaceTransform[f[t], t, s] LaplaceTransform[g[t], t, s]
Pravila za inverzno (obratno) transformacijo
Inverzna transformacija odvoda
InverseLaplaceTransform[D[F[s], s], s, t]
-t InverseLaplaceTransform[F[s], s, t]
Inverzna transformacija integrala InverseLaplaceTransform[
Integrate[F[u],{u,s,Infinity}], s, t]
InverseLaplaceTransform[F[s], s, t]/t
Izraˇ cunaj inverzno Lapaceovo transformacijo funkcije F (s ) =
(s2+1)s 2Z ukazomInverseLaplaceTransform
InverseLaplaceTransform[s/(s^2+1)^2,s,t]
S pomoˇcjo pravila o konvoluciji
f[t_]=InverseLaplaceTransform[1/(s^2+1),s,t]}
g[t_]=InverseLaplaceTransform[s/(s^2+1),s,t]
Integrate[f[u] g[t-u],{u,0,t}]
1/2 t Sin[t]
Doloˇ ci Laplaceovo transformacijo funkcije f (t − a).
f(t−a),a>0, inf(t) =
(t 0≤t≤1 2−t 1<t≤2.
f[t_]=Piecewise[{{t,0<=t<=1},{2-t,1<t<=2}},0];
LaplaceTransform[f[t-a],t,s,
Assumptions->{a>0}]//FullSimplify (E^(-(2 + a) s) (-1 + E^s)^2)/s^2
Reˇsi diferencialno enaˇ cbo
¨
x(t) + 2 ˙x(t) + 3x(t) = sin(t), x(0) = 0, ˙x(0) = 1 LaplaceTransform[x’’[t] + 2 x’[t] + 3 x[t] ==
Sin[t], t, s] /. x[0] -> 0 /. x’[0] -> 1 Solve[%, LaplaceTransform[x[t], t, s]]
InverseLaplaceTransform[%, s, t]
Reˇsi robni problem
¨
x(t) + 2 ˙x(t) + 3x(t) = sin(t), x(0) = 0, x(1) = 1
LaplaceTransform[x’’[t] + 2 x’[t] + 3 x[t]==Sin[t], t, s]/. x[0] -> 0 /. x’[0] -> a
Solve[%, LaplaceTransform[x[t], t, s]]
f = InverseLaplaceTransform[%, s, t]
Solve[(x[t] /. % /. t -> 1) == 1, a] // N f /. % /. t -> 2
Naloge:
Reˇsi diferencialno enaˇcbo
¨
x(t) + 2 ˙x(t)−3x(t) =e−t,
pri zaˇcetnih pogojih x(0) = 0 in ˙x(0) = 1. Koliko jex(1)?
Rezultat: 0.921126
Reˇsi sistem diferencialnih enaˇcb
˙
x(t) =y(t)−z(t), ˙y(t) =x(t) +z(t) in ˙z(t) =y(t)−x(t), pri zaˇcetnih pogojih x(0) = 1, y(0) = 2 inz(0) = 3.
Koliko jex(1/2)?
Razultat: 0.794827
Poiˇsˇ ci funkcijo x(t ), ki reˇsi integralsko enaˇ cbo.
Koliko je x(1/2).
x(t) = 1 + 1/2 Z t
0
sin(2(t−u))x(u)du.
InverseLaplaceTransform[
Solve[LaplaceTransform[
x[t] == 1 + 1/2 Integrate[Sin[2 (t - u)] x[u], {u,0,t}], t, s], LaplaceTransform[x[t], t, s]], s, t] /. t -> 0.5
Rezultat: 1.11738