26
Chapter 4: Solving Differential Equations using the Laplace Transform In previous chapters we have investigated solving differential equations of the form: ) ( ' 0 1 1 1 t g y a y a y a y a n n n n = + + + + (1) (Note: An n th -order linear non-homogeneous differential equation can be transformed into a non-homogeneous system of n linear, 1 st -order differential equations). We have seen that if the coefficients a n , a n-1 , . . . , a 0 are numbers, we can find the general solution of the above, by first solving the corresponding homogeneous system and then adding the particular solution of the non-homogeneous equation. The degree of difficulty in obtaining a solution for (1), depends on the nature of g(x). If g(x) is a smooth continuous function we have investigated two techniques: i) Method of undetermined coefficients; ii) Method of variation of parameters. On the other hand, if g(x) is a non-smooth function, such as a piecewise-function, solving (1) using the known techniques can become very difficult. In this chapter, we investigate a technique that transforms (1) into an algebraic equation that can often be easily solved, so that the solution to the differential equation can be obtained. It works for smooth and non-smooth functions g(x). Furthermore, the technique is also valid, even if the coefficients of the left had-side of (1) are functions of the independent variable t. The new technique, classified as an integral transformation, is referred to as: Laplace Transform. 4.0 Introduction and Background Information Definition: Let f(t) be a function on the interval [0, ). The Laplace Transform of f(t) is the function (in terms of s ): dt t f e t f L st ) ( )} ( { 0 = Because the Laplace transform yields a function of s, we often use the notation L{ f(t) } = F(s) to denote the Laplace transform of f(t).

Laplace Transformations 2

Embed Size (px)

DESCRIPTION

Continuation to Laplace Transformations -1

Citation preview

Page 1: Laplace Transformations 2

Chapter 4: Solving Differential Equations using the Laplace Transform In previous chapters we have investigated solving differential equations of the form: )(' 01

11 tgyayayaya n

nn

n =++++ −− (1)

(Note: An nth-order linear non-homogeneous differential equation can be transformed into a non-homogeneous system of n linear, 1st-order differential equations). We have seen that if the coefficients an, an-1, . . . , a0 are numbers, we can find the general solution of the above, by first solving the corresponding homogeneous system and then adding the particular solution of the non-homogeneous equation. The degree of difficulty in obtaining a solution for (1), depends on the nature of g(x). If g(x) is a smooth continuous function we have investigated two techniques: i) Method of undetermined coefficients; ii) Method of variation of parameters. On the other hand, if g(x) is a non-smooth function, such as a piecewise-function, solving (1) using the known techniques can become very difficult. In this chapter, we investigate a technique that transforms (1) into an algebraic equation that can often be easily solved, so that the solution to the differential equation can be obtained. It works for smooth and non-smooth functions g(x). Furthermore, the technique is also valid, even if the coefficients of the left had-side of (1) are functions of the independent variable t. The new technique, classified as an integral transformation, is referred to as: Laplace Transform. 4.0 Introduction and Background Information Definition: Let f(t) be a function on the interval [0, ∞). The Laplace Transform of f(t) is the function (in terms of s ):

dttfetfL st )()}({0∫∞

−=

Because the Laplace transform yields a function of s, we often use the notation L{ f(t) } = F(s) to denote the Laplace transform of f(t).

Page 2: Laplace Transformations 2

The Laplace transforms of functions f(t) can be computed by hand. Clearly the calculations can become very complex and tedious, depending on the nature of f(t). A Computer Algebra System, can be used to directly evaluate the Laplace transform of a given function. In Maple the laplace function is in the library inttrans. Lets use Maple to calculate some Laplace transformations: Example: Calculate the Laplace transformations of the functions: i) f(t) = eat ii) f(t) = sin( at); iii) f(t) = cos(at); iv) f(t) = tn v) f(t) = 5t + e4t – sin3t Solution: First we invoke the library inttrans and then use the function laplace: > restart: > with(inttrans);

addtable fourier fouriercos fouriersin hankel hilbert invfourier invhilbert invlaplace, , , , , , , , ,[invmellin laplace mellin savetable, , , ]

> > laplace( exp(a*t), t, s);

1 − s a

> laplace(sin(a*t), t, s); a

+ s2 a2

> laplace( cos(a*t), t, s); s

+ s2 a2

> assume( n>0); > laplace(t^n, t, s);

s( )− − n~ 1

( )Γ + n~ 1

