Derivatives of the Sine, Cosine and Tangent Functions

It can be shown from first principles that:

d(sin x)dx=cos x
d(cos x)dx=sin x
d(tan x)dx=sec2x
In words, we would say:
The derivative of sin x is cos x,
The derivative of cos x is −sin x (note the negative sign!) and
The derivative of tan x is sec2x.
Now, if u = f(x) is a function of x, then by using the chain rule, we have:
d(sin u)dx=cos ududx
d(cos u)dx=sin ududx
d(tan u)dx=sec2ududx

Example 1

y=sin(x2+3).


Differentiate y=sin(x2+3First, let: 
u=x2+3 and so y=sin u.
We have:
dydx=dydududx=cos ududx=cos(x2+3)d(x2+3)dx=2x cos(x2+3)
IMPORTANT:
cos x2 + 3
does not equal
cos(x2 + 3).
The brackets make a big difference. Many students have trouble with this.
Here are the graphs of y = cos x2 + 3 (in green) and y = cos(x2 + 3) (shown in blue).
The first one, y = cos x2 + 3, or y = (cos x2) + 3, means take the curve y = cos x2 and move it up by 3 units.
Graph y = cos(x^2+3)
The second one, y = cos(x2 + 3), means find the value (x2 + 3) first, then find the cosine of the result.
They are quite different!
Graph y = cos(x^2+3)

Example2

Find the derivative of 
In the final term, put u = 2x3.
We have:
y=3 sin 4x+5 cos 2x3
dydx=(3)(cos 4x)(4)+(5)(sin 2x3)(6x2)=12 cos 4x30x2
sin 2y=3 sin 4x+5 cos 2x3

=dydududx=sin ududx=sin(3x4)d(3x4)dx=12x3sin 3x4
y=cos 3x4