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 125<br />

0.4<br />

0.2<br />

0<br />

–0.2<br />

–0.4<br />

10 t 20<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

10 t 20<br />

Figure 3.4: Steady-state (left) and transient (right) contributions.<br />

In the steady-state picture, the shorter of the two oscillatory curves corresponds<br />

to x1(t), the taller one to x2(t). The motion of mass m1 is approximately 180<br />

degrees out of phase with m2. The period of oscillation of both masses is<br />

identical with that of the driving force.<br />

In the transient picture, the curve that rises above 1 is x2(t). Both curves<br />

decay to essentially zero in less than 20 time units.<br />

To animate the solution, the complete (steady-state plus transient) timedependent<br />

displacements are added to the given equilibrium coordinates.<br />

> X1:=2+x1ss+x1tr: X2:=5+x2ss+x2tr:<br />

The motion of the two masses is now animated, each mass being represented<br />

by a size-10 (default color red) circle. To produce motion along the horizontal<br />

axis, the horizontal coordinate of each mass is entered in a list with the vertical<br />

coordinate set equal to zero. The time range is such that the transient parts<br />

vanish, revealing the steady-state motion. You can take a larger time interval<br />

if you desire. To obtain a smooth animation, 200 frames are used.<br />

> animate(f[X1,0],[X2,0]g,t=0..20,frames=200,style=point,<br />

symbol=circle,symbolsize=20,tickmarks=[3,2]);<br />

Execute the command on your computer to see the animated motion.<br />

PROBLEMS:<br />

Problem 3-10: Hand calculation<br />

Making use of the integral transform package, mimic a hand calculation to<br />

derive the solution for the second example.<br />

Problem 3-11: Transform package approach<br />

Use the integral transform package and the Laplace transform method to solve<br />

the following ODEs. Con¯rm the solutions using the method= laplace option<br />

in the dsolve command. Plot each solution over a suitable time range that<br />

includes the steady-state regime. Extract the transient part of the solution and

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

Saved successfully!

Ooh no, something went wrong!