Can I discover the intial length/dimensions of spring from $mx''+cx'+kx=0$?
This (by solving with e.g. RK4) allows me to simulate the motion of the object tied to the spring or the "spring head". However, I don't know, what length the spring is.
Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. It only takes a minute to sign up.Sign up to join this community
The equilibrium length of the spring is irrelevant and cannot be pulled from the differential equation. All that matters is $x$, the displacement from the spring's equilibrium length, but what the equilibrium length is doesn't matter.
For example, if I had a spring whose equilibrium length is $5\ \rm m$ and I displaced the mass by $1\ \rm m$ before releasing it, I would get the exact same $x(t)$ if I were to have a spring (with identical spring constant) of equilibrium length $6\ \rm m$ with an initial displacement of $1\ \rm m$.
Now of course the actual value of the spring constant depends on things like the equilibrium length of the spring, the density of coils per unit length, the material, etc. But those values don't explicitly come into play in the differential equation. The spring constant $k$ does not determine a unique set of relevant physical parameters of the spring.
If you are wanting to "draw the spring" in a simulation (as stated in a comment of another answer), then just pick some equilibrium length. Or just have the spring extend past one end of the screen. You will need to do some thinking as to how to correctly change the spacing of each coil of the spring, but you can do that after solving the differential equation.
It is not possible to determine the initial displacement of the spring without other information like the initial energy of the system and the initial velocity of the mass. Generally, when a damped oscillator is solved for, the initial displacement (along with initial velocity) is assumed to be a given condition (that is, it is an initial value for the given differential equation). How did you simulate the motion without the initial conditions using Runge-Kutta? If you're looking for something else, please be clear.
Edit: To answer your confusion, x(0) is the length of the mass from the equilibrium position of the spring. This is same as the value by how much the spring is extended (or compressed, if x(0) is negative).