Let
so that
At this point, there is no further convenient simplification.
With u(x)=2x2-3x+1,
Here, the chain rule is used along with the product rule to find
Those wishing to be clever may recognize (see Trig Identities) that
and that the derivative of this form is the same as that obtained from
the chain rule.
Repeated application of the chain rule gives
and this can be shown to reduce to
As a check, the original expression for S(r) may be shown to reduce to
and the quotient rule gives the above form more directly.
Letting u(x)=cos(x),