find $\frac{dy}{dx}$. \n$y = 6(cos x+sin x)(cos x - sin x)$

find $\frac{dy}{dx}$. \n$y = 6(cos x+sin x)(cos x - sin x)$
Answer
Explanation:
Step1: Simplify the function
Use the difference - of - squares formula $(a + b)(a - b)=a^{2}-b^{2}$. Here $a = \cos x$ and $b=\sin x$, so $y = 6(\cos^{2}x-\sin^{2}x)$. By the double - angle formula $\cos2x=\cos^{2}x - \sin^{2}x$, we have $y = 6\cos2x$.
Step2: Differentiate using the chain rule
The derivative of $\cos u$ with respect to $x$ is $-\sin u\frac{du}{dx}$. Let $u = 2x$, then $\frac{du}{dx}=2$. The derivative of $y = 6\cos2x$ with respect to $x$ is $\frac{dy}{dx}=6\times(-\sin2x)\times2$.
Step3: Calculate the result
$\frac{dy}{dx}=- 12\sin2x$.
Answer:
$\frac{dy}{dx}=-12\sin2x$