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
2
Differentiate each layer
The outside, sinu, has derivative cosu with respect to u. The inside, x2, has derivative 2x with respect to x.
dudy=cosu,dxdu=2x
3
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 2x in front is the usual form.
dxdy=cos(x2)⋅2x=2xcos(x2)
4
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
5
Differentiate each layer
The outside, u2, has derivative 2u. The inside, sinx, has derivative cosx.
dudy=2u,dxdu=cosx
6
Multiply, then put the inside back
Multiply to get 2u⋅cosx, then replace u with sinx.
dxdy=2sinxcosx
7
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 2xcos(x2), and the derivative of sin2x is 2sinxcosx.
dxdsin(x2)=2xcos(x2)dxdsin2x=2sinxcosx
Your turn
1. One like the example
Differentiate y=cos(x3).
Show the answer and explanation
dy/dx=−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)dxdy=−sin(x3)⋅3x2dxdy=−3x2sin(x3)
2. A variation
Differentiate y=cos3x, and compare it with cos(x3).
Show the answer and explanation
dy/dx=−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=cos3xdxdy=3cos2x⋅(−sinx)dxdy=−3cos2xsinx
3. Somewhere new
Differentiate y=esinx. Decide which part is the inside before you start.
Show the answer and explanation
dy/dx=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=esinxdxdy=esinxcosx
Keep exploring
Open both derivatives in Math: the Checker marks each one ✓. Change 2xcos(x2) to cos(x2) and its mark turns to ✗, because the inside’s factor 2x is missing.