Look..It's easy..
du/dx=f(x)..(this is where you are making mistake).The correct equation is du/dx= -f(x)
so f(x)= -2cx(This force is opposite to the direction of velocity of particle.i.e.the force is in negative x-direction..
Now do the process again and you will easily reach the answer..
You do not need to differentiate the potential energy and use Newton's second law.
You already have conservation of energy: ## \frac {mv^2} {2} + cx^2 = \frac {mv_0^2} {2} ##, thus ## v = \sqrt { v_0^2 - 2 \frac c m x^2} ##, or ## \frac {dx} {dt} = \sqrt { v_0^2 - 2 \frac c m x^2} ##.
Can you solve this?
If you insist on using Newton's second law, then I should say that this step of yours: ## \int 2cxdt = \int m dv \Rightarrow \frac {2cxt} m = v + \text{constant} ## is already wrong, and not really because of the missing minus sign, but because ##x## is a function of time, no a constant, so its integral is not ##xt##.
\frac a a \int_0^{x_m} \frac {dx} {\sqrt{1 - (ax)^2} } = \frac 1 a \int_0^{ax_m} \frac {d(ax)} {\sqrt{1 - (ax)^2} } = \frac 1 a (\arcsin ax_m - \arcsin 0) = \frac 1 a \arcsin ax_m = v_0 t
$$ Now ## x_m = \sqrt { \frac {mv_0^2} {2c} } = a^{-1} ##, so ##\frac 1 a \frac {\pi} 2 = v_0 t ## giving $$ t = \sqrt {\frac m {2c} } \frac {\pi} 2 $$ Also of note is that you can find ##x## as a function of ##t##: $$ x = a^{-1} \sin av_0t $$ which is a sinusoidal oscillation with period ## \frac {2 \pi} {av_0} = 2 \pi \sqrt { \frac {m} {2c}} ##. Clearly the time it takes from max velocity to max displacement is one quarter of the period, which is consistent with the previous result.
If you have studied linear differential equations, you could also observe that Newton's second law gives $$ \frac {d^2 x} {dt^2} + \frac {2 c} {m} x = 0 $$ which is a second-degree linear diff. eq., whose general solution is $$ x = A \sin (\sqrt{\frac {2c} m}t + \alpha) $$ which is again periodical with the same period, of course.
I greatly appreciate your help. Your solution is a work of art. I will plug in some hypothetical numbers to make sure our solutions are equivalent (unless you have already checked this). I need to write a solution in my own way and I simply would not legitimately be able to reproduce your solution on my own. Although I have saved this solution and will use it to improve with time.