# 1st year calc, simple trig derivative

Hello!
This is probably real simple, just Im confused the question is Differentiate the following
y=sin^2 x - cos^2 x
I know you need to use just f'(x)+g'(x)
and I know the derivate of sinx is cosx and derivative of cosx is -sinx.... but what do you do with the sin^2.... is the derivate of sin^2x just cos^2x??? and derivate of cos^2x just -sin^2x? THANKS

## Answers and Replies

berkeman
Mentor
An easy way to think about it is cos^2(x) = cos(x) * cos(x), and use the chain rule (first times the derivative of the second, plus the second times the derivitave of the first)...

You could make it even easier by substituting in:
sin^2 x = 1 - cos^2 x
Then you get:
y = 1 - cos^2 x - cos^2 x = 1 - 2cos^2 x
And then you only have to use the chain rule (or product rule) once. :)

finchie_88
Unless I'm mistaken, $cos^2 x - sin^2 x = cos 2x$, so can you use that?

Last edited by a moderator:
HallsofIvy
Science Advisor
Homework Helper
berkeman said:
An easy way to think about it is cos^2(x) = cos(x) * cos(x), and use the chain rule (first times the derivative of the second, plus the second times the derivitave of the first)...

Yes, it can be done that way, but that's not the "chain rule", it is the "product rule".

To use the chain rule, let u(x)= cos(x) and y(u)= u2. Then dy/dx= (dy/du)(du/dx). That will give the derivative of cos2(x).
Also, of course, if you let u(x)= sin(x) and y(u)= u2 you can do exactly the same thing to get the derivative of sin2(x).

I assume that you know that d(f(x)+ g(x))/dx= df/dx+ dg/dx.

Looks like there are 3 different ways to do this!

berkeman
Mentor
HallsofIvy said:
Yes, it can be done that way, but that's not the "chain rule", it is the "product rule".
Oopsies, thanks for the correction. hello!
Thanks alot for the help... I decided to use the product rule since I am most familiar with that.
So once I did that I ended up with
(sinx)(cosx)+(sinx)(cosx) and (cosx)(-sinx)+(cosx)(-sinx)
so you add them together for f'(x)=h'(x)+g'(x)
now i ALWAYS mess these big things up... so heres what i did:
((sinx)(cosx)+(sinx)(cosx)) + ((cosx)(-sinx)+(cosx)(-sinx))
=2(sinxcosx)+2(cosx(-sinx))
=2sinx+2cosx+2cosx-2sinx
=0sinx+4cosx
=4cosx
Now that doesnt seem right can someone help me with what I am doing wrong? Or was the answer just 2(sinxcosx)+2(cosx(-sinx))... and I took it to far??? THANKS!

VietDao29
Homework Helper
There are some minor problems in your work.
m0286 said:
now i ALWAYS mess these big things up... so heres what i did:
((sinx)(cosx)+(sinx)(cosx)) + ((cosx)(-sinx)+(cosx)(-sinx))
The plus sign is wrong, you can take a look at the problem again, it's
y = sin2x - cos2x :)
=2(sinxcosx)+2(cosx(-sinx))
=2sinx+2cosx+2cosx-2sinx
How can you go from the former expression to latter one? Are you trying to say that
sin(x)cos(x) = sin(x) + cos(x)?
------------
Apart from that, everything looks perfect. :)

Ok thnx :)
I see it was a stupid mistake...
I went from
=2(sinxcosx)+2(cosx(-sinx)) to
=2sinx+2cosx+2cosx-2sinx Because i multiplied them by the 2 infront of the brackets.. guess thats wrong! haha but thanks. I always get confused when you do certain things and dont. Thanks for all your help!

HallsofIvy
Science Advisor
Homework Helper
I don't mean to put you down but you really need to review your algebra. My experience is that people who cannot do algebra easily have a very hard time with calculus.

Surely you cannot believe that
2(sin x cos x)= 2sin x+ 2cos x!

Because you were differentiating sin2x- cos2x you should have 2sin x cos x- (-2sin x cosx)= 2sin x cos x+ 2sin x cos x.

Remember that finchie-88 pointed out that cos2x- sin2x= cos(2x)? Take the derivative of cos(2x) and compare it with the above.