what is the proof for w = F S cos theta

Suppose a constant force F acting on a body produces a displacement s in the body along the positive x- direction.

If is the angle which F makes with the positive x-direction of the displacement,then the component of F in the direction of displacement is

So

**
**