"Spring connected to a block" problem

A block has an initial velocity of V and is connected to a damper and a spring like this:

The problem is to figure how far the spring vill maximally be compressed.

The damping is linearily proportional to the velocity of the block. It is possible to solve it with more or less standardised differential equations, I however want to try a different approach.

I want to solve by doing an energy equation like this:

mv^2/2 = kx^2/2 + $\int cx' dx$

where x is the maximum compression and the integral the force from the damper integrated over the distance x. The speed over time is denoted as the derivate of x which equals speed. The constant C has such dimension that V(t)*c=F(t).
The second term is the potential energy stored in the spring.

However, since I dont know x' some trick needs to be done. Can this problem be solved by this approach?
 PhysOrg.com physics news on PhysOrg.com >> Study provides better understanding of water's freezing behavior at nanoscale>> Soft matter offers new ways to study how ordered materials arrange themselves>> Making quantum encryption practical