so this is a bit of physics but the question is math related. For a mass hanging on a spring we get the following differential equation:
$\ddot{z}+\frac{f}{m}\cdot z = \frac{m\cdot g + f\cdot z_0}{m}$ whereas
m: mass, f: constant of the spring, g: graviational constant, $z_0$: initial displacement
Now, I'd say that the homogenic solution is
$z_h(t)=A\cos(\sqrt{\frac{f}{m}}t-\varphi)$
Now, since our inhomogenity is constant, we can just say that:
$z_p(t)=\frac{m\cdot g + f\cdot z_0}{m}$
but my solution tells me, that we have:
$\frac{m\cdot g + f\cdot z_0}{f}$
I'm not sure if that's a typo or not. We would get that if we multiplied our initial differential equation with $\frac{m}{f}$ but I'm not sure why we'd do such a thing and I'm also not 100% sure about its implications.
Ah I think it makes sense... It just clicked. If we just "add" the inhomogenity to our solution, we would have to "norm" to respect the coefficient of out $z$ in our differential equation, no? In short: If we plut out solution into our differential equation, we should get the inhomogenity again.
$$\ddot{z}+\frac{f}{m}\cdot z = \frac{m\cdot g + f\cdot z_0}{m}$$ $$\ddot{z}+\frac{f}{m}\cdot z - \frac{m\cdot g + f\cdot z_0}{m}=0$$ $$\ddot{z}+\frac{f}{m}\cdot( z - \frac mf \frac{m\cdot g + f\cdot z_0}{m})=0$$ $$\ddot{z}+\frac{f}{m}\left ( z - \frac {( m\cdot g + f\cdot z_0)}f\right)=0$$ it's equivalent to the homogeneous equation $$v''+\frac fm v=0$$ Where $$v=z - \frac {( m\cdot g + f\cdot z_0)}f$$ $$z =v+ \frac {( m\cdot g + f\cdot z_0)}f$$