16.21 Techniques of Structural analysis and design
Castigliano's Theorem
Example

Show[Import["example.jpg",  "JPG"]];

U  =  (EA/2) (L ((((u/L)))^2)  +  (Sqrt[2]) 
              L (((((u - v)/(2 L))))^2))
 Solve[{(∂_u) U == 0,  (∂_v) U == 
            P},  {u, v}] // Simplify