Chapter 3 Asolutions

You might also like

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

Appendix 3A – Problem Solutions

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

graph the function f t . af


To invert this transform, we must use the transform for a translated function:

L( f ( t − t 0 )) = exp( − t 0 s ) f ( s )

With this relationship we find:

f ( t ) = u( t ) + ( t − 1)u( t − 1) − ( t − 2)u( t − 2) − u( t − 3)

Or, using MATLAB


syms s t
ilaplace(1/s+exp(-s)/s^2-exp(-2*s)/s^2-exp(-3*s)/s)

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

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5


t
3A.2. Solve the following equation for y t : af
t dy
−2∫ y (τ ) dτ = + 3y , y ( 0) = 1
0 dt
Taking the Laplace Transform:
y ( s)
= sy ( s ) − y (0) = sy ( s ) − 1
s
s
y ( s) = 2
s −1
y (t ) = cosh(t )

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)

The Laplace Transform of f is:


e − s e −2 s e −3 s e−3s e−5 s
f ( s) = + 2 − 2 − −
s s s s s
We can graph f(t) using MATLAB.

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

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5


t

3A.4. Sketch the following functions:


af af a f a f
a) f t = u t − 2u t − 1 + u t − 3
Using MATLAB to graph,
f=heaviside(t)-2*heaviside(t-1)+heaviside(t-3);
ezplot(f,[0,5]),title('Problem 3A.4a'),ylabel('f(t)'),grid

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

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5


t
af
3A.6. Determine f t at t = 1.5 and at t = 3 for the following function:
af af a f a fa f
f t = 0.5u t − 0.5u t − 1 + t − 3 u t − 2
Generating the graph with MATLAB:
f=0.5*heaviside(t)-0.5*heaviside(t-1)+(t-3)*heaviside(t-2);
ezplot(f,[0,5]),title('Problem 3A.5'),ylabel('f(t)'),grid

Problem 3A.6

1.5

0.5
f(t)

-0.5

-1

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5


t

From the graph, f (1.5) = 0 and f (3) = 0 .


1 dx
3A.7 For the following ODE: + x = f (t ) , x(0) = 0 ,
2 dt
a) use f (t ) from Problem 3A.1 and determine x(t). Plot f(t) and x(t) on the same
graph.
dsolve('0.5*Dx+x=heaviside(t-1)*(t-1)-heaviside(t-2)*(t-2)+heaviside(3-
t)','x(0)=0')
ans =
-3/2*heaviside(t-1)+heaviside(t-1)*t+1/2*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-heaviside(t-3)+heaviside(t-3)*exp(-2*t+6)-exp(-2*t)
pretty(ans)

- 3/2 heaviside(t - 1) + heaviside(t - 1) t

+ 1/2 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

- heaviside(t - 3) + heaviside(t - 3) exp(-2 t + 6) - exp(-2 t)

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

Consider the first term on the RHS initially:


2 A B −1 1
= + = +
( s + 2) s s + 2 s s + 2 s
this will invert to:
First _ Term → (1 − e −2t )u (t )

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

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5


t
f) use f (t ) from Problem 3A.6 and determine x(t). Plot f(t) and x(t) on the same
graph
f=0.5*heaviside(t)-0.5*heaviside(t-1)+(t-3)*heaviside(t-2);
dsolve('0.5*Dx+x=0.5*heaviside(t)-0.5*heaviside(t-1)+(t-3)*heaviside(t-
2)','x(0)=0')
ans =
1/2*heaviside(t)-1/2*exp(-2*t)*heaviside(t)-1/2*heaviside(t-
1)+1/2*heaviside(t-1)*exp(-2*t+2)-7/2*heaviside(t-2)+t*heaviside(t-
2)+3/2*heaviside(t-2)*exp(-2*t+4)
pretty(ans)
1/2 heaviside(t) - 1/2 exp(-2 t) heaviside(t) - 1/2 heaviside(t - 1)

+ 1/2 heaviside(t - 1) exp(-2 t + 2) - 7/2 heaviside(t - 2)

+ t heaviside(t - 2) + 3/2 heaviside(t - 2) exp(-2 t + 4)


ezplot(ans,[0,5]),title('Problem 3A.7f'),ylabel('x(t) or f(t)')
hold on
ezplot(f,[0,5]),title('Problem 3A.7f'),ylabel('x(t) or f(t)')
grid

Problem 3A.7f

1.5

1
x(t) or f(t)

0.5

-0.5

-1

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5


t
3A.8 Use the Final Value Theorem to predict the final values for the ODE's in Problem
2.3. Verify your answers using the time domain solutions obtained in Problem 3.16.

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)

3A.10 For the following transforms, find lim f (t )


t →∞

1
a) f ( s) =
s ( s + 1) 2

lim lim lim


f (t ) = sf ( s ) = sf ( s) = 1
t →∞ s→0 s→0

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

L {∫ cosh ktdt} = 1s L {cosh kt} = 1s ⎡⎣⎢ s 2


s ⎤
2⎥
−k ⎦
⎧1
⎩k

= L ⎨ sinh kt ⎬

k
∴ L {sinh kt} =
s − k2
2

3A.12 Transform the following function, f (t ) = 5e −2t t sin(3t ) .


From an expanded table of Laplace Transforms (CRC Standard Mathematical Tables for
example),
2as
L {t sin at} = 2
(s + a 2 )2
6s
so, L {t sin 3t} = 2 2 2
(s + 3 )
and noting that the desired function multiplied by e −5t , we can replace all the s's by (s+5), making use
of the translation of a transform property:
30( s + 2)
{ }
L 5e −5t t sin 3t =
(( s + 2) 2 + 32 ) 2
We can also use MATLAB:
syms s t
laplace(5*exp(-2*t)*t*sin(3*t))
ans =
30*(s+2)/(s^2+4*s+13)^2
pretty(ans)

s + 2
30 ----------------
2 2
(s + 4 s + 13)

You might also like