# Math Help - Derivative

1. ## Derivative

Hello,

can someone please show me how to get the first and second derivative for

$2cosx+cos^2x$

2. Originally Posted by l flipboi l
Hello,

can someone please show me how to get the first and second derivative for

$2cosx+cos^2x$
hi flipboi,

The derivative of $Cosx$ is $-Sinx$,
so the derivative of $2Cosx$ is the derivative of $(Cosx+Cosx)$ which is $(-Sinx-Sinx)=-2Sinx$.

If you use the trigonometric identity $Cos^2x=\frac{1}{2}(1+Cos2x)$ you can more easily find the derivative of $Cos^2x.$

$\frac{d}{dx}\frac{1}{2}(1+Cos2x)=\frac{1}{2}\frac{ d}{dx}Cos2x$

since the derivative of a constant is zero.

Now you have to use the Chain Rule to complete.

$u=2x,\ \frac{du}{dx}=2$

$\frac{d}{dx}Cos2x=\frac{d}{dx}Cosu=\frac{du}{dx}\f rac{d}{du}Cosu=2(-Sinu)=-2Sin2x$

Therefore the derivative of $Cos^2x$ is $-Sin2x$

3. Originally Posted by Archie Meade
hi flipboi,

The derivative of $Cosx$ is $-Sinx$,
so the derivative of $2Cosx$ is the derivative of $(Cosx+Cosx)$ which is $(-Sinx-Sinx)=-2Sinx$.

If you use the trigonometric identity $Cos^2x=\frac{1}{2}(1+Cos2x)$ you can more easily find the derivative of $Cos^2x.$

$\frac{d}{dx}\frac{1}{2}(1+Cos2x)=\frac{1}{2}\frac{ d}{dx}Cos2x$

since the derivative of a constant is zero.

Now you have to use the Chain Rule to complete.

$u=2x,\ \frac{du}{dx}=2$

$\frac{d}{dx}Cos2x=\frac{d}{dx}Cosu=\frac{du}{dx}\f rac{d}{du}Cosu=2(-Sinu)=-2Sin2x$

Therefore the derivative of $Cos^2x$ is $-Sin2x$

For the first derivative I did this:

-2sin(x) - 2cos(x)sin(x)

would this be correct?

for the second, i'm having a bit trouble.

4. Yes,

you expressed the double angle in terms of the single angle.
To obtain the second derivative, just treat the CosxSinx as a product
and differentiate using the product rule.

$\frac{d}{dx}(-2Sinx-2CosxSinx)=-2\frac{d}{dx}(Sinx+CosxSinx)$

$=-2\frac{d}{dx}Sinx-2\frac{d}{dx}uv=-2\frac{d}{dx}Sinx-2(v\frac{du}{dx}+u\frac{dv}{dx})$

$=-2\frac{d}{dx}Sinx-2(Sinx\frac{d}{dx}Cosx+Cosx\frac{d}{dx}Sinx)$

5. Originally Posted by Archie Meade
Yes,

you expressed the double angle in terms of the single angle.
To obtain the second derivative, just treat the CosxSinx as a product
and differentiate using the product rule.

$\frac{d}{dx}(-2Sinx-2CosxSinx)=-2\frac{d}{dx}(Sinx+CosxSinx)$

$=-2\frac{d}{dx}Sinx-2\frac{d}{dx}uv=-2\frac{d}{dx}Sinx-2(v\frac{du}{dx}+u\frac{dv}{dx})$

$=-2\frac{d}{dx}Sinx-2(Sinx\frac{d}{dx}Cosx+Cosx\frac{d}{dx}Sinx)$
so the 2nd derivative would be?

$-2cosx - 2cos^2x+2sin^2x
$

is there anyway to simplify this?

6. Yes flipboi,

You could simplify a little, using $Cos^2x-Sin^2x=Cos(2x)$

Then, $-2Cosx-2Cos^2x+2Sin^2x=-2Cosx-2(Cos^2x-Sin^2x)$

$=-2Cosx-2Cos2x$

7. Thats what I was missing! what is it called when you convert cos^2x - sin^2x = cos2x?

8. That's one of the list of trigonometric identities.

It comes from $Cos(A+B)=CosACosB-SinASinB$

If A and B are both x, we get $Cos(x+x)=Cos2x=CosxCosx-SinxSinx=Cos^2x-Sin^2x$

9. You can also write

$Cos2x=2Cos^2x-1\ \Rightarrow\ -2Cos2x=-4Cos^2x+2$

giving $-2Cosx-2Cos2x=-2Cosx-4Cos^2x+2=-2Cosx(1+2Cosx)+2$