The solution x(t) is needed for $$\dot v=g-kx$$

These apply: $$v(0) = x(0) = 0$$ and $$v = \dot x$$

I went with $$\frac {dv} {dt}=v\frac {dv} {dx}$$ and got

$$\frac {dv} {dt}=g-kx$$

$$v\frac {dv} {dx}=g-kx$$

...

$$v^2 = 2gx - kx^2 + C$$

At v(0)=0 the constant C=0

Now is $$v^2=(\frac {dx} {dt})^2$$ the only way to proceed or is there something simpler?

Thanks