Академический Документы
Профессиональный Документы
Культура Документы
L {u ab (t)} =
s
7 Laplace Transforms
L { f (t − p)u(t − p)} = e− ps F(s)
7.6 Transforms of Discontinuous and L { f (t)u(t − p)} = e− ps L { f (t + p)} (s)
Z T
Periodic Functions
g(t)e−st dt
Fri, 03/Mar
2006,
c Art Belmonte L {g(t)} =
G T (s)
= 0
1 − e−sT 1 − e−sT
Summary
Hand Examples
Heaviside function
Example A
The Heaviside unit step function is a piecewise continuous
Find the Laplace transform of e2(t−1) u(t − 1).
function defined by
0, for t < 0;
u(t) = Solution
1, for t ≥ 0.
1
For c ∈ R (typically c > 0), the translate of u is defined by Let f (t) = e2t . Then F(s) = L { f (t)} = . Therefore
s−2
n o
0, for t < c; e−s
u c (t) = u(t − c) = L e2(t−1) u(t − 1) = L { f (t − 1)u(t − 1)} = e−s F(s) = .
1, for t ≥ c. s−2
1
Example E MATLAB Examples
exp(-s)
-------
Example F s - 2
%
echo off; diary off
e−s
Compute the inverse Laplace transform of .
s(s − 2)2
Example B [revisited]
%
Solution % NSS-7.6/Example B
%
syms t
1 1/4 1/4 1/2
Let F(s) = = − + via cpf. Then u1 = heaviside(t-1);
s(s − 2) 2 s s − 2 (s − 2)2 f = exp(-t) * u1; pretty(f)
e−s
f (t) = 14 − 14 e2t + 12 te2t . Thus L−1 is equal to exp(-t) heaviside(t - 1)
s(s − 2)2
F = simple(laplace(f)); pretty(F)
2
y = ilaplace(Ys); pretty(y) % #4
1 - exp(-3 s)
------------- heaviside(t - 1) (1/4 - 1/4 cos(2 t - 2))
2 + (- 1/4 + 1/4 cos(2 t - 4)) heaviside(t - 2)
s %
% t = linspace(0,8);
echo off; diary off y = eval(vectorize(y));
plot(t,y); grid on
xlabel(’t’); ylabel(’y’)
title(’NSS-7.6: Example G’)
Example E [revisited] %
echo off; diary off
%
% NSS-7.6/Example E
%
syms s 396/23 [periodic function, numerically graphed]
F = exp(-2*s) / (s+3); pretty(F)
exp(-2 s) e−t , 0 < t < 1,
Let f (t) = and f has period 2. Plot f (t)
---------
s + 3
1 1 < t < 2,
f = ilaplace(F); pretty(f) for 0 ≤ t ≤ 8, and compute the Laplace transform of f .
heaviside(t - 2) exp(-3 t + 6)
% That is, f(t) = u(t-2) * exp(-3*(t-2)).
% Solution
echo off; diary off
Example G [revisited]
1
%
% NSS-7.6/Example G
%
syms s t Ys 0.5
f
y = sym(’y(t)’)
y =
y(t)
f = heaviside(t-1) - heaviside(t-2);
nde = diff(y,t,2) + 4*y - f; 0
pretty(nde) % #0
/ 2 \
|d | −0.5
|--- y(t)| + 4 y(t) - heaviside(t - 1) + heaviside(t - 2) 0 2 4 6 8
| 2 | t
\dt /
ltde = laplace(nde); % #1
ltde = chiclet(ltde); pretty(ltde)
Now we compute the Laplace transform of f using the theorem
exp(-s) exp(-2 s) for the Laplace transform of a periodic function.
s (s Ys - y(0)) - Dy(0) + 4 Ys - ------- + ---------
s s
eq = subs(ltde, {’y(0)’ ’Dy(0)’}, {0 0}); % #2 %
pretty(eq) % NSS4-396/23
%
2 exp(-s) exp(-2 s) syms s t
s Ys + 4 Ys - ------- + --------- I1 = int(exp(-t)*exp(-s*t), t, 0, 1);
s s pretty(I1)
Ys = solve(eq, Ys); pretty(Ys) % #3
exp(-s - 1) - 1
exp(-s) - exp(-2 s) - ---------------
------------------- s + 1
2 I2 = int(1*exp(-s*t), t, 1, 2);
s (s + 4) pretty(I2)
3
396/28 [YAPF: yet another periodic function]
exp(-2 s) - exp(-s)
- -------------------
s Compute the Laplace transform of this half-rectified sine wave f .
F = (I1+I2) / (1 - exp(-2*s)); pretty(F)
0.5
y
396/26 [periodic function, symbolically graphed]
0
Compute the Laplace transform of the sawtooth wave f shown.
−0.5
NSS4−396/26: Sawtooth Wave
1.5 −1
0 5 10 15
1
t
0.5
f
0
−0.5 Solution
0 a 2a 3a 4a 5a 6a
t
Here is the script M-file that produced the plot.
%
Solution % NSS4-396/28g: Graph of half-rectified sine wave
%
syms k t
First off, here is the script M-file that produced the plot. u = sym(’Heaviside(t)’);
u 2k pi = subs(u, t, t-2*k*pi)
u 2kp1 pi = subs(u, t, t-(2*k+1)*pi)
% f = symsum(sin(t)*(u 2k pi - u 2kp1 pi), k, 0, 2);
% NSS4-396/26g t = linspace(0, 15, 2000);
% ff = eval(vectorize(f));
% Here is a graph of a sawtooth wave! This time we use a plot(t,ff); grid on
% symbolic implementation via Heaviside step functions. axis([0 15 -1 2])
% For graphing purposes, we have chosen the value 1 for the %
% parameter a. echo off; diary off
%
a = 1;
syms k t
u = sym(’Heaviside(t)’); The third time’s the charm. We compute the Laplace transform of
uka = subs(u, t, t-k*a)
ukp1a = subs(u, t, t-(k+1)*a) f using the theorem for the Laplace transform of a periodic
f = symsum((t/a - k)*(uka - ukp1a), k, 0, 5); function.
t = linspace(0, 6, 500);
ff = eval(vectorize(f));
plot(t,ff,’+’); grid on
%
axis equal
% NSS4-396/28
axis([0, 6, -0.5, 1.5])
%
% DIG IT: Custom tickmarks!
syms s t
set(gca,’XTickLabel’,{’0’;’a’;’2a’;’3a’;’4a’;’5a’;’6a’})
F = int(sin(t) * exp(-s*t), t, 0, pi) ...
%
/ (1 - exp(-2*pi*s));
echo off; diary off pretty(F)
1 + exp(pi s)
-------------------------------------
Once again, we compute the Laplace transform of f using the 2
theorem for the Laplace transform of a periodic function. exp(pi s) (s + 1) (1 - exp(-2 pi s))
%
echo off; diary off
%
% NSS4-396/26
%
syms a s t
F = int(t/a * exp(-s*t), t, 0, a) / (1 - exp(-a*s));
397/38 [IVP with discontinuous forcing function]
pretty(F)
00 + 2y 0 + 10y = g(t); y(0) = −1, y 0 (0) = 0. Here
Solve y
exp(-s a) + exp(-s a) s a - 1
- ----------------------------- 10, 0 ≤ t ≤ 10
2
g(t) = 20, 10 < t < 20 .
a s (1 - exp(-s a))
% 0, 20 < t
echo off; diary off Then graph the solution y(t) for 0 ≤ t ≤ 35.
4
Solution opened for the next 10 minutes, delivering a 0.4 kg/L
concentration at 12 L/min. Finally, valve A is shut and valve B is
Formulate g in terms of Heaviside step functions, then do the switched back in. The exit valve C removes brine at a flow rate of
usual 4-step procedure! 12 L/min, thereby keeping the volume constant.
%
Find the concentration c(t) of salt in the tank as a function of
% NSS4-397/38
%
time. Graph c(t) over 0 ≤ t ≤ 30, then again over 30 ≤ t ≤ 400.
syms s t Ys
y = sym(’y(t)’);
u = heaviside(t);
u10 = heaviside(t-10);
u20 = heaviside(t-20);
g = 10*(u-u10) + 20*(u10-u20);
Solution
de0 = diff(y,t,2) + 2*diff(y,t) + 10*y - g;
pretty(de0)
−0.5
0.35
Concentration (kg/L)
−1
0 10 20 30 40
t
0.3
398/62
0.25
A mixing tank initially holds 500 L of a brine solution with a salt
concentration of 0.2 kg/L. For the first 10 minutes of operation,
0.2
valve B is open, adding 12 L/min of brine containing a 0.6 kg/L 0 5 10 15 20 25 30
salt solution. After 10 minutes, valve B is closed and valve A is Time (minutes)
5
NSS4−398/62: Concentration in the long run
0.6
0.55
Concentration (kg/L)
0.5
0.45
0.4
0.35
0.3
0 100 200 300 400
Time (minutes)