opyeb MechLab

Guides · Energy methods

Strain energy and Castigliano: deflection without integrating twice

Updated 28 Nov 2026 · 6 min read

A loaded elastic body stores strain energy. In a beam under bending, the energy per unit length is M²/(2EI), so the total is U = ∫ M²/(2EI) dx. Axial and shear energy can be added when they matter; for a slender beam in bending they are usually negligible.

U = ∫ M(x)²/(2EI) dx   ·   δ = ∂U/∂P

The cantilever, by energy

A cantilever of length L with a tip load P has moment M(x) = −P(L − x) measured from the fixed end. Then U = ∫₀^L P²(L − x)²/(2EI) dx = P²L³/(6EI). Differentiating with respect to P gives δ = PL³/(3EI), the familiar tip deflection.

With P = 5 kN, L = 2 m and EI = 20 000 kN·m², δ = 5 × 8/(3 × 20 000) = 6.67 × 10⁻⁴ m, or 0.667 mm. The energy route gives the same number as the direct integration, without finding the slope or the constant of integration separately.

Why it is useful

The double integration of EI y″ = M requires two constants found from boundary conditions. Castigliano replaces that with one scalar integral and a derivative. For a single load the saving is modest; for several loads and a deflection at one of them, it is substantial because the derivative picks out only the terms involving that load.

The method also handles a dummy load: if you want the deflection at a point where no load acts, apply a fictitious load Q there, differentiate, then set Q = 0. That trick gives the deflection at any point from the same energy expression.

Indeterminate beams

For a propped cantilever, take the prop reaction R as the redundant. Write M(x) in terms of R and the applied load, form U, and apply ∂U/∂R = 0 because the prop does not settle. The resulting equation gives R, and the rest follows from equilibrium. This is Castigliano's theorem applied to a redundant force.

The same idea with a support settlement replaces zero with the known displacement: ∂U/∂R = δ_support. The sign convention must match the assumed direction of R, or the settlement will be applied backwards.

Limits

The theorem assumes linear elasticity and small deflections, because U must be quadratic in the load for the derivative to give a linear response. It also assumes the load and the displacement are conjugate: a force gives a translation in its direction, a moment gives a rotation. Applying a force and asking for a rotation is the wrong pairing.

Shear deformation matters in deep beams and short spans. Adding the shear energy term changes the deflection by a few percent for a span-to-depth ratio below about five, and more for composite or sandwich sections. The bench uses Euler–Bernoulli theory and does not include it.

Checking the bench

Load the cantilever preset in the beam bench with P = 5 kN, L = 2 m and EI = 20 000 kN·m². The marked maximum deflection should read about 0.667 mm at x = 2 m. The energy calculation above is the independent check that the Green's function implementation is correct.

Strain energy is not the same as the work done during loading: the work is also ½Pδ, which equals U for a linear elastic system. The factor of one half is the same as in ½kx².

Questions

Why does Castigliano give deflection and not just energy?

Because the partial derivative of the total strain energy with respect to a load equals the displacement at that load in the direction of the load. The energy method differentiates a scalar, which is often easier than integrating the moment twice.

Can energy methods handle statically indeterminate beams?

Yes, and that is where they are most useful. Write the energy in terms of the redundant reaction, set the derivative with respect to that reaction to zero (or to the known support displacement), and solve for the redundant.

The beam bench gives the same tip deflection for the cantilever example.

Open the simulator

Written from standard statics, mechanics of materials and vibration theory; the worked numbers can be reproduced in the simulator linked above.

Back to the guides