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.

180 CHAPTER 4. NONLINEAR ODE MODELS<br />

As she was taught way back in ¯rst-year physics, Jennifer begins by making<br />

a free-body diagram showing all the forces acting on the golf ball. This diagram<br />

is reproduced in Figure 4.9.<br />

φ<br />

golf ball<br />

F<br />

F F<br />

drag<br />

lift<br />

θ<br />

V<br />

gravity<br />

Figure 4.9: Free-body diagram for a golf ball, including drag and lift.<br />

Three forces are included, the pull of gravity ~ Fgravity downward, the drag force<br />

~Fdrag in the direction opposite to the instantaneous velocity vector ~ V , and<br />

the lift force ~ Flift in a direction perpendicular to ~ V . For simplicity, Jennifer<br />

assumes that the ball's spin axis is in the z-direction and that the translational<br />

motion is in the x-y plane with x horizontal and y vertical. She makes a call to<br />

the plots and VectorCalculus packages,<br />

> restart: with(plots): with(VectorCalculus):<br />

and enters the velocity vector ~ V = Vx ^ex + Vy ^ey.<br />

> Velocity:=;<br />

Velocity := Vx ex + Vy ey<br />

Since the speed V will be needed, it is calculated by taking the dot product of<br />

the velocity vector with itself and then taking the square root. The dot product<br />

is entered with the shorthand3 dot syntax. The unit vector (assigned the name<br />

uv) in the direction of ~ V is then equal to the velocity divided by the speed.<br />

> Speed:=sqrt(Velocity . Velocity); u[v]:=Velocity/Speed;<br />

uv := q<br />

q<br />

Speed :=<br />

Vx<br />

Vx 2 + Vy 2<br />

ex +<br />

V<br />

x<br />

Vx 2 + Vy 2<br />

q<br />

3 The long form is DotProduct(Velocity,Velocity).<br />

V<br />

y<br />

Vy<br />

Vx 2 + Vy 2<br />

ey

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

Saved successfully!

Ooh no, something went wrong!