16.12.2012 Views

Computer Algebra Recipes

Computer Algebra Recipes

Computer Algebra Recipes

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.2. SECOND-ORDER MODELS 121<br />

3.2.2 Meet Mr. Laplace<br />

The weight of evidence for an extraordinary claim must be<br />

proportioned to its strangeness (known as the principle of Laplace).<br />

Pierre-Simon Laplace, French mathematician (1749{1827)<br />

Pierre-Simon Laplace was one of the most in°uential scientists in history. Indeed,<br />

he has been referred to as the Newton of France. Not only did he make<br />

outstanding contributions to astronomy, for example, mathematically investigating<br />

the stability of the solar system, he developed probability theory as a<br />

coherent body of knowledge from a set of miscellaneous problems, and played a<br />

leading role in forming the modern discipline of mathematical physics. One of<br />

his most important contributions to the latter is the Laplace transform, which<br />

canbeusedtosolvelinearODEs.<br />

The Laplace transform of a function f(t) isde¯nedas<br />

L(f(t)) ´ F (s) =<br />

Z 1<br />

0<br />

f(t)e ¡st dt:<br />

By integrating by parts and assuming that e ¡stf(t) ! 0ast !1,itiseasy<br />

to show that<br />

³ ´<br />

³ ´<br />

L f(t) _ = sF(s) ¡ f(0) and L Äf(t) = s 2 F (s) ¡ sf(0) ¡ _ f(0):<br />

The Laplace transform method of solving a linear ODE (system) with constant<br />

coe±cients is to Laplace transform the ODE, solve the resulting algebraic<br />

equation for F (s), and then perform the inverse Laplace transform to obtain<br />

the solution f(t). In the era before computer algebra existed, tables of Laplace<br />

transforms and their inverses were almost as common as integral tables, and<br />

one of their main uses was in solving linear ODEs. With the Maple computer<br />

algebra system, these tables are obsolete, since Maple has an integral transform<br />

library package that includes the Laplace transform and its inverse.<br />

The use of this package is now demonstrated in the ¯rst of the two recipes<br />

that follow. It is desired to solve the following forced oscillator ODE for x(t):<br />

Äx +4_x +13x =sin(t); with x(0) = 1 and _x(0) = ¡5:<br />

Entering the integral transform package and using a semicolon to display<br />

its contents, we see that it contains the Laplace transform (laplace) command<br />

and its inverse (invlaplace).<br />

> restart: with(inttrans);<br />

[addtable; fourier; fouriercos; fouriersin; hankel; hilbert; invfourier;<br />

invhilbert; invlaplace; invmellin; laplace; mellin; savetable]<br />

The forced oscillator ode is entered,<br />

> ode:=diff(x(t),t,t)+4*diff(x(t),t)+13*x(t)=sin(t);<br />

μ μ <br />

2 d d<br />

ode := x (t) +4 x (t) +13x(t) =sin(t)<br />

dt2 dt

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!