The above can also be written as: 1

!+ns

n

Note that : Γ(n+ 1) = n! > laplace(t^5, t, s);

Page 3: Laplace Transformations 2

120 1s6

> laplace( 5 *t + exp(4*t) - sin(3*t), t, s);

+ − 5 1s2

1 − s 4

3 + s2 9

The Laplace transformation obeys the linearity property which is stated by the following theorem: Theorem 1: Let a and b be constants. Then the Laplace transformation of a linear combination of functions f(t) and g(t) is: L{ a f(t) + b g(t) } = a L{ f(t) } + b L { g(t) } In Calculus, we have seen that improper integrals may diverge. Thus the Laplace tranform may not exist for some functions. The following definition and theorem provide an understanding about the types of functions for which the Laplace transform exists. Definition: A function f is of exponential order b if there are numbers b, M >0 and T >0 such that: | f(t) | ≤ M eb t

for t > T. For example, the functions f(t) = 5t, f(t) = e-t and f(t) =10 sint are all of exponential of order 1, since: | 5 t| ≤ et |e- t| ≤ et and |10 sint | ≤ et for t > T Definition: A function is piecewise continuous on interval [0, ∞ ) if in any interval a ≤ t ≤ b there are at most a finite number of points tk at which f has discontinuities and is continuous on each interval tk – 1 < t < tk

Theorem 2: Suppose f is a piecewise continuous function on the interval [0, ∞ ) and that is of exponential order b for t > T. Then the Laplace transform L { f(t) } exists for s > b.

Page 4: Laplace Transformations 2

Throughout the chapter we will only be concerned with functions that have a Laplace transform.

Example: Find the Laplace transform of f(t) =

>≤≤−41

401t

t

Solution: We first present a solution finding the Laplace transform by hand. Certainly the given function is of exponential order (bounded by an exponential), so the Laplace transform exists.

dtedtedtetftfL ststst ∫∫∫∞

−−∞

− +−==4

4

00

