Chapter 2. Introduction to Laplace Transforms

Math 344, Maple Lab Manual Chapter 2: Laplace Transforms, I Definition and Examples Chapter 2. Introduction to Laplace Transforms Given a function ...
Author: Annis McKinney
10 downloads 0 Views 262KB Size
Math 344, Maple Lab Manual

Chapter 2: Laplace Transforms, I

Definition and Examples

Chapter 2. Introduction to Laplace Transforms Given a function f defined on 0,N , its Laplace Transform is the function F whose values are given by N

f t eKs t dt. The domain of F consists of all numbers s

the following improper integral formula F s = 0

such that the improper integral converges. This domain usually consists of an interval of the form a,N .

Two Examples N

eKs t K 1 . (We used Maple, but you will easily get the s 0 same limit "by hand".) If s O 0, then L'Hopital's Rule yields the following formula for F s . Let f t d 1 : then

f t eKs t dt = t/N lim

K

N

f t eKs t dt assuming s O 0 =

F s = 0

1 . s

Here is a more interesting example. We use Maple for the integration.

Let f t d piecewise t ! 1, t, t ! 2, 2 K t, 0 : plot f t , t = 0 ..4 =

N

0.9 0.4 0

1

2 t

3

4

eKs s C eKs K 1 eKs s C eK2 s K eKs C or, applying s2 s2

f t eKs t dt assuming s O 0 = K

Then 0

eK2 s K 2 eKs C 1 . s2

the simplify procedure, F s = simplify % =

The Unit Step Function The evaluation of the Laplace Transform integral for the second example is harder than the evaluation for the first one. When f is defined piecewise, as in the second example, the calculation can be simplified by expressing f in terms of the so-called unit step function, u, and then applying one of the shift properties of the Laplace Transform (to be discussed in the next section). The unit step function is defined as follows. 0 , t!0

u t =

1 , tO0

Maple calls it the Heaviside function. 1 0.6 0.2

plot Heaviside t , t =K2 ..2 = K2

K1

0

1 t

2

The math entry alias u = Heaviside : permits us to type u instead of Heaviside. 1 0.6 0.2

plot u t , t =K2 ..2 = K2

K1

0

1 t

2

In terms of u, the piecewise function above is page 9

Math 344, Maple Lab Manual

Chapter 2: Laplace Transforms, I

Definition and Examples

f t d t$ u t K u t K 1 C 2 K t $ u t K 1 K u t K 2 Note that f can also be defined as follows. f t d t$u t K 2 t K 2 $u t K 1 C t K 2 $u t K 2 : See the following plot and simplified integral calculation. 0.9

plot f t , t = 0 ..4 =

N

f t eKs t dt =

, simplify

0

1

2 t

3

0

4

:

eK2 s K 2 eKs C 1 s2

It was not necessary to make an assumption on s in the integral because the function f is 0 when t R 2.

Time-Shift Property, Version 1 The time-shift property of the Laplace Transform states that if F s is the transform of the function f t , then the transform of the "delayed" time function g t = u t K a $f t K a , a O 0, is the function G s = eKa sF s . The proof is "easy", see your class notes. A second version is illustrated at the end of this chapter. As an example, consider the function plotted above: f t d t$u t K 2 t K 2 $u t K 1 C t K 2 $u t K 2 First express the defining equation in the following form. f t = t K 0 $u t K 0 K 2 t K 1 $u t K 1 C t K 2 $u t K 2 Now use the linearity property of the transform, and the fact that t transforms to 1 / s2 (examine the second math entry in Chapter 1), to conclude that f transforms to 1 2 eKs eK2 s F s = 2 K C . s s2 s2 Here is another example. Let f be the function defined piecewise as follows. f t d piecewise t ! 1, t, t ! 2, 1, t ! 3, 3 K t, 0 : plot f t , t = 0 ..5 1 0

1

2

t

3

4

5

This is f t = t$ u t K u t K 1 C 1$ u t K 1 K u t K 2 C 3 K t $ u t K 2 K u t K 3 Write it as f t = t$u t K t K 1 $u t K 1 K t K 2 $u t K 2 C t K 3 $u t K 3 , to see that its Laplace Transform is 1 eKs eK2 s eK3 s F s = 2 K 2 K 2 C 2 . s s s s N

