Solveeit Logo

Question

Question: How do you differentiate \(\operatorname{f}\left( x \right)={{\cos }^{2}}x\) ?...

How do you differentiate f(x)=cos2x\operatorname{f}\left( x \right)={{\cos }^{2}}x ?

Explanation

Solution

Problems on differentiating a function like this can be done by simply applying the laws of differentiation accordingly followed by some simplifications. We differentiate the given composite function using the chain rule of differentiation i.e., ddx[f(g(x))]=f(g(x))g(x)\dfrac{d}{dx}\left[ f\left( g\left( x \right) \right) \right]={f}'\left( g\left( x \right) \right){g}'\left( x \right) . We assume the function cosx\cos x to be similar to g(x)\operatorname{g}\left( x \right) and apply the chain rule which leads us to the required given.

Complete step by step answer:
The function we are given is f(x)=cos2x\operatorname{f}\left( x \right)={{\cos }^{2}}x
As the above function is a composite one, we must use the chain rule of differentiation to find the derivative of this.
According to the chain rule of differentiation ddx[f(g(x))]=f(g(x))g(x)\dfrac{d}{dx}\left[ f\left( g\left( x \right) \right) \right]={f}'\left( g\left( x \right) \right){g}'\left( x \right)
Similarly, we assume the function cosx\cos x to be similar to g(x)\operatorname{g}\left( x \right) i.e., g(x)=cosx\operatorname{g}\left( x \right)=\cos x .
We know
f(x)=cos2x=(cosx)2\Rightarrow \operatorname{f}\left( x \right)={{\cos }^{2}}x={{\left( \cos x \right)}^{2}}
Hence, from the above assumptions we can write
\Rightarrow \operatorname{f}\left( \operatorname{g}\left( x \right) \right)={{\left( \cos x \right)}^{2}}={{\left\\{ \operatorname{g}\left( x \right) \right\\}}^{2}}
Also, we know
\Rightarrow {g}'\left( x \right)=\dfrac{d\left\\{ \operatorname{g}\left( x \right) \right\\}}{dx}
Completing the above derivation, we get
g(x)=ddx(cosx)=sinx\Rightarrow {g}'\left( x \right)=\dfrac{d}{dx}\left( \cos x \right)=-\sin x
Therefore, applying the chain rule of differentiation we can write
ddx[f(g(x))]=df(g(x))dg(x)dg(x)dx\Rightarrow \dfrac{d}{dx}\left[ f\left( g\left( x \right) \right) \right]=\dfrac{d\operatorname{f}\left( \operatorname{g}\left( x \right) \right)}{d\operatorname{g}\left( x \right)}\cdot \dfrac{d\operatorname{g}\left( x \right)}{dx}
Also,
\Rightarrow \dfrac{d\operatorname{f}\left( \operatorname{g}\left( x \right) \right)}{d\operatorname{g}\left( x \right)}=\dfrac{d{{\left\\{ \operatorname{g}\left( x \right) \right\\}}^{2}}}{d\operatorname{g}\left( x \right)}
Completing the derivation, we get
df(g(x))dg(x)=2cosx\Rightarrow \dfrac{d\operatorname{f}\left( \operatorname{g}\left( x \right) \right)}{d\operatorname{g}\left( x \right)}=2\cos x
Now, we substitute the above values of differentiation of the functions in the main equation as shown below
ddx[f(g(x))]=df(g(x))dg(x)dg(x)dx\Rightarrow \dfrac{d}{dx}\left[ f\left( g\left( x \right) \right) \right]=\dfrac{d\operatorname{f}\left( \operatorname{g}\left( x \right) \right)}{d\operatorname{g}\left( x \right)}\cdot \dfrac{d\operatorname{g}\left( x \right)}{dx}
ddx[f(g(x))]=2cosx(sinx)\Rightarrow \dfrac{d}{dx}\left[ f\left( g\left( x \right) \right) \right]=2\cos x\left( -\sin x \right)
Omitting the bracket, we get
ddx[f(g(x))]=2cosxsinx\Rightarrow \dfrac{d}{dx}\left[ f\left( g\left( x \right) \right) \right]=-2\cos x\sin x
We know that from the principles of trigonometric functions the formula for double angle identity of sin is
sin2x=2sinxcosx\sin 2x=2\sin x\cos x
Hence, we put the above shown expression in place of 2sinxcosx2\sin x\cos x as shown below
ddx[f(g(x))]=sin2x\Rightarrow \dfrac{d}{dx}\left[ f\left( g\left( x \right) \right) \right]=-\sin 2x
Thus,
f(x)=sin2x\Rightarrow {f}'\left( x \right)=-\sin 2x

Therefore, we conclude that the derivative of the given function is sin2x-\sin 2x

Note: While applying the chain rule of differentiation we must be careful that all the functions are defined properly and the chain rule is used accordingly. Also, in spite of using the chain rule we could have also differentiated the given function by using the first principle of derivative i.e., the conventional method. Though, we prefer using the chain rule as it is simple and easy to understand.