Worked example: Derivatives of sin(x) and cos(x)