> restart; -1; with(DEtools); -1
 

Section 2.3 Problem #22 

 

A ball with mass m(in kilograms) is thrown up with initial velocity v[0] (in meters per second) from a height of x[0] (meters). The force due to air  

resistance is mu*v^2 (mu is a fixed drag constant) where v(t)is the velocity (in meters per second) of the ball after t seconds. We will make "up"  

positive and "down" negative. We will call the height of the ball after t seconds x(t) (in meters). 

 

Remembering that F = ma and that a(t) = diff(v(t), t), we get the following differential equation (g is the acceleration due to gravity): 

> UPEquation := m*(diff(v(t), t)) = -mu*v(t)^2-m*g; 1
 

(Typesetting:-mprintslash)([UPEquation := m*(diff(v(t), t)) = -mu*v(t)^2-m*g], [m*(diff(v(t), t)) = -mu*v(t)^2-m*g]) 

Both gravity and air resistance slow the ball down on the trip upwards (both pull "down"), so both forces get a minus sign. 

 

On the way down, gravity speeds up the ball while air resistance slows the ball down. Gravity gets a minus sign (since it's 

still pulling "down") while air resistance gets a plus sign (since it's now sort of pulling "up"). 

> DOWNEquation := m*(diff(v(t), t)) = mu*v(t)^2-m*g; 1
 

(Typesetting:-mprintslash)([DOWNEquation := m*(diff(v(t), t)) = mu*v(t)^2-m*g], [m*(diff(v(t), t)) = mu*v(t)^2-m*g]) 

We solve the differential equation governing the upward motion of the ball given the initial velocity v(0) = v[0]. 

> UpVELOCITY := simplify(dsolve({UPEquation, v(0) = v[0]})); 1
 

(Typesetting:-mprintslash)([UpVELOCITY := v(t) = -tan((t*(m*g*mu)^(1/2)-m*arctan(mu*v[0]/(m*g*mu)^(1/2)))/m)*(m*g*mu)^(1/2)/mu], [v(t) = -tan((t*(m*g*mu)^(1/2)-m*arctan(mu*v[0]/(m*g*mu)^(1/2)))/m)*(m*... 

Now that we know the velocity, we can integrate and find the position function. However, we must remember to 

plug in the initial position x(0) = x[0]. 

> UpPOSITION := simplify(dsolve({diff(x(t), t) = rhs(UpVELOCITY), x(0) = x[0]})); 1
UpPOSITION := simplify(dsolve({diff(x(t), t) = rhs(UpVELOCITY), x(0) = x[0]})); 1
 

(Typesetting:-mprintslash)([UpPOSITION := x(t) = 1/2*(2*m*ln((m*g*mu)^(1/2)+tan(t*(m*g*mu)^(1/2)/m)*mu*v[0])-m*ln(1+tan(t*(m*g*mu)^(1/2)/m)^2)+2*x[0]*mu-m*ln(m*g*mu))/mu], [x(t) = 1/2*(2*m*ln((m*g*mu)...
(Typesetting:-mprintslash)([UpPOSITION := x(t) = 1/2*(2*m*ln((m*g*mu)^(1/2)+tan(t*(m*g*mu)^(1/2)/m)*mu*v[0])-m*ln(1+tan(t*(m*g*mu)^(1/2)/m)^2)+2*x[0]*mu-m*ln(m*g*mu))/mu], [x(t) = 1/2*(2*m*ln((m*g*mu)...
 

The ball achieves its maximum height when its velocity vanishes (becomes zero). Solving the equation v(t) = 0 for t, gives  

us the time when the ball reaches its maximum height. 

> HighTime := solve(rhs(UpVELOCITY) = 0, t); 1
 

(Typesetting:-mprintslash)([HighTime := m*arctan(mu*v[0]/(m*g*mu)^(1/2))/(m*g*mu)^(1/2)], [m*arctan(mu*v[0]/(m*g*mu)^(1/2))/(m*g*mu)^(1/2)]) 

If we plug in the time when the ball reached its maximum height into the position function, we will get the ball's maximum height. 

> HighestPosition := simplify(subs(t = HighTime, rhs(UpPOSITION))); 1
 

(Typesetting:-mprintslash)([HighestPosition := 1/2*(2*m*ln(mu*(m*g+v[0]^2*mu)/(m*g*mu)^(1/2))-m*ln((m*g+v[0]^2*mu)/(m*g))+2*x[0]*mu-m*ln(m*g*mu))/mu], [1/2*(2*m*ln(mu*(m*g+v[0]^2*mu)/(m*g*mu)^(1/2))-m...
(Typesetting:-mprintslash)([HighestPosition := 1/2*(2*m*ln(mu*(m*g+v[0]^2*mu)/(m*g*mu)^(1/2))-m*ln((m*g+v[0]^2*mu)/(m*g))+2*x[0]*mu-m*ln(m*g*mu))/mu], [1/2*(2*m*ln(mu*(m*g+v[0]^2*mu)/(m*g*mu)^(1/2))-m...
 

We solve the differential equation governing the downward motion of the ball given its velocity is zero when at the time 

it begins its descent. 

> DownVELOCITY := simplify(dsolve({DOWNEquation, v(HighTime) = 0})); 1
 

(Typesetting:-mprintslash)([DownVELOCITY := v(t) = -tanh((t*(m*g*mu)^(1/2)-m*arctan(mu*v[0]/(m*g*mu)^(1/2)))/m)*(m*g*mu)^(1/2)/mu], [v(t) = -tanh((t*(m*g*mu)^(1/2)-m*arctan(mu*v[0]/(m*g*mu)^(1/2)))/m)... 

If we integrate the (downward) velocity function remembering to start at the highest position at the time the ball reached its 

highest position, we will have the position function of the ball as it travels downward. 

> DownPOSITION := simplify(dsolve({diff(x(t), t) = rhs(DownVELOCITY), x(HighTime) = HighestPosition})); 1
DownPOSITION := simplify(dsolve({diff(x(t), t) = rhs(DownVELOCITY), x(HighTime) = HighestPosition})); 1
DownPOSITION := simplify(dsolve({diff(x(t), t) = rhs(DownVELOCITY), x(HighTime) = HighestPosition})); 1
 

(Typesetting:-mprintslash)([DownPOSITION := x(t) = 1/2*(-2*m*ln(cosh((t*(m*g*mu)^(1/2)-m*arctan(mu*v[0]/(m*g*mu)^(1/2)))/m))+2*m*ln(mu*(m*g+v[0]^2*mu)/(m*g*mu)^(1/2))-m*ln((m*g+v[0]^2*mu)/(m*g))+2*x[0...
(Typesetting:-mprintslash)([DownPOSITION := x(t) = 1/2*(-2*m*ln(cosh((t*(m*g*mu)^(1/2)-m*arctan(mu*v[0]/(m*g*mu)^(1/2)))/m))+2*m*ln(mu*(m*g+v[0]^2*mu)/(m*g*mu)^(1/2))-m*ln((m*g+v[0]^2*mu)/(m*g))+2*x[0...
(Typesetting:-mprintslash)([DownPOSITION := x(t) = 1/2*(-2*m*ln(cosh((t*(m*g*mu)^(1/2)-m*arctan(mu*v[0]/(m*g*mu)^(1/2)))/m))+2*m*ln(mu*(m*g+v[0]^2*mu)/(m*g*mu)^(1/2))-m*ln((m*g+v[0]^2*mu)/(m*g))+2*x[0...
 

When the ball's downward position reaches zero, it has hit the ground. So we solve the equation x(t) = 0 for t. 

> HitsGround := solve(rhs(DownPOSITION) = 0, t); 1
 

(Typesetting:-mprintslash)([HitsGround := m*(arctan(mu*v[0]/(m*g*mu)^(1/2))+arccosh(exp(1/2*(2*m*ln(mu*(m*g+v[0]^2*mu))-2*m*ln(m*g*mu)-m*ln((m*g+v[0]^2*mu)/(m*g))+2*x[0]*mu)/m)))/(m*g*mu)^(1/2)], [m*(...
(Typesetting:-mprintslash)([HitsGround := m*(arctan(mu*v[0]/(m*g*mu)^(1/2))+arccosh(exp(1/2*(2*m*ln(mu*(m*g+v[0]^2*mu))-2*m*ln(m*g*mu)-m*ln((m*g+v[0]^2*mu)/(m*g))+2*x[0]*mu)/m)))/(m*g*mu)^(1/2)], [m*(...
 

The problem in the book provides the following specific information: 

The initial position is 30 meters above the ground. 

The ball is thrown upward at a rate of 20 meters per second. 

The drag constant is mu = 1/1325. 

The ball's mass is .15 kilograms. 

(And of course the acceleration due to gravity is about 9.81 meters per second squared.) 

> x[0] := 30; 1; v[0] := 20; 1; mu := 1/1325; 1; m := .15; 1; g := 9.81; 1
 

(Typesetting:-mprintslash)([x[0] := 30], [30]) 

(Typesetting:-mprintslash)([v[0] := 20], [20]) 

(Typesetting:-mprintslash)([mu := 1/1325], [1/1325]) 

(Typesetting:-mprintslash)([m := .15], [.15]) 

(Typesetting:-mprintslash)([g := 9.81], [9.81]) 

We create a plot of the upward velocity function from time 0 until the time when the ball reached its maximal height. 

Then we create a plot of the downward velocity function from the time of the ball's maximal height until the time when it hits the ground. 

Finally, we display both plots together. 

> VUp := plot(rhs(UpVELOCITY), t = 0 .. HighTime); 1; VDown := plot(rhs(DownVELOCITY), t = HighTime .. HitsGround); 1; plots[display](VUp, VDown); 1
VUp := plot(rhs(UpVELOCITY), t = 0 .. HighTime); 1; VDown := plot(rhs(DownVELOCITY), t = HighTime .. HitsGround); 1; plots[display](VUp, VDown); 1
VUp := plot(rhs(UpVELOCITY), t = 0 .. HighTime); 1; VDown := plot(rhs(DownVELOCITY), t = HighTime .. HitsGround); 1; plots[display](VUp, VDown); 1
 

VUp := INTERFACE_PLOT(CURVES([[0., 19.9999999980231778], [0.417264468938559620e-1, 19.5087344951265678], [0.780324052261008871e-1, 19.0845524243109388], [.118862252492357086, 18.6110322115666236], [.1... 

VDown := INTERFACE_PLOT(CURVES([[1.91430709599999993, 0.400416689052418543e-8], [1.98570200045147672, -.700325277578402683], [2.04782232506822660, -1.30940037713153767], [2.11768312706169759, -1.99376... 

Plot 

We create a plot of the upward position function from time 0 until the time when the ball reached its maximal height. 

Then we create a plot of the downward position function from the time of the ball's maximal height until the time when it hits the ground. 

Finally, we display both plots together. 

> XUp := plot(rhs(UpPOSITION), t = 0 .. HighTime); 1; XDown := plot(rhs(DownPOSITION), t = HighTime .. HitsGround); 1; plots[display](XUp, XDown); 1
XUp := plot(rhs(UpPOSITION), t = 0 .. HighTime); 1; XDown := plot(rhs(DownPOSITION), t = HighTime .. HitsGround); 1; plots[display](XUp, XDown); 1
XUp := plot(rhs(UpPOSITION), t = 0 .. HighTime); 1; XDown := plot(rhs(DownPOSITION), t = HighTime .. HitsGround); 1; plots[display](XUp, XDown); 1
XUp := plot(rhs(UpPOSITION), t = 0 .. HighTime); 1; XDown := plot(rhs(DownPOSITION), t = HighTime .. HitsGround); 1; plots[display](XUp, XDown); 1
 

XUp := INTERFACE_PLOT(CURVES([[0., 29.9999999348033270], [0.417264468938559620e-1, 30.8242653217812404], [0.780324052261008871e-1, 31.5248394077914328], [.118862252492357086, 32.2943794130924289], [.1... 

XDown := INTERFACE_PLOT(CURVES([[1.91430709599999993, 48.5442563400000040], [1.98570200045147672, 48.5192554637626686], [2.04782232506822660, 48.4568310781211622], [2.11768312706169759, 48.34144565687... 

Plot 

The ball reaches its maximal height after about 1.91 seconds. 

> HighTime; 1
 

1.914307096 

The ball hits the ground after about 5.19 seconds. 

> HitsGround; 1
 

5.189730296 

The ball's highest position is about 48.54 meters. 

> HighestPosition; 1
 

48.54425634 

>