1)1()()}({

=

Mt

t

st

M

tst

se

se

t

=

=

∞→

=−

−+

= 4

4

lim0

= ( ) ( )sMs

M

s ees

es

44 lim111 −−

∞→

− −−−

= ( )121 4 −− ses

Now let’s use Maple to calculate the Laplace transform: > restast: > with(inttrans): First we use the command "piecewise" to define the given function: > f:= piecewise( t>=0 and t <4, -1, t > 4, 1);

:= f {-1 and ≤ −t 0 < t 41 < 4 t

Page 5: Laplace Transformations 2

Let's get a visual idea how that function looks like: > plot(f, t = 0..8);

> laplace(f,t,s);

laplace , ,{

-1 and ≤ −t 0 < t 41 < 4 t

t s

As you see Maple is unable to compute the Laplace transform. For these types of piecewise functions it is essential to define the given function in terms of the Heaviside function. The Heaviside function is defined as:

≥<

=0,10,0

)(tt

tHeaviside

Thus our given function is: f(t) = Heaviside( t -4) - Heaviside (4 -t) (this represents one possible way to rewrite f(t) in terms of the Heaviside function) Just to make sure, let's do the plot of the above re-definition of f(t): > plot( Heaviside(t -4) - Heaviside(4 -t), t = 0..8);

Page 6: Laplace Transformations 2

Taking the Laplace transform of the above: > laplace(Heaviside(t -4) - Heaviside(4 -t), t, s);

− 2e

( )−4 s

s1s

An important function in modeling many physical situations is the unit step function Ua(t) which is defined as: Definition: The unit step function U(t – a) = Ua(t) is defined as:

U(t – a) = Ua(t) =

≥<≤at

at,1

0,0

Clearly: U(t – a) = Ua(t) = Heaviside( t – a) For the special case where a =0, we define: U(t-0) = U(t) = Heaviside(t) The unit step function is useful in defining functions that are piecewise continuous. Thus the function:

≥<≤

=atth

attgtf

),(0),(

)(

can be re-defined as: f(t) = g(t) [ U(t –0) – U(t –a) ] + h(t) U(t-a) = = g(t) [ 1 – U(t-a) ] + h(t) U(t –a) (Check to verify the validity of the above definition. See also exercise #4 for an extension) Besides the unit step function, other functions are needed to model situations where a mechanical (or electrical system) are acted upon by an external force of large magnitude for a very short period of time. For example, a mass on a spring could be given a sharp blow, a ball (baseball, golf ball, tennis ball) could be send soaring when struck violently by some kind of club ( baseball bat, golf club, tennis racket). To model such force we use the following functions.

Page 7: Laplace Transformations 2

Definition: The unit impulse function δa ( t – t0) is defined as:

+≥

+<≤−

−<≤

=−

att

attata

att

tta

0

00

0

0

,021

0,0

)(δ

Note, that from small values of a the above function is essentially a constant function of very large magnitude that is “on” for just a very short time, around t0

The above function also posses the property : ∫∞

=−0

0 1)( dtttaδ

(this results from the fact, that the area under the curve is equal to 1) In practice it is also convenient to work with another function, a function that approximates the unit impulse function: Definition: The Dirac delta function is defined as: )(lim)( 000 tttt aa

−=−→

δδ

Thus the Dirac delta function has the properties:

≠=∞

=−0

00 ,0

,)(

tttt

ttδ and 1)(0

0 =−∫∞

dtttδ

In Maple the Laplace transforms of the Dirac delta functions can easily be found: > with(inttrans): > assume (t0 > 0): > laplace(Dirac(t - t0), t, s);

e( )−s t0~

Page 8: Laplace Transformations 2

> laplace(Dirac(t), t, s);

1

> laplace(Dirac(t - Pi), t,s);

e( )−s π

Properties of the Laplace Transform: A number of properties are stated to make the Laplace transform of various functions easier to calculate. The properties are direct consequences of properties of integrals: Shifting Property: If L{ f(t) } = F(s), then L{ ea t f(t)} = F( s –a) In order to be able to use the Laplace transform to solve differential equations, we need to be able to compute the Laplace transform of the derivatives of arbitrary functions: Laplace Transform of 1st Derivative: L{ f’ (t) } = s L{ f(t)} - f(0) Laplace Transform of Higher Derivatives: L{ f(n) (t) } = sn L{ f(t) } – s n –1 f(0) - s n –2 f’ (0) - . . . – s f(n –2) (0) - f(n –1)(0) Derivatives of the Laplace Tranform:

L{ tn f(t) } = n

nn

dssFd )()1(−

Laplace transform involving the unit step function: L{ F(t – a) U(t –a)} = e-a s F(s), where F(s) = L{f(t)}

suraj
Highlight
suraj
Highlight
Page 9: Laplace Transformations 2

Laplace transform of the Dirac delta function: 0)}({ 0

stettL −=−δ

Inverse Laplace Transform: So far we have seen how to find the Laplace transform of a function. In this section, we reverse the process: given a function F(s) we want to find a function f(t) such that L{ f(t) } = F(s) Definition: The Inverse Laplace Transform of a function F(s) is the unique continuous function f(t) on [0, ∞ ) that satisfies L { f(t) } = F(s). We denote the inverse of the Laplace transform of F(s) as: f(t) = L-1 { F(s) } The inverse Laplace transforms of functions F(s)) can be computed by hand. Clearly the calculations can become very complex and tedious, depending on the nature of F(s). A Computer Algebra System, can be used to directly evaluate the inverse Laplace transform of a given function. In Maple the invlaplace function is in the library inttrans. Lets use Maple to calculate some inverse Laplace transformations: > restart: > with(inttrans): > > invlaplace(s/(s^2 + 2* s + 5), s , t);

− e( )−t

( )cos 2 t12 e

( )−t( )sin 2 t

> invlaplace((3*s -4)/(s^2 - 4*s), s ,t);

+ 1 2 e( )4 t

> invlaplace((2*s^3 - 4*s)/((s^2 - s)*(s^2 + 9)), s,t);

− + + 15 e t 11

5 ( )cos 3 t1115 ( )sin 3 t

Page 10: Laplace Transformations 2

Properties of the inverse Laplace Transform: Linearity Property: Let L-1{ F(s) } and L-1{ G(s) } be the inverse laplace transforms for f(t) and g(t) respectively. Let a and b be constants. Then: L-1 {a F(s) + b G(s) } = a L-1{ F(s)} + b L-1{ G(s) } Note: The inverse Laplace transform does not always exists. The following statement provides a condition that F(s) must satisfy in order for L-1{ F(s) } to exist: Existence of the inverse Laplace transform: If the limit: 0)}({lim)(lim ==

∞→∞→tfLsF

ss

then the inverse Laplace transform exists as a continuous or a piecewise continuous function. Otherwise, it does not exist. Inverse Laplace transform involving the step function: L-1{e- a s F(s) } = f(t – a) U(t –a), where L { f(t) } = F(s) 4.1 Solving a Differential Equation using Laplace Transformations Laplace transforms can be used to solve initial value problems, by transforming a differential equation to an algebraic equation. The overall method can be summarized as follows: Method: • Compute the Laplace transform of each term of the differential equation • Solve the resulting (algebraic) equation for L{ y(t)} = Y(s) • Determine the function y(t) by computing the inverse laplace transform of Y(s)

Page 11: Laplace Transformations 2

Consider the initial value problem:

)(01

1

1 tgyadt

ydadt

yda n

n

nn

n

n =+++ −

y(0) = y0, y’(0) = y1, . . . , y(n-1)(0) = yn-1

Taking the Laplace transform of each term, yields:

)}({}{01

1

1 tgLyLadt

ydLadt

ydLa n

n

nn

n

n =++

+

Using the property of the laplace transformations of derivatives, we obtain:

[ ] [ ]+−−−+−−− −−−−

−− )0()0()()0()0()( )2(211

)1(1 nnnn

nnnn yyssYsayyssYsa

)()(0 sGsYa =++

We solve the resulting algebraic equation for Y(s) and then take the inverse laplace transform to obtain the expression for Y(t). Example: Solve the initial value problem, using the laplace transform: y’’’ + y’’ – 6 y’ = sin4t, y(0) = 2, y’(0) =0, y’’(0) = -1 Plot the solution Solution: We will use Maple to implement the steps of the solution methodology. > with(inttrans): We define the given differential equation: > dfe:=diff(y(t),t$3) + diff(y(t), t$2) - 6*diff(y(t), t)= sin(4*t);

:= dfe = + −

∂3

t3 ( )y t

∂2

t2 ( )y t 6

∂t ( )y t ( )sin 4 t

>

Page 12: Laplace Transformations 2

Take the Laplace transform of both sides: > step1:= laplace(dfe, t,s); step1 s ( ) − s ( ) − s ( )laplace , ,( )y t t s ( )y 0 ( )( )D y 0 ( )( )( )D

( )2y 0 − :=

s ( ) − s ( )laplace , ,( )y t t s ( )y 0 ( )( )D y 0 6 s ( )laplace , ,( )y t t s 6 ( )y 0 + − − + =

41

+ s2 16

> Note that Maple displays the terms of the left side, using the property of the laplace transform of the derivatives. (multiply out the terms in the nested parentheses) Let's substitute on the above the initial conditions (Be careful on the syntax of the command): > step2:= subs({y(0) = 2, D(y)(0) =0, (D@@2)(y)(0)=-1}, step1); step2 :=

+ + − s2 ( ) − s ( )laplace , ,( )y t t s 2 13 s ( ) − s ( )laplace , ,( )y t t s 2 6 s ( )laplace , ,( )y t t s

41

+ s2 16 =

> Recall that laplace(y(t),t,s) = Y(s). Thus we can solve the above algebraic equation for Y(s): > step3:=simplify(solve(step2, laplace(y(t), t,s)));

:= step3 + − + + 2 s4 19 s2 204 2 s3 32 s

s ( ) + + + − s4 10 s2 s3 16 s 96

> We now compute the inverse laplace ransform of the above: > solution:= invlaplace(step3, s,t);

:= solution − − + − 178

225 e

( )2 t 7125 e

( )−3 t 111000 ( )cos 4 t

1500 ( )sin 4 t

Page 13: Laplace Transformations 2

The solution can be easily plotted as: > plot(solution, t = -2..2);

> Example: Solve the initial value problem:

y’’ + 8 y = f(t) where

≥<≤

πt

ttf

,00,1

)( and y(0) = y’(0) =0

Solution: We can solve the problem for each branch of f(t), using the techniques for 2nd order linear differential equations. This will be a time consuming and error-prone method. The power of the Laplace transform can be used to directly solve this problem where f(t) is a step function. First we re-define the piecewise continuous functions using the Heaviside function. Using the “formula” presented in the previous section: f(t) = 1[ 1 – U(t - π) ] + 0 U(t - π) = 1 – U(t - π) = 1 – Heaviside(t - π) Let’s use Maple to define f(t), and then solve the DFE using the Laplace transform: > with(inttrans): > > f:=t-> 1 - Heaviside(t -Pi);

:= f → t − 1 ( )Heaviside − t π

> dfe:= diff(y(t), t$2) + 8 * y(t) = f(t);

:= dfe = +

∂2

t2 ( )y t 8 ( )y t − 1 ( )Heaviside − t π

Page 14: Laplace Transformations 2

We take the Laplace transforms of both sides: > step1:=laplace(dfe, t,s);

:= step1 = − + s ( ) − s ( )laplace , ,( )y t t s ( )y 0 ( )( )D y 0 8 ( )laplace , ,( )y t t s − 1s

e( )−s π

s

We apply the initial conditions to the previous step: > step2:=subs({y(0) =0, D(y)(0) =0}, step1);

:= step2 = + s2 ( )laplace , ,( )y t t s 8 ( )laplace , ,( )y t t s − 1s

e( )−s π

s

Solve the above for laplace(y(t), t,s) = Y(s) : > step3:= simplify(solve(step2, laplace(y(t), t,s)));

:= step3 −− + 1 e

( )−s π

s ( ) + s2 8

Find the solution by taking the inverse Laplace transfrom of the above: > sol:= invlaplace(step3, s,t);

:= sol + −

− +

18

18 ( )cos 2 2 ( )− + t π ( )Heaviside − t π

18

18 ( )cos 2 2 t

> plot(sol, t = 0..6);

>

Page 15: Laplace Transformations 2

4.2 Solving Systems of Differential Equations using the Laplace Transform Laplace transforms can be used to solve initial value problems that involve a system of linear differential equations. The method is applied in much the same way as demonstrated for the case of a single initial value problem Method: • Compute the Laplace transform of each term for each of the differential equations • Solve the resulting (algebraic) system for the Laplace transform of each unknown

function • Determine the unknown functions by taking the inverse Laplace transform for each of

the expressions resulting from the previous step. Example: Solve the system: x’’ = -2 x – 4y - cost y’’ = -x – 2y + sint x(0) = 0, x’(0) = 0, y(0) =0, y’(0) =0 Solution: Let’s use Maple, and follow the steps outlined in the above method: > with(inttrans): First we define the system of differential equations: > sys:={diff(x(t), t$2) = - 2*x(t) - 4*y(t) - cos(t), diff(y(t),t$2) = -x(t) - 2*y(t) + sin(t)};

:= sys { }, = ∂∂2

t2 ( )x t − − − 2 ( )x t 4 ( )y t ( )cos t = ∂∂2

t2 ( )y t − − + ( )x t 2 ( )y t ( )sin t

Apply the Laplace transform to each equation: > step1:=laplace(sys, t,s); step1 − s ( ) − s ( )laplace , ,( )x t t s ( )x 0 ( )( )D x 0 = { :=

− − − 2 ( )laplace , ,( )x t t s 4 ( )laplace , ,( )y t t ss + s2 1

,

− s ( ) − s ( )laplace , ,( )y t t s ( )y 0 ( )( )D y 0 =

− − + ( )laplace , ,( )x t t s 2 ( )laplace , ,( )y t t s 1 + s2 1

}

Page 16: Laplace Transformations 2

Apply the initial conditions: > step2:= subs({x(0)=0, D(x)(0) =0, y(0)=0, D(y)(0)=0}, step1); step2 = s2 ( )laplace , ,( )x t t s − − − 2 ( )laplace , ,( )x t t s 4 ( )laplace , ,( )y t t s

s + s2 1

,{ :=

= s2 ( )laplace , ,( )y t t s − − + ( )laplace , ,( )x t t s 2 ( )laplace , ,( )y t t s1 + s2 1

}

Solve the resulting algebraic system for X(s) and Y(s): > step3:= solve(step2,{laplace(x(t), t,s), laplace(y(t),t,s) } );

:= step3 { }, = ( )laplace , ,( )y t t s + + s2 s 2

s2 ( ) + + 4 s4 5 s2 = ( )laplace , ,( )x t t s − + + s3 2 s 4

s2 ( ) + + 4 s4 5 s2

Take the inverse Laplace transform of the each term of the above expression: > sol:=invlaplace(step3, s,t);

sol = ( )y t + + − − − 12 t

14

112 ( )cos 2 t

112 ( )sin 2 t

13 ( )cos t

13 ( )sin t ,{ :=

= ( )x t − − + − + + t12

16 ( )cos 2 t

16 ( )sin 2 t

13 ( )cos t

43 ( )sin t }

> 4.3 Application Models using the Laplace Transform Example: A double pendulum consists of two masses m1 and m2 attached to strings of lengths l1 and l2 respectively. For oscillations, of small displacements, in a vertical plane, the system of differential equations describing the motion is:

0)()( 112122

2

21221

22

121 =++++ θθθ

glmmdt

dllm

dtd

lmm and

022221

2

21222

2222 =++ θθθ glm

dtdllm

dtdlm

Page 17: Laplace Transformations 2

Assuming that m1 =3, m2 = 1, l1 = l2 = 16, g = 32, solve the equations of motion to determine θ1(t) and θ2(t). Are the motions periodic? Assume that the initial conditions are: θ1(0) = 1, θ2(0) = 0, θ1’(0) = 0, θ2’(0) = -1 Plot the solutions. Solution: Since we assume small oscillations, we can use the approximations: 11sin θθ ≈ and 22sin θθ ≈ Substituting the given values to the equations of motion, we obtain: 032164''16''164 12

21

2 =⋅⋅++⋅ θθθ 03216''16''16 22

21

2 =⋅++ θθθ which simplifies to: 4 θ1’’ + θ2’’ + 8θ1 = 0 θ1’’ + θ2’’ + 2 θ2 = 0 Let’s use Maple, and solve the above system with the Laplace transforms: > with(inttrans): We define the system of equations of motion: > sys:= {4*diff(theta1(t), t$2) + diff(theta2(t), t$2) + 8*theta1(t) =0, diff(theta1(t), t$2) + diff(theta2(t), t$2) + 2*theta2(t) = 0}; sys :=

{ }, = + + 4

∂2

t2 ( )θ1 t

∂2

t2 ( )θ2 t 8 ( )θ1 t 0 = + +

∂2

t2 ( )θ1 t

∂2

t2 ( )θ2 t 2 ( )θ2 t 0

Taking the Laplce transorms of each equation: > step1:= laplace(sys, t,s); step1 s ( ) − s ( )laplace , ,( )θ1 t t s ( )θ1 0 ( )( )D θ1 0 − { :=

s ( ) − s ( )laplace , ,( )θ2 t t s ( )θ2 0 ( )( )D θ2 0 2 ( )laplace , ,( )θ2 t t s + − + 0 = ,4 s ( ) − s ( )laplace , ,( )θ1 t t s ( )θ1 0 4 ( )( )D θ1 0 s ( ) − s ( )laplace , ,( )θ2 t t s ( )θ2 0 − +

( )( )D θ2 0 8 ( )laplace , ,( )θ1 t t s − + 0 = }

Page 18: Laplace Transformations 2

Subtituting the initial conditions: > step2:= subs({theta1(0) =1, D(theta1)(0) =0, theta2(0) =0, D(theta2)(0) = -1}, step1); step2 { :=

= + + + s ( ) − s ( )laplace , ,( )θ1 t t s 1 1 s2 ( )laplace , ,( )θ2 t t s 2 ( )laplace , ,( )θ2 t t s 0, = + + + 4 s ( ) − s ( )laplace , ,( )θ1 t t s 1 1 s2 ( )laplace , ,( )θ2 t t s 8 ( )laplace , ,( )θ1 t t s 0

} Solving for the laplace transform of each of the unknown functions: > step3:= solve(step2,{laplace(theta1(t), t,s), laplace(theta2(t), t,s) } );

step3 :=

{ }, = ( )laplace , ,( )θ2 t t s − − + 8 8 s 3 s2

+ + 3 s4 16 s2 16 = ( )laplace , ,( )θ1 t t s

− + + 2 3 s3 8 s + + 3 s4 16 s2 16

Taking the inverse Laplace of each of the terms in the above expression: > sol:= invlaplace(step3, s,t); sol = ( )θ1 t − + +

12

cos

23 3 t

18 3

sin

23 3 t

12 ( )cos 2 t

18 ( )sin 2 t ,{ :=

= ( )θ2 t − − + − ( )cos 2 t14 ( )sin 2 t

cos

23 3 t

14 3

sin

23 3 t }

> Plotting each of the solutions as a function of time: > assign(sol); > plot(theta1(t), t = 0..44);

Page 19: Laplace Transformations 2

> plot(theta2(t), t = 0..44);

Observe that the motion of the pendulums is not periodic. We can also generate the phase plane portrait of the solution as: > plot([theta1(t), theta2(t), t =0..45], numpoints=200);

The above plot is known as the Lissajous curves.

Page 20: Laplace Transformations 2

Example: Two tanks T1 and T2 are connected with two pipes, so fluid can flow from one to another and vice versa. Tank T1 contains initially 100 gal of pure water. Tank T2 contains initially 100 gal or pure water in which 150 lb of salt are dissolved. The inflow into T1 is 2 gal/min fm T2 and 6 gal/min containing 6 lb of salt from the outside. The inflow into T2 is 8 gal / min from T1. The outflow from T2 is 8 gal/min.

• Set up a model for the concentrate of salt in each tank • Solve the model • Plot the solution(s)

Solution: Let y1(t) and y2(t) represent the solution concentrations of salt in T1 and T2 tanks respectively. Observe that: (Rate of change in concentration) = ( Inflow / min ) – (Outflow / min) Thus:

6100

2100

8' 211 ++−= yyy

212 1008

1008' yyy −=

The initial conditions for the model are: y1(0) = 0 and y2(0) = 150 Note that the above is linear 1st-order non-homogeneous system. We can use the (power of) Laplace transform to solve the above system: > > restart: > with(inttrans): We define the system of equations of motion: > sys:= {diff(y1(t), t) = -0.08*y1(t) + 0.02*y2(t) + 6, diff(y2(t), t) = 0.08*y1(t) - 0.08*y2(t)};

:= sys { }, = ∂∂t ( )y1 t − + + .08 ( )y1 t .02 ( )y2 t 6 =

∂∂t ( )y2 t − .08 ( )y1 t .08 ( )y2 t

Page 21: Laplace Transformations 2

Taking the Laplce transforms of each equation: > step1:= laplace(sys, t,s); step1 − s ( )laplace , ,( )y2 t t s 1. ( )y2 0. = { :=

− .08000000000 ( )laplace , ,( )y1 t t s .08000000000 ( )laplace , ,( )y2 t t s , − s ( )laplace , ,( )y1 t t s 1. ( )y1 0. =

− + + .08000000000 ( )laplace , ,( )y1 t t s .02000000000 ( )laplace , ,( )y2 t t s6.s1. }

Substituting the initial conditions: > step2:= subs({y1(0.) =0, y2(0.) =150}, step1); step2 − s ( )laplace , ,( )y2 t t s 150. = { :=

− .08000000000 ( )laplace , ,( )y1 t t s .08000000000 ( )laplace , ,( )y2 t t s ,s ( )laplace , ,( )y1 t t s =

− + + .08000000000 ( )laplace , ,( )y1 t t s .02000000000 ( )laplace , ,( )y2 t t s6.s1. }

Solving for the laplace transfrom of each of the unknown functions: > step3:= solve(step2,{laplace(y1(t), t,s), laplace(y2(t), t,s) } );

step3 = ( )laplace , ,( )y1 t t s 75. + 75. s 4.

s ( ) + + 3. 625. s2 100. s,{ :=

= ( )laplace , ,( )y2 t t s 150. + + 2. 50. s 625. s2

s ( ) + + 3. 625. s2 100. s}

Taking the inverse Laplace of each of the terms in the above expression: > sol:= invlaplace(step3, s,t); sol = ( )y1 t − − 100. 62.50000000 e

( )−.1200000000 t37.50000000 e

( )−.04000000000t,{ :=

= ( )y2 t + − 100. 125. e( )−.1200000000 t

75. e( )−.04000000000 t

}

>

Page 22: Laplace Transformations 2

Plotting each of the solutions as a function of time: > assign(sol); > plot(y1(t), t = 0..150);

> plot(y2(t), t = 0..150);

Superimposing the plots:

> plot([y1(t), y2(t)], t =0..150);

> We can observe that an equilibrium is "eventually" achieved where each concentration levels off to the value of 100 lb. Clearly the same result is obtained by taking the limit, in the expressions obtained for y1(t) and y(t), as t approaches infinity.

Page 23: Laplace Transformations 2

4.4 Problems and Projects Problems: 1) Find the following Laplace transforms using Maple. Rewrite each function using the Heaviside . Make sure to verify that the re-definition of your function in terms of the Heaviside function is correct:

≥<≤

=2/,cos

2/0,0)(

ππ

ttt

tf

≥<≤+

=1,0

10,12)(

ttt

tf

≥<≤

πt

tttf

,00,sin

)(

≥−<≤

=122

10,0)(

ttt

tf

2) Solve the following initial value problems using Laplace transforms. Show all steps. Plot the solutions:

• y’’ – 3 y’ + 2y = e-4 t, y(0) = 1, y’(0) = 5

• 2 y’’’ + 3 y’’ – 3 y’ – 2y = e-t, y(0)= 0, y’(0)= 0, y’’(0) =1 3) Solve the following initial value problems involving the unit-step function. Plot the solutions. Show all steps:

• y’’ – 5 y’ + 6y = U(t –1), y(0) = y’ (0) = 1

• y’’ + 4 y’ + 3y = 1 – U(t –2) – U(t –4) + U(t –6), y(0) = y’(0) = 0

Page 24: Laplace Transformations 2

4) Rewrite the following function in terms of the Heaviside function. Show all steps to demonstrate that your formula is correct:

