Steply

Derivative of cos(x^2)

Step by step, with the reason for every step · Derivatives of sin, cos, e and ln · Calculus

Step by step

The question

Question: find dy/dx for y = cos(x²).

y = cos(x2)

1 The inside

There is something inside: x².

Call it u.

u = x2

Then y is just cos u.

y = cos u

2 The outside

The derivative of cos x is −sin x.

Mind the minus!

cos x → −sin x

First the outside.

The rule on cos u gives −sin u.

dydu = −sin u

3 The inside's slope

Now the inside.

The power rule on x² gives 2x.

dudx = 2x

4 Multiply

The chain rule: multiply the two.

dy/du times du/dx.

dydx = dydu × dudx

Put the inside back in place of u.

= −sin(x2) × 2x

Careful!

Do not stop here!

We must multiply by the inside's slope, 2x.

Careful: not −sin(x2) ✗
−1 × 2x = −2x

Write the numbers in front.

So dy/dx = −2x sin(x²).

= −2x sin(x2)

5 Check

Let's check: the derivative is the slope.

At x = 1, the rule gives −1.6829, with a calculator in radians.

dy/dx at x = 1: −1.6829

Now the slope between two very close points: x = 1 and x = 1.001.

A calculator gives about −1.68.

Very close to −1.6829.

Right!

y(1.001) − y(1)0.001 ≈ −1.68

Let's look back.

First: the inside.

Then: the outside.

Then: the inside's slope.

Then: multiply.

Last: check.

Answer
= −2x sin(x2)

Your turn

Try this one yourself, then check:

y = 5 cos(x2)
Show the answer
dydx = −10x sin(x2)

More from Derivatives of sin, cos, e and ln

The whole lesson: Derivatives of sin, cos, e and ln →