Sane solution for an ODE with physical interpretation I have an object which is being subjected to a continual force that is a quadratic function of the object's velocity, ie, $F=f_0+f_1 v + f_2 v^2$ for arbitrary but given constants $f_0$, $f_1$, and $f_2$, where $f_2$ is non-zero.
Assuming that $v$ is a function of $t$, and plugging in Newton's second law, $F=ma$, we get:
$$F=f_0+f_1 v(t) + f_2 v(t)^2 = m v'(t)$$
If the object's initial velocity is $v(0)=v_0$, I used wolfram's ODE solver to get the result:
$$
 \begin {array}{c} 
v(t) = \frac{ \sqrt {4f_{{0}}f_{{2}}-{f_{{1}}}^{2}} \tan \left( \frac{ c+ \sqrt {4f_{{0}}f_{{2}}-{f_{{1}}}^{2}} t  }{2 m} \right) -f_{{1}} }{2 f_{{2}}} \\ 
c = 2m \arctan \left( {\frac {f_{{1}}  +2f_{{2}}v_{{0}}}{ \sqrt{4f_{{0}}f_{{2}}-{f_{{1}}}^{2}}}} \right) 
\end {array}
$$
However, solving it in this way, it appears to have both singularities as well as complex solutions, depending on the values of $f_0$, $f_1$, and $f_2$, which of course is not possible as this is supposed to be a representation of a physical process.
So... how do I actually solve this?
Edit:
For clarification, the constants $f_0$, $f_1$, and $f_2$ do genuinly represent real phenomena.... $f_0$ representing any constant force that may be applied, such as gravity, $f_1$ representing Stokes' drag, and $f_2$ representing Newtonian drag.  We can assume that it will never be the case that $f_1$ or $f_2$ will have the same sign as the velocity.  For these purposes, we can assume that Newtownian drag will always be present.
And so I would say that my biggest problem I an having with this is that because other than the qualifications mentioned above, the constants $f_0$, $f_1$, and $f_2$ can potentially be arbitrary reals, and either positive or negative, it is quite easy to contrive a case where $4f_0 f_2 \le {f_1}^2$, for example, if there is a very small Stokes' drag, or if the constant force being applied to the object opposes the newtonian drag, making $f_0 f_2$ negative.  This makes $\sqrt{4f_0 f_2 - {f_1}^2}$ complex, and I am sincerely hoping to avoid having to resort to complex arithmetic if it is at all possible... Even a piecewise solution would be preferable, but I don't know how to find solutions for all cases.  In particular, I don't know how the formula for $v(t)$ would need to be altered when $\sqrt{4f_0 f_2 - {f_1}^2}$ is complex so that complex arithmetic can be avoided.
The singular case where $4f_0 f_2 = {f_1}^2$, as long as $f_1 + 2f_2 v_0 \ne 0$ could theoretically be handled as one such special case, since I am taking the $\arctan$ of the latter over the former, $c$ will nicely work out to be be $\pm 2m\pi$ in such cases, as Narasimham noted below.  The sign of $c$ in such aa case would depend only on the sign of $f_1 + 2f_2 v_0$.  However, if $f_1 + 2f_2 v_0=0$, then $\frac{f_1 + 2f_2 v_0=0}{\sqrt{4f_0 f_2 = {f_1}^2}} = \frac{0}{0}$, which is undefined, so I would need yet another special case to handle that scenario.
 A: It is a separable equation:
$$
\frac{m\,v'}{f_0+f_1\,v+f_2\,v^2}=1.
$$
The solution is
$$
\int_0^{v_0}\frac{m\,dv}{f_0+f_1\,v+f_2\,v^2}=t.
$$
A: I suppose you have already obtained its solution by separation of variables. Perhaps needing to recognize special cases.
$ f_2 = 0 $ describes standard spring mass system of second order ODE including damping effect.The time curves are three types. Over-damped, critical damped and under / oscillatory damped. 
Case $ f_1 = 0 $ is valid for motion in viscous medium where resistance is proportional to square of velocity. Speed reaches a terminal velocity when time $ \rightarrow \infty $. Examples are a steel ball coming down in an oil column (Stokes law), parachute drop speed stabilizing to a terminal velocity.The complex part is reducible to tanh function, quite a real physical phenomenon.
Even here for cases when $ f_1, f_2,f_3 $ are all present real steady state dynamic behavior also centers around critical damping case $ f_1/2 = \sqrt {f_0 f_2} $, $ c = \pi m. $ 
So draw curves in these three regimes  $ ( c > \pi m , = \pi m , > \pi m ) $ to distinguish among them.
