A 0.21 kg block oscillates back and forth along a straight line on a frictionless horizontal surface. Its displacement from the origin is given by

x = (16 cm)cos[(16 rad/s)t + π/2 rad]

What force, applied to the block by the spring, results in the given oscillation?

why can you not just do F=ma?

Yes. This is a duplicate post. I answered it elsewhere

To find the force applied by the spring in this oscillation, you cannot simply use the equation F=ma. This is because the force in oscillatory motion is not constant, but it varies with time.

Instead of using F=ma, we need to use Hooke's law, which describes the force exerted by a spring. Hooke's law states that the force exerted by a spring is proportional to the displacement from its equilibrium position. Mathematically, it can be expressed as:

F = -kx

Where:
F is the force applied by the spring
k is the spring constant
x is the displacement from the equilibrium position

In the given equation for displacement, x = (16 cm)cos[(16 rad/s)t + π/2 rad], we can identify x as the displacement at any given time t.

Now, we need to find the force applied by the spring. By comparing the equation with Hooke's law, we can see that the force applied by the spring is -kx. The negative sign indicates that the force is always directed towards the equilibrium position.

Therefore, the force applied by the spring in this oscillation is given by:

F = -kx = -(16 cm)cos[(16 rad/s)t + π/2 rad]