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.

120 CHAPTER 3. LINEAR ODE MODELS<br />

> phi:=Phi[1]: #select angle<br />

In this case, the time tf to reach the fence is calculated<br />

> tf:=evalf(tf);<br />

tf := 1:715218642<br />

to be about 1.72 s, slightly more than the 1.68 s without air resistance.<br />

Setting y = 0, we determine the time T for the ball to hit the ground,<br />

> T:=solve(y=0,t);<br />

T := 2:090175405; ¡0:1946627301<br />

the positive angle (¯rst solution here) being selected.<br />

> T2:=T[1]; #choose positive time<br />

T2 := 2:090175405<br />

The ball hits the ground after 2.09 seconds, compared to 2.06 seconds without<br />

air resistance.<br />

The fence is plotted as a quite thick (default color red) line.<br />

> fence:=plot([[xf,0],[xf,yf]],style=line,thickness=3):<br />

Using exactly the same syntax as in the introductory recipe, the motion of the<br />

ball is animated with the fence as background.<br />

> animate(pointplot,[[[x,y]],symbol=circle,symbolsize=14],<br />

t=0..T2,frames=200,background=fence,scaling=constrained);<br />

To see this animation, execute the recipe on your computer, click on the opening<br />

frame,andthenonthestartarrowintheMapletoolbar.<br />

PROBLEMS:<br />

Problem 3-7: Maximum drag coe±cient<br />

With all other parameters the same as in the text recipe, what is the maximum<br />

value of the drag coe±cient k such that the ball just clears the fence? What<br />

are the two corresponding initial angles?<br />

Problem 3-8: How high?<br />

If the drag coe±cient k is equal to 0:1s ¡1 , how high can the fence be for the<br />

ball to just clear it, all other parameters the same as in the text recipe? What<br />

are the two initial angles in this case?<br />

Problem 3-9: A falling raindrop<br />

For a sphere of diameter d meters moving in air, the approximate value of the<br />

constant k in Stokes's linear resistance law, ~ Fdrag = ¡k~v newtons, is given by<br />

k =1:55 £ 10 ¡4 d. For a small spherical raindrop (density ½ =103kg/m3 ,<br />

d =10 ¡4 m) falling from rest, determine the distance through which it falls in<br />

t seconds and its velocity then. Plot the distance and velocity separately over<br />

atimeintervalt = 0 to the time at which the velocity reaches 99 percent of its<br />

terminal (asymptotic) value.

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

Saved successfully!

Ooh no, something went wrong!