Using the power and chain rules, the derivative of
y = sin²(x) - cos²(x)
is
dy/dx = 2 sin(x) cos(x) - 2 cos(x) (-sin(x))
dy/dx = 2 sin(x) cos(x) + 2 sin(x) cos(x)
dy/dx = 4 sin(x) cos(x)
and using the double angle identity for sine, this is equivalent to
dy/dx = 2 sin(2x)
Alternatively, we can first simplify y using the double angle identity for cosine:
cos(2x)= cos²(x) - sin²(x)
so that
y = -cos(2x)
and the derivative is
dy/dx = sin(2x) • 2
dy/dx = 2 sin(2x)