Chalk−1

Math · Calculus I · Worked example

Differentiate sin(x²) and sin²x

Differentiate y=sin(x2) and y=sin2x, and explain why the two answers differ.

sin(x2) and sin2x

Try one — Chalk checks each line

Find the layers of sin(x2)

Work out sin(x2) for x=3: first square 3 to get 9, then take sin9. 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, sinu, has derivative cosu with respect to u. The inside, x2, has derivative 2⁢x 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 x2 so the answer is in terms of x. Writing the 2⁢x in front is the usual form.

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

Find the layers of sin2x

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

u=sinx,y=u2

Differentiate each layer

The outside, u2, has derivative 2⁢u. The inside, sinx, has derivative cosx.

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

Multiply, then put the inside back

Multiply to get 2⁢u⋅cosx, then replace u with sinx.

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(x2) is 2⁢xcos(x2), and the derivative of sin2x is 2sinxcosx.

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

Your turn

1. One like the example

Differentiate y=cos(x3).

Show the answer and explanation

d⁢y⁢/⁢d⁢x=−3x2sin(x3).

The inside is u=x3 and the outside is cosu. The outside gives −sinu, evaluated at the inside as −sin(x3). The inside gives 3x2. Multiplying gives −sin(x3)⋅3x2 =−3x2sin(x3).

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

2. A variation

Differentiate y=cos3x, and compare it with cos(x3).

Show the answer and explanation

d⁢y⁢/⁢d⁢x=−3cos2xsinx.

cos3x means (cosx)3, so the cosine is the inside and the cube is the outside, the reverse of cos(x3). The cube gives 3cos2x, and the cosine gives −sinx. Their product is −3cos2xsinx.

y=cos3xd⁢yd⁢x=3cos2x⋅(−sinx)d⁢yd⁢x=−3cos2xsinx

3. Somewhere new

Differentiate y=esinx. Decide which part is the inside before you start.

Show the answer and explanation

d⁢y⁢/⁢d⁢x=esinxcosx.

Work it out for one x. You find sinx first and then raise e to that power, so the inside is sinx and the outside is eu. The outside is its own derivative, esinx, and the inside gives cosx.

y=esinxd⁢yd⁢x=esinxcosx

Keep exploring

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

Return to the concept →
Sources and scope

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

After reading

Try it, then study it

Open the example in its tool to check steps or change values, then review the key terms as flashcards.

Check both derivatives in Math Study the 4 key terms Open worked example on a board Chain rule in Math Reference

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