><≤<≤

=bt

btathat

tg0

),(0,0

)(

5) Use the Laplace transform to solve the initial value problem:

• y’’ + y = f(t),

≥<≤<≤

πππ

ttt

tf,0

2,10,0

)( y(0) =0, y’(0) = 1

(Hint: Use the ideas of exercise #4 to redefine f(t) ) 6) Solve the initial value problem using the Laplace transform:

y’’ + 2 y’ + 2y = f(t), where

≥<≤

πt

tttf

00)2sin(10

)(

with initial conditions: y(0) =1 and y’(0) =-5 Plot the solution!. Does the above remind you any specific case of oscillations for a mass-spring system? Express, in terms of English the specific problem for which the given DFE is a model. What does the right-hand side represent? Does the plot of solution represent the expected motion of the system? Justify! 7) Solve y’’ + 2 y’ + y = 1 + δ ( t - π) + δ ( t - 2π) subject to the conditions: y(0) = y’(0) =0 Note: The right-hand side of the above DFE involves the Dirac delta function. 8) Solve the following systems, using the Laplace transform:

• x’ = y + 3 δ ( t - π), y’ = -x + 6 δ (t - 2π), x(0) = 1, y(0) = -1

Page 25: Laplace Transformations 2

• x’ = - 17 y + f(t), y’ = 0.25 x – y – f(t), where

