Question: Throwing a ball with aire resistance

I'm trying to plot the velocity of a ball thrown upwards with air resistance proportional to v^2 and also some simpler forms of this.

But the solution to v^2 returns root of and the plot stops for some specific time value. How can I proceed this plot to let's say 10 sec?

Staffan


 

``

``

restart

``

deq1 := m*(diff(v(t), t)) = -m*g:

``

sol := dsolve({deq1, v(0) = v__0}, v(t))

v(t) = -g*t+v__0

(1)

V := unapply(rhs(sol), t):

``

``

``

deq2 := m*(diff(v2(t), t)) = -m*g-k*v2(t):

``

sol2 := dsolve({deq2, v2(0) = v__0}, v2(t))

v2(t) = -g*m/k+exp(-k*t/m)*(v__0+g*m/k)

(2)

V2 := unapply(rhs(sol2), t):

``

deq3 := m*(diff(v3(t), t)) = -m*g-k*v3(t)*abs(v3(t))

m*(diff(v3(t), t)) = -m*g-k*v3(t)*abs(v3(t))

(3)

sol3 := dsolve({deq3, v3(0) = v__0}, v3(t))

v3(t) = RootOf(t+m*piecewise(_Z <= 0, arctanh(k*_Z/(k*m*g)^(1/2))/(k*m*g)^(1/2), 0 < _Z, arctan(k*_Z/(k*m*g)^(1/2))/(k*m*g)^(1/2))-m*piecewise(v__0 <= 0, arctanh(k*v__0/(k*m*g)^(1/2))/(k*m*g)^(1/2), 0 < v__0, arctan(k*v__0/(k*m*g)^(1/2))/(k*m*g)^(1/2)))

(4)

V3 := unapply(rhs(sol3), t):

``

m := 0.258e-2:

``

plot([V(t), V2(t), V3(t)], t = 0 .. 5, color = [blue, red, black], gridlines = true)

 

``


 

Download tal_3.9_sid_66_b.mw

Please Wait...