practicecalculus
Trigonometric derivatives

Derivative of sin(x²): Formula, Proof and Examples

The derivative of sin(x²) is 2x cos(x²). See the chain rule step by step, how it differs from sin²x, the second derivative and worked examples.

Trigonometric derivatives Updated 2 min read

At a glance

\frac{d}{dx}\,\sin(x^2) = 2x\cos(x^2)
Derivative
2x\cos(x^2)
Outer and inner
Outer \sin u, inner u = x^2
Second derivative
2\cos(x^2) - 4x^2\sin(x^2)
Not the same as
\sin^2 x, whose derivative is \sin 2x
Integral
\int\sin(x^2)\,dx has no elementary antiderivative
On this page
  1. Graph of sin(x²) and its derivative
  2. Proof with the chain rule
  3. sin(x²) vs sin²x
  4. Worked examples
  5. Spotting the outside and the inside
  6. Common mistakes

The derivative of \sin(x^2) is 2x\cos(x^2). This is a classic chain rule problem: the sine is on the outside and x^2 is on the inside.

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

Graph of sin(x²) and its derivative

Graph of y = sin(x²) and its derivative y = 2x cos(x²)
The waves of \sin(x^2) get closer together as \lvert x\rvert grows, so the slopes get steeper. The factor 2x in the derivative captures this.

Unlike \sin x, this function is not periodic. It speeds up as you move away from 0, and the derivative grows roughly like 2x.

Proof with the chain rule

Set u = x^2, so y = \sin u. Then

\frac{dy}{du} = \cos u, \qquad \frac{du}{dx} = 2x

Multiply:

\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx} = \cos u\cdot 2x = 2x\cos(x^2)

The inside x^2 is copied unchanged into the cosine. The inside's derivative 2x goes out front. The two ingredients are the derivative of sin x and the derivative of x².

sin(x²) vs sin²x

These two are easy to mix up and have different derivatives:

Function Meaning Derivative
\sin(x^2) sine of x^2 2x\cos(x^2)
\sin^2 x (\sin x)^2 2\sin x\cos x = \sin 2x
\sin 2x sine of 2x 2\cos 2x

At x = 1, for example, \sin(1) \approx 0.841 while \sin^2(1) \approx 0.708. See the derivative of sin²x and the derivative of sin 2x.

Worked examples

Example 1: a constant inside. \frac{d}{dx}\sin(3x^2) = \cos(3x^2)\cdot 6x = 6x\cos(3x^2).

Example 2: a value. At x = \sqrt{\pi}, x^2 = \pi and \cos\pi = -1, so the slope is 2\sqrt{\pi}\cdot(-1) = -2\sqrt{\pi} \approx -3.54.

Example 3: a product. With the product rule:

\frac{d}{dx}\left(x\sin(x^2)\right) = \sin(x^2) + x\cdot 2x\cos(x^2) = \sin(x^2) + 2x^2\cos(x^2)

Example 4: second derivative. Differentiate 2x\cos(x^2) with the product rule:

\frac{d}{dx}\left(2x\cos(x^2)\right) = 2\cos(x^2) + 2x\cdot\left(-2x\sin(x^2)\right) = 2\cos(x^2) - 4x^2\sin(x^2)

Example 5: other powers. \frac{d}{dx}\sin(x^3) = 3x^2\cos(x^3) and \frac{d}{dx}\cos(x^2) = -2x\sin(x^2).

Spotting the outside and the inside

The hardest part of this problem is reading it correctly. Ask yourself which operation you would do last if you plugged in a number. For \sin(x^2) with x = 3, you square first to get 9, then take the sine. The last step, sine, is the outside function. The first step, squaring, is the inside. That ordering tells you exactly how to apply the chain rule. The same test works for any composite: whatever happens last is differentiated first, and the rest is multiplied on as the inner derivative.

Common mistakes

  1. Dropping the 2x. \cos(x^2) alone is only the outer derivative.
  2. Changing the inside. Writing 2x\cos x or \cos 2x loses the x^2.
  3. Reading it as \sin^2 x. Check the parentheses before you start.

Running the chain rule backward is u-substitution: \int 2x\cos(x^2)\,dx = \sin(x^2) + C. Practice more with the chain rule problems.

Practice it now

Chain rule: trig

Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.

Practice this lesson

Frequently asked questions

What is the derivative of sin(x²)?

It is 2x\cos(x^2). The outer derivative is \cos(x^2) and the inner derivative is 2x.

What is the difference between sin(x²) and sin²x?

In \sin(x^2) you square x first, then take the sine. In \sin^2 x = (\sin x)^2 you take the sine first, then square. Their derivatives are 2x\cos(x^2) and 2\sin x\cos x.

What is the derivative of sin(3x²)?

It is 6x\cos(3x^2), since the derivative of 3x^2 is 6x.

What is the integral of sin(x²)?

It has no formula in elementary functions. It defines the Fresnel integral and is usually evaluated numerically. By contrast, \int 2x\cos(x^2)\,dx = \sin(x^2) + C by u-substitution.

Written by the PracticeCalculus team

We build interactive calculus lessons and write every page to be clear and correct. Spotted something off? Tell us and we will fix it.