Sign problem in projectile with drag So recently, I've been playing around with the variables in projectile motion with drag to see how the trajectory changes. I had my ODE and solved it using separation of variables but the equation didn't really work as well as I thought.
Here's the ODE
$$m\frac{\mathrm dv}{\mathrm dt}=bv^2-mg$$
After solving it by substituting 
$$v=\alpha\cdot \tanh(u) $$
After I got the solution and solved for the initial conditions, I got to a solution which worked as long as $ v>0 $. I realized that in the ODE, instantaneous velocity is squared so it loses its sense of direction causing the solution to go out of wack. 
Is it possible to fix this issue and be able to solve the equation analytically?
I was thinking to change the ODE to
$$m\frac{\mathrm dv}{\mathrm dt}=bv\cdot \operatorname{sign}(v)-mg$$
I guess I can also solve it by solving for two ODE, but I really really just wanted one elegant solution (not piecewise), but I'm having difficulty solving it.
 A: I don't see a problem
The solution (Maple solution) is:
$$v(t)=\tanh \left(  \left( -t\,c+m\operatorname{arctanh} \left( {\frac {{\it v0}\,b}{c}
} \right)  \right) {m}^{-1} \right) c\,{b}^{-1}
$$
with $c=\sqrt{b\,m\,g}$ and  $v(0)=v0$
This solution is defined also for $v < 0$ but you have to take care about the $\tanh$ function.
A: OP is correct, in the case of quadratic resistance as opposed to linear resistance, the upwards and downwards segments are typically split up into two separate EoMs to accommodate the change in sign of $v$. See e.g. P.541 Section III in  ref$^1$ for comments.
The generic equation modelling the whole trajectory is your last displayed equation indeed but to proceed analytically one must consider the cases $\text{sign}(v) = \pm 1$ separately, analogously as to how one would deal with equations involving the modulus function, $|x|$, for example. In one case, you will have a function governed by a $\tan$ and in the other a $\tanh$. You could then concoct a single solution through the use of theta functions if you so wish.
$^1$https://ris.utwente.nl/ws/portalfiles/portal/6689298/Timmerman99on.pdf
A: The problem arises because $v$ is not being treated as a vector.  With $v$ a vector $\vec{v}$ and $g$ a vector $\vec{g}$, the equation could be written as $$
m\frac{\mathrm d\vec{v}}{\mathrm dt}=\frac{b\vec{v}(\vec{v}\cdot \vec{v})}{(\vec{v}\cdot \vec{v})^{1/2}}-m \vec{g}.$$
It's less messy to just split the problem into two parts: the upward part of the trajectory and the downward part.
A: Your sign of the term $bv^2$ is wrong it should be $-bv^2$ use vector form then you will recognize.
See youtube
Reference:
Approximate Analytical Description of the Projectile Motion with a Quadratic Drag Force 