≥<≤+

=1,3

10,1)(

ttt

tf

and x(0) =0, y(0) = 0

9) Consider the situation of a double (coupled) spring-mass system. (Refer to the previous chapter to refresh your memory). Assume that m1 =m 2 = 1, k1 = 1, k2 =2 and the initial conditions are: x1(0) =0, x1’(0) =1, x2(0) = 1, x2’(0) = 0. Furthermore, assume that no external force is acting on the system:

• Create a mathematical model to depict the equation of motion of each mass. Explain what each variable/symbol represents.

• Solve the system using Laplace transforms. Show and explain all steps. • Plot the displacement of each mass as a function of time and then overlay the

graphs. • Create the phase portrait plot

10) An electrical network consists of two loops. Loop1 contains a battery for which:

≥<≤

=50

50100)(

tt

tE

and inductor of L1 = 0.8H a resistor a resistor of 1.4 Ohms, and shares a resistor of 1 Ohm with the other loop. Loop2, contains an inductor of L2 = 1H, and shares the resistor of 1 Ohm with Loop1.

• Use Kirchhoff’s laws to construct a mathematical model for the currents i1 and i2 running in loops 1 and 2 respectively.

• Solve the system using Laplace transforms. Show and explain all steps. • Plot the currents as a function of time. Superimpose the plots.

11) Assume a three story building. The floors have masses: m1, m2, and m3 respectively. Assume that the connections among the floors, as well as with the ground can be modeled as springs with constants: k1, k2 and k3 respectively.

• Create a schematic drawing of the model. Label each “essential” part. • Create a mathematical model for the “movement” of the building (each floor).

Explain the derivation of the model. What each term of every equation mean? • Solve the system using Laplace transforms. To obtain an explicit solution,

assume m1 = 1, m2 = 2, m3 = 3, k1 =3, k2 = 2, k3 = 1, x1(0) = x2(0) = x3(0) =0, x1’ (0) = 1 / 4 , x2’ (0) = - 1 / 2, x3’(0) = 1

(Hint: Solution may look “complicated”). • Plot the solutions as functions of time.

Page 26: Laplace Transformations 2