# Why does a force-time graph in a collision generally sinusoidal/triangular-shaped, and not constant?

When in physics class, we are generally shown a graph such as this:

And we are then told to calculate the impulse. We can easily do this by taking the integral of force with respect to time. But why is a force-time graph shaped like this? For example, if I threw a ball against a wall, why isn't the wall exerting just a constant force on the ball? Why does force vary over the time into the collision? And at what point in the collision does the local max occur?

In this case you can write that acceleration is linearly dependent on displacement $$\ddot{x} = -\frac{k}{m} \, x$$ The solution to that is $$x(t) = -\delta \cos(\omega t)$$ and $$F(t) = -k x(t) = k \delta \cos(\omega t)$$