f t eKs t dt =

Let's check this: simplify 0

.

eK3 s K eK2 s K eKs C 1 . s2

The transform formula can also be checked by applying the laplace procedure (in Maple's inttrans package) as follows. inttrans laplace

f t , t, s =

eK3 s K eK2 s K eKs C 1 s2

Maple's inttrans package Maple's inttrans package contains 11 procedures that transform one function into another. Load these into a worksheet by processing the input with inttrans as shown below. The output is a list of the procedures that page 10

Math 344, Maple Lab Manual

Chapter 2: Laplace Transforms, I

Definition and Examples

have been loaded into the Maple kernel. This list can be suppressed by terminating the input with a colon. with inttrans addtable, fourier, fouriercos, fouriersin, hankel, hilbert, invfourier, invhilbert, invlaplace, (1) invmellin, laplace, mellin, savetable Once this package is loaded, the Laplace Transform of f t is obtained by entering laplace f t , t, s . See the following example showing the Laplace Transform of f t = t2. 2 laplace t2, t, s = 3 s The Laplace transform can be inverted back into the time domain by applying the invlaplace procedure as shown in the next entry. 1 1 3 invlaplace 4 , s, t = t 6 s Maple also recognizes the two fundamental properties of the Laplace Transform. 1. Differentiation Property: laplace k ' t , t, s = s laplace k t , t, s K k 0 2. Linearity Property:

laplace a f t C b g t , t, s = a laplace f t , t, s C b laplace g t , t, s

A Laplace Transform Solution to an IVP The differentiation and linearity properties, and the uniqueness of the Laplace Transform, make it a useful tool for solving initial value problems. By "uniqueness" we mean that if we know the transform of a function, then we can find the function. See the following input-output sequence to see how all this works. .. • Note. Two dots over the variable y is interpreted by Maple as y is a function of t and y is its second derivative. (This is Newton's notation for rate of change with respect to time.) d . .. d2 y= y t , y = 2 y t dt dt .. . ivp d y C 4 y = u t K u t K 2 C 3 u t K 2 K u t K 4 , y 0 = 1, y 0 = 2 : laplace ivp 1 , t, s : subs ivp 2 , % : isolate %, laplace y t , t, s 1 C 2 eK2 s K 3 eK4 s CsC2 s laplace y t , t, s = s2 C 4

(2)

soln d simplify invlaplace (2), s, t y t = Ku t K 2 cos t K 2 C plot

2Cu

tK2 C

3 cos t K 4 2

2

u tK4 K

3 u tK4 2

(3)

3 1 cos 2 t C sin 2 t C 4 4

rhs ivp 1

, rhs soln 3 2 1 0 K1 K2

, t = 0 ..12, thickness = 2, 1 , caption = "The thick curve is the driver."

2

4

6 t

8

10

12

The thick curve is the driver.

Formulas for the solution values on the intervals 0 % t ! 2 , 2 % t ! 4 , and 4 % t can be obtained easily. First define the value of u to be 1 at t = 0. This is done as follows. u 0 d1 : Then apply the convert procedure to convert output (3), named soln, to piecewise form. page 11

Math 344, Maple Lab Manual

Chapter 2: Laplace Transforms, I

Definition and Examples

convert soln, piecewise 1 3 C cos 2 t C sin 2 t 4 4

t!2

5 3 C cos 2 t C sin 2 t K cos t K 2 4 4

y t =

1 3 C cos 2 t C sin 2 t K cos t K 2 4 4

K

2C

2

t!4

3 cos t K 4 2

2

(4)

4%t

Time-Shift, Version 2 The second version of the time-shift property states that the Laplace Transform of the truncated function u t K a $f t , a O 0, is eKa s L f t C a , where L f t C a denotes the transform of the time function f t C a . For example, 2 6 9 L u t K 3 $t2 = eK3 s L t C 3 2 = eK3 s L t2 C 6 t C 9 = eK3 s C 2 C . 3 s s s eK3 s 9 s2 C 6 s C 2 . s3 For example, the next few entries solve an ivp similar to the previous one, but with the driver 4 cos 3 t over the time interval 2 p ! t ! 5 p, and different initial conditions. .. . ivp d y C 4 y = 4 cos 3 t $ u t K 2 p K u t K 5 p , y 0 = 1, y 0 =K1 : laplace ivp 1 , t, s : subs ivp 2 , % : isolate %, laplace y t , t, s As you can see, Maple agrees:

laplace u t K 3 $t2, t, s =

4 s eK2 s p C eK5 s p s2 C 9 laplace y t , t, s = s2 C 4

CsK1 (5)

soln d simplify invlaplace (5), s, t 4 4 4 4 y t = cos 2 t u t K 2 p C u t K 5 p cos 2 t K cos 3 t u t K 2 p C u t 5 5 5 5 1 K 5 p cos 3 t C cos 2 t K sin 2 t 2 plot 4 2 0 K2 K4

(6)

rhs ivp 1 , rhs soln , t = 0 ..24, linestyle = 2, 1 , caption = "The dotted curve is the driver.", xtickmarks = spacing p , numpoints = 600

p

2p

3p

t

4p

5p

6p

7p

The dotted curve is the driver.

convert soln, piecewise cos 2 t K y t =

1 sin 2 t 2

t!2 p

9 1 4 cos 2 t K sin 2 t K cos 3 t 5 2 5

t!5 p

13 1 cos 2 t K sin 2 t 5 2

5 p%t

page 12

(7)

Math 344, Maple Lab Manual

Chapter 2: Laplace Transforms, I

Definition and Examples

Chapter 2 Procedures Math Entry (Example) Laplace Transform The Laplace Transform of f t is the N

f t eKs t dt . Be

function F s = 0

prepared to add an assumption of the form s O a.

Typical Application

Calculation

The integral for the Laplace Transform of ea t is an unevaluated limit. N

ea t eKs t dt

0

ea t K s t K 1 aKs

= t/N lim

Adding the assumption that s O a yields the 1 transform of ea t as . sKa 1 aKs

The Laplace Transform of cos b t can be found as the real part of the transform of eI b t. Type Re [esc] [return] to enter R , which is the "real part" operator. Maple will not "simplify" it so we also apply the evalc procedure (evaluate as a complex number), evalc R

1 sKIb

=

% assuming s O a = K Maple's laplace and invlaplace Procedures If the laplace procedure is used, then assumptions are not needed. laplace ea t, t, s =

Find the Laplace Transforms of the time functions sin b t , sinh b t , cosh b t .

The same is true for the invlaplace procedure. invlaplace

1 , s, t = ea t sKa

The Unit Step Function as a Filter

f t $ u tKa K u tKb has values f t for a % t ! b and 0 elsewhere.

The graphs of f t d sin 2 t : and the filtered function g t df t $ u tKp Ku tK2p

:

are displayed below.

laplace sinh b t , t, s =

b Kb 2 C s 2

laplace cosh b t , t, s =

s Kb 2 C s 2

Filters can be used to convert a piecewise defined function to one defined in terms of u t . plot piecewise t ! 0, 2, t ! 2, t , t =K2 ..4

plot f t , g t , t =K1 ..9, linestyle = 2, 1 , xtickmarks = spacing p

2 1

1 K1

b b2 C s2

laplace sin b t , t, s =

1 Ka C s

u t is often used as a filter. If a ! b , then (assuming u 1 = 1)

s b2 C s2

p

t

2p

K2 K1

0

1

2 t

3

4

plot 2$u Kt C t$ u t K u t K 2 , t =K2 ..4

2 1 K2 K1

Derivative with respect to t If y is a variable depending on the variable x, then y ' is its derivative d with respect to x. y ' = y x dx If y is a variable depending on the . variable t, then y is its derivative d . with respect to t. y = y t dt

Jump the input cursor above a variable by pressing the key combination Commandshift-apostrophe: [Command]-[shift]-['] (Maple refers to this as [Command]-["].) To enter dots, press the period key, [right arrow] back to the baseline. d . .. d 2 y= y t , y= 2 y t dt dt

page 13

0

1

2 t

3

4

The Laplace Transform Method 1. Transform the ode 2. Substitute the initial conditions using subs. 3. Solve for the Laplace Transform of the solution using isolate. 4. Invert back into the time domain.