Having trouble with simple integral

sorry I'm having some trouble evaluating this integral

$\frac{dv}{dt} = -k(v-gt)^2-g$ where g and k are constants

I'm assuming you just separate and integrate but I cannot seem to get it to work out.

• What part of "separate and integrate" didn't work out, aside from the grammatical disparity? – abiessu Oct 16 '14 at 4:56
• I'm guessing the "separate" part, given that it's not separable... – Daniel McLaury Oct 16 '14 at 5:06

Let $y=v-gt$. Then $\frac{dv}{dt}=\frac{dy}{dt}+g$. So our differential equation can be rewritten as $$\frac{dy}{dt}+g=-ky^2-g,$$ and then as $$\frac{dy}{dt}=-(ky^2+2g).$$ This is a separable differential equation. We are solving $$\frac{dy}{ky^2+2g}=-dt.$$ Integrate. We will get an arctan on the left.