Chalk−1

Math · Calculus I · Worked example

Differentiate sin(x²) and sin²x

Differentiate y = sin(x²) and y = sin²x, and explain why the two answers differ.

sin(x2) and sin2x

Find the layers of sin(x²)

Work out sin(x²) for x = 3: first square 3 to get 9, then take sin 9. The squaring happens first, so it is the inside. The sine happens last, so it is the outside.

u=x2,y=sinu

Differentiate each layer

The outside, sin u, has derivative cos u with respect to u. The inside, x², has derivative 2x with respect to x.

d⁢yd⁢u=cosu,d⁢ud⁢x=2⁢x

Multiply, then put the inside back

Multiply the two rates, then replace u with x² so the answer is in terms of x. Writing the 2x in front is the usual form.

d⁢yd⁢x=cos(x2)⋅2⁢x=2⁢xcos(x2)

Find the layers of sin²x

sin²x is shorthand for (sin x)². For x = 3, you first find sin 3 and then square the result. Now the sine is the inside and the square is the outside, the reverse of sin(x²).

u=sinx,y=u2

Differentiate each layer

The outside, u², has derivative 2u. The inside, sin x, has derivative cos x.

d⁢yd⁢u=2⁢u,d⁢ud⁢x=cosx

Multiply, then put the inside back

Multiply to get 2u·cos x, then replace u with sin x.

d⁢yd⁢x=2sinxcosx

Compare the two answers

Both functions are built from a sine and a square, in opposite orders, and the chain rule follows the order. Whichever operation is done last is the outside: its derivative is the one evaluated at the inside. The other operation supplies the multiplying factor.

Result

The derivative of sin(x²) is 2x cos(x²), and the derivative of sin²x is 2 sin x cos x.

dd⁢xsin(x2)=2⁢xcos(x2)dd⁢xsin2x=2sinxcosx

Your turn

Differentiate y = cos(x³).

Show the answer and explanation

dy/dx = −3x² sin(x³).

The inside is u = x³ and the outside is cos u. The outside gives −sin u, evaluated at the inside as −sin(x³). The inside gives 3x². Multiply: −sin(x³)·3x² = −3x² sin(x³).

y=cos(x3)d⁢yd⁢x=−sin(x3)⋅3x2d⁢yd⁢x=−3x2sin(x3)

Keep exploring

Open both derivatives in Math: the Checker marks each one ✓. Change 2x cos(x²) to cos(x²) and its mark turns to ✗, because the inside’s factor 2x is missing.

Return to the concept →
Sources and scope

Authored study material. Tool results depend on the stated inputs and model assumptions.

Make it concrete

Try in the workspace

Open the example inputs, change a value and keep a useful result on your board.

Check both derivatives in Math Open worked example on a board Chain rule in Math Reference

Your existing work stays on this device. Examples open as editable copies.