Chapter 3 Asolutions
Chapter 3 Asolutions
af
3A.1. If a forcing function f t has the Laplace transform
1 exp( − s ) − exp( −2s ) exp( −3s )
f ( s) = + −
s s2 s
L( f ( t − t 0 )) = exp( − t 0 s ) f ( s )
f ( t ) = u( t ) + ( t − 1)u( t − 1) − ( t − 2)u( t − 2) − u( t − 3)
ans =
heaviside(t-1)*(t-1)-heaviside(t-2)*(t-2)+heaviside(3-t)
where heaviside(t)=u(t).
ezplot(ans,[-1,5]),title('Problem 3A.1'),ylabel('f(t)')
Problem 3A.1
1.8
1.6
f(t)
1.4
1.2
3A.3. Express the function given in Fig. P3A-3 in the t-domain and the s-domain.
Figure P3A.3
By inspection, the first contribution is a step change at t=1, u(t-1). Then, a ramp (t-2)u(t-
2) is added at t=2. Then, the same function is subtracted at t=3, -(t-3)u(t-3), which would
level the function out at f=2, for t>3. We also need to subtract an additional step at t=3 to
reduce f to 1. Finally, a ramp is subtracted, -(t-5)u(t-5), at t=5. Adding these terms, we get
f=u(t-1)+(t-2)u(t-2)-(t-3)u(t-3)-u(t-3)-(t-5)u(t-5)
f=heaviside(t-1)-heaviside(t-5)*(t-5)+(t-2)*(heaviside(t-2)-
heaviside(t-3))
ezplot(f,[0,5]),title('Problem 3A.3'),ylabel('f(t)')
Problem 3A.3
1.8
1.6
1.4
1.2
1
f(t)
0.8
0.6
0.4
0.2
Problem 3A.4a
0.5
0
f(t)
-0.5
-1
-1 0 1 2 3 4 5
t
af af a f a f
b) f t = 3tu t − 3u t − 1 − u t − 2
Using MATLAB to graph,
f=3*t*heaviside(t)-3*heaviside(t-1)-heaviside(t-2);
ezplot(f,[-1,5]),title('Problem 3A.4b'),ylabel('f(t)'),grid
Problem 3A.4b
12
10
6
f(t)
-1 0 1 2 3 4 5
t
af
3A.5. The function f t has the Laplace transform
af c h
f s = 1 − 2e − s + e −2 s / s 2
Obtain the function f at f and graph f at f .
ilaplace((1-2*exp(-s)+exp(-2*s))/s^2)
ans =
t-2*heaviside(t-1)*(t-1)+heaviside(t-2)*(t-2)
Which is:
f (t ) = tu (t ) − 2(t − 1)u (t − 1) + (t − 2)u (t − 2)
ezplot(ans,[0,5]),title('Problem 3A.5'),ylabel('f(t)'),grid
Problem 3A.5
0.9
0.8
0.7
0.6
0.5
f(t)
0.4
0.3
0.2
0.1
Problem 3A.6
1.5
0.5
f(t)
-0.5
-1
Which is:
1 1 1 1
x(t ) = (1 − e−2t )u (t ) − (1 − e −2(t −3) )u (t − 3) + ( e−2(t −1) − + (t − 1))u (t − 1) − ( e−2(t − 2) − + (t − 2))u (t − 2)
2 2 2 2
Problem 3A.7a
1.9
1.8
1.7
1.6
x(t) or f(t)
1.5
1.4
1.3
1.2
1.1
0 1 2 3 4 5 6 7 8 9 10
t
Or, solving by hand:
1 dx
+ x = f (t )
2 dt
1 1 e− s − e −2 s e −3 s
sx( s) + x( s) = F ( s ) = + −
2 s s2 s
−s −2 s −3 s
1 e −e e
x( s ) = + −
(0.5s + 1) s (0.5s + 1) s (0.5s + 1) s
2
The third term on the RHS is the same as the first, just delayed by 3 time units:
Third _ Term → (1 − e −2(t −3) )u (t − 3)
Now for the second term (ignore the delays in the numerator for now):
1 A B C 0.5 0.5 1
= + + 2 = − +
(0.5s + 1) s 2
s+2 s s s + 2 s s2
the undelayed response is thus:
(0.5e−2t − 0.5 + t )u (t )
We must now account for the two delay terms in the numerator of the second term:
e− s : (0.5e−2( t −1) − 0.5 + (t − 1))u (t − 1)
e−2 s : (0.5e−2( t − 2) − 0.5 + (t − 2))u (t − 2)
So, the final answer is:
x(t ) = (1 − e −2t )u (t ) − (1 − e−2( t −3) )u (t − 3) + (0.5e −2( t −1) − 0.5 + (t − 1))u (t − 1) − (0.5e−2( t − 2) − 0.5 + (t − 2))u (t − 2)
b) use f (t ) from Problem 3A.3 and determine x(t). Plot f(t) and x(t) on the same
graph
dsolve('0.5*Dx+x=heaviside(t-1)-heaviside(t-5)*(t-5)+(t-
2)*(heaviside(t-2)-heaviside(t-3))','x(0)=0')
ans =
heaviside(t-1)-heaviside(t-1)*exp(-2*t+2)+11/2*heaviside(t-5)-
heaviside(t-5)*t-1/2*heaviside(t-5)*exp(-2*t+10)-5/2*heaviside(t-2)
+t*heaviside(t-2)+1/2*heaviside(t-2)*exp(-2*t+4)+5/2*heaviside(t-3)-
t*heaviside(t-3)+1/2*heaviside(t-3)*exp(-2*t+6)
pretty(ans)
heaviside(t - 1)- heaviside(t - 1)exp(-2 t + 2) + 11/2 heaviside(t - 5)
- heaviside(t - 5) t - 1/2 heaviside(t - 5) exp(-2 t + 10)
- 5/2 heaviside(t - 2) + t heaviside(t - 2)
+ 1/2 heaviside(t - 2) exp(-2 t + 4) + 5/2 heaviside(t - 3)
- t heaviside(t - 3) + 1/2 heaviside(t - 3) exp(-2 t + 6)
f =heaviside(t-1)-heaviside(t-5)*(t-5)+(t-2)*(heaviside(t-2)-
heaviside(t-3))
ezplot(ans,[-0.5,10]),title('Problem 3A.7b'),ylabel('x(t) or f(t)')
hold on
ezplot(f,[-0.5,10]),title('Problem 3A.7b'),ylabel('x(t) or f(t)')
grid
hold off
Problem 3A.7b
0
x(t) or f(t)
-1
-2
-3
-4
0 1 2 3 4 5 6 7 8 9 10
t
c) use f (t ) from Problem 3A.4a and determine x(t). Plot f(t) and x(t) on the same
graph
f=heaviside(t)-2*heaviside(t-1)+heaviside(t-3);
dsolve('0.5*Dx+x=heaviside(t)-2*heaviside(t-1)+heaviside(t-
3)','x(0)=0')
ans =
heaviside(t)-exp(-2*t)*heaviside(t)-2*heaviside(t-1)+2*heaviside(t-
1)*exp(-2*t+2)+heaviside(t-3)-heaviside(t-3)*exp(-2*t+6)
ezplot(ans,[-0.5,10]),title('Problem 3A.7c'),ylabel('x(t) or f(t)')
hold on
ezplot(f,[-0.5,10]),title('Problem 3A.7c'),ylabel('x(t) or f(t)'),grid
grid
Problem 3A.7c
1
0.8
0.6
0.4
0.2
x(t) or f(t)
-0.2
-0.4
-0.6
-0.8
-1
0 1 2 3 4 5 6 7 8 9 10
t
d) use f (t ) from Problem 3A.4b and determine x(t). Plot f(t) and x(t) on the same
graph
f=3*t*heaviside(t)-3*heaviside(t-1)-heaviside(t-2);
dsolve('0.5*Dx+x=3*t*heaviside(t)-3*heaviside(t-1)-heaviside(t-
2)','x(0)=0')
ans =
-3/2*heaviside(t)+3*t*heaviside(t)+3/2*exp(-2*t)*heaviside(t)-
3*heaviside(t-1)+3*heaviside(t-1)*exp(-2*t+2)-heaviside(t-
2)+heaviside(t-2)*exp(-2*t+4)
ezplot(ans,[-0.5,10]),title('Problem 3A.7d'),ylabel('x(t) or f(t)')
hold on
ezplot(f,[-0.5,10]),title('Problem 3A.7d'),ylabel('x(t) or f(t)')
grid
Problem 3A.7d
25
20
15
x(t) or f(t)
10
0 1 2 3 4 5 6 7 8 9 10
t
e) use f (t ) from Problem 3A.5 and determine x(t). Plot f(t) and x(t) on the same
graph
f=t-2*heaviside(t-1)*(t-1)+heaviside(t-2)*(t-2);
dsolve('0.5*Dx+x=t-2*heaviside(t-1)*(t-1)+heaviside(t-2)*(t-
2)','x(0)=0')
ans =
-1/2+t+3*heaviside(t-1)-2*heaviside(t-1)*t-heaviside(t-1)*exp(-2*t+2)-
5/2*heaviside(t-2)+t*heaviside(t-2)+1/2*heaviside(t-2)*exp(-
2*t+4)+1/2*exp(-2*t)
ezplot(ans,[0,5]),title('Problem 3A.7e'),ylabel('x(t) or f(t)')
hold on
ezplot(f,[0,5]),title('Problem 3A.7e'),ylabel('x(t) or f(t)')
grid
Problem 3A.7e
0.9
0.8
0.7
0.6
x(t) or f(t)
0.5
0.4
0.3
0.2
0.1
Problem 3A.7f
1.5
1
x(t) or f(t)
0.5
-0.5
-1
3A.9 Find and sketch the solution to the following differential equations using Laplace
Transforms.
a) y′ + y = δ (t ) , y (0) = 0
1
y ( s) =
s +1
y (t ) = e −t u (t )
b) y′ + y = δ (t − 1) , y (0) = 0
e− s
y ( s) =
s +1
y (t ) = e −( t −1)u (t − 1)
c) y′ + y = u (t ) , y (0) = 0
1 1 1
y ( s) = = −
s ( s + 1) s s + 1
y (t ) = 1 − e −t
d) y′ + y = u (t − 1) , y (0) = 0
e− s e− s e− s
y ( s) = = −
s ( s + 1) s s +1
y (t ) = (1 − e−( t −1) )u (t − 1)
1
a) f ( s) =
s ( s + 1) 2
1
b) f ( s) =
s ( s − 1) 2
Final value theorem does not apply, because of pole in the RHP (s=1).
f (t ) → ∞ as t → ∞ , because of exp(t) terms in the solution.
3A.11 Use the formula for the Laplace Transform of an integral to find L {sinh(kt )} if
s
you are given L {cosh(kt )} = .
s − k2 2
1 1
∫ cosh ktdt = k ∫ cosh ktu (kdt
du
) = sinh kt
k
s + 2
30 ----------------
2 2
(s + 4 s + 13)