I have a slight problem (actually quite huge) with this question however I am also not 100% confident in my procedure and need a second or third opinion.

A particle is thrown vertically upwards with a v(velocity)=u m/s in a medium with a resistance of the square of velocity (r=v^{2}). Determine an expression for the velocity as it returns to its point of projection (g, k, and u only).

So (I am new to this forum and do not know how to set out the work as neatly as I should be, so I am skipping the first step with vectors):

mu-mg-mv^{2}=ma

v . dv/dx=u-g-v^{2}

dx/dv=v/(u-g-v^{2})

(let integral sign = ~ (haha... this is terrible))

~dx=~(v/(u-g-v^{2}) dv

x=1/2~2v/(u-g-v^{2}) dv

Therefore: x=1/2(ln(u-g-v^{2}))+C

At x=0, v=u

Therefore: 0=1/2(ln(u-g-u^{2}))+C

C=-1/2(ln(u-g-u^{2}))

x=1/2(ln(u-g-v^{2}))-1/2(ln(u-g-u^{2}))

(Using log laws (Oh god what a mess))

x=1/2(ln(u-g-v^{2})/(u-g-u^{2}))

Alright, so, here is my problem. I can (and have) figured out the max height reached by subbing when v=0 x_{max}is reached and then start again from the top but instead of having mu-mg-mv^{2}=ma, I'd have mg+mu-mv^{2}=ma but; using what working I have been doing; I would have found an expression for x and not for v. Also, I realize that I can use dv/dt instead of v . dv/dx but I cannot see how this would achieve the wanted answer.

In short, I do not know where to go from here, am I right for finding the x_{max}or should I have been using dv/dt at the start, or something I haven't even considered?

(Directing me to a tutorial on how to make neat problems would help too)