16.12.2012 Views

Computer Algebra Recipes

Computer Algebra Recipes

Computer Algebra Recipes

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.1. FIRST-ORDER MODELS 115<br />

3.1.2 Greg Arious Nerd's Problem<br />

It will be found, in fact, that the ingenious are always fanciful,<br />

and the truly imaginative never otherwise than analytic.<br />

Edgar Allan Poe, American writer, TheMurdersintheRueMorgue,1841<br />

Greg Arious Nerd, an eminent mathematician at the Erehwon Institute of Technology<br />

(EIT), has assigned the following problem for his undergraduate class to<br />

solve using computer algebra. They are not to use dsolve to analytically solve<br />

the relevant ODE, but instead use command structures found in the DEtools<br />

library package that mimic the steps in a hand calculation.<br />

Starting from rest, Evil Knievel weevil experiences a time-dependent drive<br />

force Fdrive = t2 e ¡t andadragforceFdrag = ¡(t2 =(1 + t)) v(t), per unit mass.<br />

Mimicking a hand calculation, determine Evil's velocity v(t) attimetand plot<br />

it over the interval t = 0 to 10 Erehwonian time units. What distance does Evil<br />

travel in this interval?<br />

Here is Professor Nerd's answer key. Loading the DEtools package,<br />

> restart: with(DEtools):<br />

the drag and drive forces are entered.<br />

> F[drag]:=-(t^2/(1+t))*v(t); F[drive]:=t^2*exp(-t);<br />

Fdrag := ¡ t2 v(t)<br />

Fdrive := t<br />

1+t<br />

2 e (¡t)<br />

Applying Newton's second law, the ODE governing Evil Knievel's velocity is<br />

> ode:=diff(v(t),t)=F[drag]+F[drive];<br />

ode := d<br />

dt v(t) =¡t2 v(t)<br />

1+t + t2 e (¡t)<br />

Although not requested, Nerd applies the odeadvisor command to ode. This<br />

command will classify the ODE and inclusion of the help option causes a relevant<br />

Help page with useful hyperlinks to be opened. The Help page should be<br />

closed when one is ¯nished reading it.<br />

> odeadvisor(ode,help); #close Help page<br />

[ linear]<br />

In this case, ode is classi¯ed as linear, which is obvious by inspection.<br />

Proceeding by hand, one would look for the integrating factor2 of the ¯rstorder<br />

inhomogeneous ODE. With Maple, the integrating factor IF for ode is<br />

obtained by entering intfactor(ode), which is then simpli¯ed.<br />

> IF:=intfactor(ode);<br />

t2<br />

IF := e<br />

( 2 ¡ t +ln(1+t))<br />

> IF:=simplify(IF);<br />

R<br />

2 f(t) dt.<br />

For a general linear ¯rst-order ODE, _x + f(t) x = g(t), the integrating factor is e

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

Saved successfully!

Ooh no, something went wrong!