Derivatives

Derivative of cos²(x): −sin(2x) with Two Methods

Derivative of cos²(x): −sin(2x) with Two Methods — CalculusCalc cover image

Quick answer:

$$\frac{d}{dx}\cos^2 x = -2\sin x\cos x = -\sin(2x)$$

Both forms are correct and equal. Most textbooks and answer keys prefer \( -\sin 2x \) because it is shorter and makes the period and zeros easy to read.

Method 1: chain rule

Read \( \cos^2 x \) as \( (\cos x)^2 \): an outer squaring function with \( \cos x \) inside. The chain rule gives

$$\frac{d}{dx}(\cos x)^2 = 2\cos x\cdot\frac{d}{dx}\cos x = 2\cos x\,(-\sin x) = -2\sin x\cos x$$

The double angle identity \( \sin 2x = 2\sin x\cos x \) tidies this to \( -\sin 2x \).

In words: square is the outer layer, so its derivative \( 2u \) comes first with the inside \( u = \cos x \) left alone. Then multiply by the derivative of the inside, which is \( -\sin x \). That minus sign is where the negative in the final answer comes from.

Method 2: power-reduction identity

Rewrite first: \( \cos^2 x = \frac{1 + \cos 2x}{2} \). Then

$$\frac{d}{dx}\frac{1 + \cos 2x}{2} = \frac{-2\sin 2x}{2} = -\sin 2x$$

Both methods agree, which is a nice self-check on exams.

Method 3: product rule

You can also treat \( \cos^2 x \) as \( \cos x\cdot\cos x \) and use the product rule:

$$(-\sin x)\cos x + \cos x(-\sin x) = -2\sin x\cos x$$

This is slower than the chain rule, but it is a good way to convince yourself where the factor of 2 comes from: there are two identical factors, and each one gets differentiated once.

Why the answer makes sense

Picture the graph. Since \( \cos^2 x = \frac{1 + \cos 2x}{2} \), it is an ordinary cosine wave that has been squashed to height 1, lifted so it sits between 0 and 1, and sped up so it repeats every \( \pi \) instead of every \( 2\pi \).

The derivative should therefore be a wave with the same period \( \pi \), and that is exactly what \( -\sin 2x \) is. It should be zero at the tops and bottoms of the curve, negative while the curve falls from 1 to 0, and positive while it climbs back. It should also be steepest halfway between a peak and a trough, where \( \cos^2 x = \frac12 \). At \( x = \frac{\pi}{4} \) the slope is \( -\sin\frac{\pi}{2} = -1 \), the steepest descent the curve ever reaches.

Sin² for comparison

$$\frac{d}{dx}\sin^2 x = 2\sin x\cos x = \sin 2x$$

Notice \( \frac{d}{dx}\sin^2 x = -\frac{d}{dx}\cos^2 x \). That has to be true, because \( \sin^2 x + \cos^2 x = 1 \) is constant.

Don’t confuse cos²(x) with cos(x²)

These are different functions:

Function Meaning Derivative
\( \cos^2 x \) \( (\cos x)^2 \) \( -\sin 2x \)
\( \cos(x^2) \) cosine of \( x^2 \) \( -2x\sin(x^2) \)

The notation \( \cos^2 x \) always means “take the cosine, then square the result.” The square is applied last, so it is the outer function.

More examples

1. \( \cos^2(3x) \): two layers of chain rule.

$$2\cos(3x)\cdot(-\sin 3x)\cdot 3 = -6\sin 3x\cos 3x = -3\sin 6x$$

2. \( \cos^3 x \): \( 3\cos^2 x\cdot(-\sin x) = -3\cos^2 x\sin x \)

3. Slope at a point. At \( x = \frac{\pi}{6} \), the slope of \( \cos^2 x \) is \( -\sin\frac{\pi}{3} = -\frac{\sqrt3}{2} \approx -0.866 \).

4. Tangent line at \( x = \frac{\pi}{4} \). The point is \( \left(\frac{\pi}{4}, \frac12\right) \) because \( \cos^2\frac{\pi}{4} = \frac12 \), and the slope is \( -1 \). The tangent line is

$$y = -x + \frac{\pi}{4} + \frac12$$

5. \( e^{\cos^2 x} \): the exponential is outermost. Its derivative is itself, times the derivative of the exponent:

$$\frac{d}{dx}e^{\cos^2 x} = -\sin(2x)\,e^{\cos^2 x}$$

6. \( \frac{1}{\cos^2 x} \): this is \( \sec^2 x \). Write it as \( (\cos x)^{-2} \) and use the chain rule:

$$-2(\cos x)^{-3}(-\sin x) = \frac{2\sin x}{\cos^3 x} = 2\sec^2 x\tan x$$

7. \( \cos^2 x - \sin^2 x \): this equals \( \cos 2x \), so the derivative is \( -2\sin 2x \). Subtracting the two separate answers, \( -\sin 2x - \sin 2x \), gives the same thing.

Check it numerically

You do not have to trust the rules blindly. A derivative is a limit of slopes of short secant lines, so you can test the answer with a calculator. Pick \( x = \frac{\pi}{4} \), step a tiny distance \( h = 0.001 \) to each side, and compute the slope of the line joining the two points:

$$\frac{\cos^2\left(\frac{\pi}{4} + 0.001\right) - \cos^2\left(\frac{\pi}{4} - 0.001\right)}{0.002} \approx -0.9999993$$

That is extremely close to the exact value \( -\sin\frac{\pi}{2} = -1 \) predicted by the formula. If you had made the classic mistake of writing \( 2\cos x \) as the derivative, you would have predicted about 1.414 instead, and the mismatch would expose the error at once. This two-point check is quick, works for any derivative you are unsure of, and is a good habit whenever a calculator is allowed.

Higher derivatives

