The correct option is C derived from Castigliano's theorem
Castigliano's second theorem,
δi=∂U∂Pi
Where,
δi is the displacement in the direction of Pi;
U = strain energy stored in the system due to loading
For a beam,
U=∫M2dx2EI
δi = ∂U∂Pi
=∂∂Pi∫M2dx2EI
=∫MEI∂M∂Pidx
The partial derivative ∂M∂Pi represents the value of the bending moment M caused by a unit load of the load Pi. Thus this derivative is equal to m, which is the bending moment in the structure due to a unit load corresponding to the desired displacement hence,
δi=∫MmdxEI
This is the equation of unit load method when only flexural deformations are considered.