A nonlinear spring has the force versus displacement relation of F = kns(x − x0) n. If the spring end is moved to x1 from the relaxed state, determine the formula for the required work.
In this case we know F as a function of x and can integrate