Yesterday I was not able to compute the general solution "immediately" by dsolve command, so I made some workaround there. I don't know what I was doing wrong, but today it works fine... :)
So in a "different way" part, there can be also sol2 and sol3 computed much easilly, only by the dsolve command:
eq := m*(diff(u(t), t, t))+k*u(t) = -4*p*(t-(1/2)*x)/x:
sol2 := unapply(simplify(rhs(dsolve([eq, u((1/2)*x) = 0, (D(u))((1/2)*x) = 0]))), t, x);
and sol3 similarly. When I was looking at it (now), I found out there is also a typo (in the "different way" part) - when assigning to frameani2 there is a wrongly placed round bracket in the parameters of ball.
I hope that's all. :)