With Sage 7.3, consider
t=var('t')
v=function('v')(t)
m, g, h = var('m g h')
assume(m > 0)
assume(g > 0)
assume(h > 0)
sol = desolve(m*diff(v,t) == m*g - h*v**2, v, ivar=t)
show(sol)
sol.solve(v)
The outcomes are
−mlog(hv(t)−√ghmhv(t)+√ghm)2√ghm=C+t
[v(t)=√ghm(e(2√ghmCm+2√ghmtm)+1)h(e(2√ghmCm+2√ghmtm)−1)]
Nevermind desolve
came with an implicit solution I had to further solve by hand but then solve
missed that the last expression for v(t) is a mere hyperbolic tangent. How would I get the solution in its simpler form?
v(t)=√gmh tanh(√ghm(t+mC))
Thanks for any hint!