So the problem I am stuck on is this: find the derivative of $$y = \cos^2(x^3 + x^2)$$
I am very lost in all of this, so please explain the steps, that would be a great help.
So the problem I am stuck on is this: find the derivative of $$y = \cos^2(x^3 + x^2)$$
I am very lost in all of this, so please explain the steps, that would be a great help.
You need to use the chain rule.
$$y = \cos^2(x^3 + x^2) = \big(\cos(x^3 + x^2)\big)^2$$
We have a function $y$ which is a composite of three functions: $f(g(h(x)))$ where $$h(x) = x^3+x^2,\quad g(h(x)) = \cos(h(x)),\, \quad f(g(h(x))) = [g(h(x))]^2,$$ so our derivative is going to require that we find the product of $h'(x), g'(h(x)),$ and $f'(g(h(x)))$ $$\dfrac{dy}{dx} = \underbrace{2\big(\cos(x^3+ x^2)\big)}_{f'(g(h(x)))}\big(\underbrace{-\sin(x^3 + x^2)}_{g'(h(x))}\big)\cdot \underbrace{\frac{d}{dx}\big(x^3 + x^2)}_{h'(x)}$$ $$= -2\big(\cos(x^3+ x^2)\big)\big(\sin(x^3 + x^2)\big)(3x^2 + 2x)$$ $$= -2(3x^2 + 2x)\big(\cos(x^3+ x^2)\big)\big(\sin(x^3 + x^2)\big)$$ $$ = (-3x^2 - 2x)\sin\big(2(x^3 + x^2)\big)$$
In moving from the second to last to the last equivalency, I simplified by invoking the double-angle angle formula which tells us that $2\cos\alpha\sin\alpha = \sin(2\alpha)$.
This is a function of function. Look at it from above. What is it? It is [something] squared. What is the derivative of [something] squared? Just 2*[something]. However, this something is also a function. What is it? It is cos[something]. What is derivative of cos[something]? -sin of this something, but again this something is a function which you also need to take derivative of. This kind of reasoning is called chain rule of differentiation.
$y' = 2 \cos(x^3+x^2) \cdot (-\sin(x^3 + x^2)) \cdot (3x^2+2x)$
$\newcommand{\dd}{\mathop{}\!\mathrm{d}}\newcommand{\per}{\cdot}$ First of all, we apply the rule for deriving composite functions: $$\frac{\dd f\circ g}{\dd x}=\frac{\dd f}{\dd g}\cdot\frac{\dd g}{\dd x}.$$ We see $\cos^2$ as the composition of $g(x)=\cos(x)$ and $f(x)=x^2$, so: $$\frac{\dd(\cos^2(x))}{\dd x}=\frac{\dd(\cos^2x)}{\dd(\cos x)}\per\frac{\dd(\cos x)}{\dd x}=-2\cos(x)\per\sin(x).$$ But then we don't have $\cos(x)$, but $\cos(x^3+x^2)$, so we multiply by the extra derivative and change the arguments of the trig functions: $$\frac{\dd(\cos^2(x^3+x^2))}{\dd x}=-2\cos(x^3+x^2)\sin(x^3+x^2)\per(3x^2+2x).$$