# 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.

Source: https://practicecalculus.com/derivatives/sin-x-squared
Updated: 2026-11-06

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

## At a glance

- **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

## Key takeaways

- The derivative of $\sin(x^2)$ is $2x\cos(x^2)$.
- It is a chain rule problem: cosine of the same inside, times the derivative of $x^2$.
- Keep $x^2$ inside the cosine. The answer is not $2x\cos x$.
- $\sin(x^2)$ and $\sin^2 x$ are different functions, so watch the notation.

The **derivative of $\sin(x^2)$ is $2x\cos(x^2)$**. This is a classic [chain rule](/rules/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
title: 'Graph of y = sin(x²) and its derivative y = 2x cos(x²)'
caption: '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.'
x: [-3.2, 3.2]
y: [-7, 7]
functions:
  - expr: sin(x^2)
    label: y = sin(x²)
  - expr: 2x cos(x^2)
    label: y = 2x cos(x²) (derivative)
    dashed: true
points:
  - [0, 0, 'flat, slope 0']
  - [1.2533, 1, 'peak, slope 0']
```

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](/derivatives/sin-x) and the [derivative of x²](/derivatives/x-squared).

## 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](/derivatives/sin-squared-x) and the [derivative of sin 2x](/derivatives/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](/rules/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](/rules/u-substitution-rule): $\int 2x\cos(x^2)\,dx = \sin(x^2) + C$. Practice more with the [chain rule problems](/practice-problems/chain-rule).

## 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.
