1. ## Derivative

Hello,

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

$\displaystyle 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

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

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

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

$\displaystyle \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.

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

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

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

Combine the two for your final answer.

3. Originally Posted by Archie Meade
hi flipboi,

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

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

$\displaystyle \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.

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

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

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

Combine the two for your final answer.
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.

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

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

$\displaystyle =-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.

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

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

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

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

is there anyway to simplify this?

6. Yes flipboi,

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

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

$\displaystyle =-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 $\displaystyle Cos(A+B)=CosACosB-SinASinB$

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

9. You can also write

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

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