# Torque field of a beam with applied force

Suppose a beam with length $L$ is clamped to a wall, and a force $w$ is applied and the point with distance $L$ from the wall. I want to know what is the torque applied on every point on the beam. My source tells me that it is $\tau(x) = w(L-x)$, but I am failing to derive this. The force is a point force, so I tried to use the elasticity equations like $\sigma_{xz} = \frac{E}{2(1+\nu)}u_{xz}$, but I couldn't continue from here. I tried to understand what forces act on a piece of cross section of the beam, using the stress tensor, and from this get the torque, but that didn't work.

As you can see the following diagram, if we take a section of the beam by point $x$, only weight and section forces act on the right part of the beam. If we take moments from point $x$, we have $M=(L-x)w$, that is the equation after which you were.