Skip to content
ihateDesmos

Derivative of cos²x

Updated 6 November 2026 · Checked numerically by the ihateDesmos engine
The derivative of cos²x
ddx(cos(x)2)=−2sin(x)cos(x)

The derivative of cos²x is −2 sin x cos x, which is also −sin 2x. Since sin²x + cos²x = 1, this is exactly the negative of the derivative of sin²x.

−3−2−1123−110
Open in calculator
y=cos(x)2
in blue and its derivative
y=−2sin(x)cos(x)
in red.

How to find the derivative of cos²x

Method: chain rule.

  1. 1
    Write the function as (cos x)², with u = cos x.
  2. 2
    The power rule on the outside gives 2u = 2 cos x.
  3. 3
    The derivative of the inside is −sin x.
  4. 4
    Multiply them: −2 sin x cos x.
  5. 5
    Using the double angle identity, this equals −sin 2x.

What it means on the graph

cos²x and sin²x add up to 1 at every x, so when one is rising, the other falls at exactly the same rate. Their derivatives must add to 0.

In the window shown, the derivative is zero at x = −π, x = −π/2, x = 0, x = π/2, x = π. Those are the points where the graph of cos²x has a horizontal tangent.

Table of values

The derivative column uses the formula. The last column estimates the slope directly from the original function, as an independent check.

Values of cos²x and its derivative
xcos²x−2 sin x cos xSlope, measured
−2.510.651391−0.95306−0.95306
−1.576.34136 × 10⁻⁷0.001592650.00159265
−0.6280.6548110.9508590.950859
0100
0.9420.345946−0.951351−0.951351
1.880.09259860.5797380.579738
2.510.6513910.953060.95306

Second derivative

Differentiating once more gives:

d2dx2(cos(x)2)=−2cos(2x)

The second derivative tells you which way the graph bends: positive means it curves upward, and negative means it curves downward.

Related derivatives

The same result with the chain or product rule. Each of these is checked numerically too.

Related derivatives
FunctionDerivative
cos(x)3
−3cos(x)2sin(x)

Common mistakes

  • Forgetting the minus sign from the derivative of cosine.

Frequently asked questions

What is the derivative of cos²x?
The derivative of cos²x is −2 sin x cos x.
What is the second derivative of cos²x?
Differentiate −2 sin x cos x again to get the second derivative. The result is shown on this page under “Second derivative”.

Keep going

Differentiate any function

Type your own function into the derivative calculator and see every rule applied, step by step.

Open the derivative calculator