Because the first derivative is a single sine term, higher derivatives follow a clean pattern. Each one brings out another factor of 2:

$$\begin{aligned} f'(x) &= -\sin 2x \\ f''(x) &= -2\cos 2x \\ f'''(x) &= 4\sin 2x \\ f^{(4)}(x) &= 8\cos 2x \end{aligned}$$

The second derivative calculator is a quick way to check this kind of pattern.

Where is the slope zero?

\( -\sin 2x = 0 \) when \( x = \frac{k\pi}{2} \). At multiples of \( \pi \), \( \cos^2 x = 1 \) (maximum); at odd multiples of \( \frac{\pi}{2} \), \( \cos^2 x = 0 \) (minimum).

Increasing and decreasing intervals

The sign of the derivative tells you where \( \cos^2 x \) rises and falls. On one period, \( [0, \pi] \):

  • On \( \left(0, \frac{\pi}{2}\right) \), \( 2x \) lies between 0 and \( \pi \), so \( \sin 2x > 0 \) and the derivative \( -\sin 2x \) is negative. The function decreases from 1 to 0.
  • On \( \left(\frac{\pi}{2}, \pi\right) \), \( 2x \) lies between \( \pi \) and \( 2\pi \), so \( \sin 2x < 0 \) and the derivative is positive. The function climbs back from 0 to 1.

The same pattern repeats on every interval of length \( \pi \). Reading behavior off the derivative like this is the core skill behind curve sketching and optimization.

A puzzle: three different antiderivatives

Run the result backwards and you get a classic source of confusion. What is \( \int\sin 2x\,dx \)? Depending on the method, you may find any of these:

$$\sin^2 x + C, \qquad -\cos^2 x + C, \qquad -\frac{\cos 2x}{2} + C$$

All three are correct. Differentiate each and you get \( \sin 2x \) every time. They look different because they differ by constants: \( \sin^2 x \) and \( -\cos^2 x \) differ by exactly 1, and \( -\frac{\cos 2x}{2} \) differs from \( \sin^2 x \) by \( \frac12 \). The “+ C” absorbs the difference. If you solve it with u-substitution and your answer does not match the back of the book, check whether the two answers differ by a constant before assuming you made an error.

Where it’s used

Squared cosines appear whenever something depends on an angle through energy or intensity rather than amplitude. When polarized light passes through a polarizing filter, the transmitted intensity is proportional to \( \cos^2\theta \), where \( \theta \) is the angle between the light’s polarization and the filter. The derivative \( -\sin 2\theta \) tells you how sensitive the brightness is to turning the filter, and it is largest at 45 degrees.

In calculus courses, \( \cos^2 x \) matters most as a stepping stone to integrals of trigonometric powers, where the same power-reduction identity does the work.

Common mistakes

  • Dropping the inside derivative. Writing \( 2\cos x \) forgets to multiply by \( -\sin x \).
  • Squaring the derivative. \( (-\sin x)^2 = \sin^2 x \) is not the derivative; the chain rule multiplies, it does not square.
  • Losing the sign. The derivative of \( \cos x \) is \( -\sin x \), so the answer is negative.
  • Misreading the double angle. \( -\sin 2x \) is not \( -2\sin x \). The 2 lives inside the sine.
  • Mixing up \( \cos^2 x \) and \( \cos(x^2) \). Check which operation happens last before you start.

Try it yourself

Step-by-step solverExact symbolic engine

Interactive Calculus Problem Solver

Derivatives, antiderivatives, definite and improper integrals, and limits. Every answer comes with the rules used, and antiderivatives are verified by differentiating them back.

Try:
Input syntax
  • Powers x^2, roots sqrt(x), cbrt(x), absolute value |x|
  • Implicit multiplication works: 3x sin(2x)
  • sin cos tan sec csc cot, asin acos atan, sinh cosh tanh
  • e^x or exp(x); ln(x) and log(x) are both the natural log
  • Constants pi and e; bounds accept inf and -inf
Enter a function and press Solve to see a full worked solution.

You can check other variations in the derivative calculator.

Practice problems

Try these before checking the answers.

  1. \( \frac{d}{dx}\sin^2(4x) \)
  2. \( \frac{d}{dx}\cos^2(x^2) \)
  3. \( \frac{d}{dx}\,x\cos^2 x \)
  4. \( \frac{d}{dx}\cos^2(5x) \)
  5. The second derivative of \( \sin^2 x \)
  6. \( \frac{d}{dx}\ln(\cos^2 x) \)

Answers: (1) \( 4\sin(8x) \); (2) \( -2x\sin(2x^2) \); (3) \( \cos^2 x - x\sin 2x \); (4) \( -5\sin(10x) \); (5) \( 2\cos 2x \); (6) \( -2\tan x \).

FAQ

What is the integral of cos²x?

Use the same identity: \( \int\cos^2 x\,dx = \frac{x}{2} + \frac{\sin 2x}{4} + C \). The sine version is in integral of sin²x.

What is the second derivative of cos²x?

Differentiate \( -\sin 2x \): \( -2\cos 2x \).

Is the answer −2 sin x cos x or −sin 2x?

Both. They are the same function written two ways, thanks to the identity \( \sin 2x = 2\sin x\cos x \). Either form earns full credit unless a question asks you to simplify.

What is the derivative of cos²(2x)?

Chain rule with three layers: \( 2\cos 2x\cdot(-\sin 2x)\cdot 2 = -4\sin 2x\cos 2x = -2\sin 4x \).

How is this related to the derivative of tan x?

The derivative of \( \tan x \) is \( \frac{1}{\cos^2 x} = \sec^2 x \), so squared cosines appear there too. See derivative of tan x.

Further reading

Calculators for this topic

Leave a comment

Your email address will not be published. Required fields are marked *