Differentiate sin(3x²) by pairing the derivative of sine with the derivative of its inner function, 3x². The result is 6x cos(3x²). This simple pattern also helps with more complex composite functions, where keeping track of the inside matters.

Multiple Choice

Differentiate f(x) = sin(3x^2) with respect to x.

Chain rule applied to a composite function: differentiate the outer sine and multiply by the derivative of the inner function. Here the inner function is 3x^2, whose derivative is 6x, so the derivative becomes cos(3x^2) times 6x, i.e., 6x cos(3x^2). The other expressions miss this inner-derivative factor or mix up sine and cosine: dropping the 6x factor gives cos(3x^2); treating the inner function incorrectly gives 3x^2 cos(3x^2); and a negative sine term would come from differentiating cosine, not sine.

The Chain Rule: How to Differentiate a Function Inside a Function

Some functions have a little nesting doll quality. A familiar operation, such as taking a sine, sits around a more complicated expression. To find the derivative, it isn’t enough to look at the outer layer. You also need to account for how the expression inside it changes. That’s the idea behind the chain rule, one of the most useful tools in calculus.

Consider the function

[

f(x)=\sin(3x^2).

]

The sine function is applied not to (x) itself, but to the expression (3x^2). That inner expression changes as (x) changes, and its rate of change affects the rate of change of the whole function. The chain rule keeps both layers in view.

One function wrapped around another

A composite function is built by feeding one function into another. For example, in (\sin(3x^2)), the inner function is (3x^2), and the outer function is sine.

It can help to give the inner expression a temporary name:

[

u=3x^2.

]

Then the original function becomes

[

f(x)=\sin(u).

]

This small change in notation reveals the structure. The sine function acts on (u), while (u) depends on (x). So a change in (x) first changes (u), which then changes the sine value.

In words, the chain rule says:

Differentiate the outer function, keep the inner expression in place, and multiply by the derivative of the inner function.

For (f(x)=\sin(3x^2)), the outer function is sine. Its derivative is cosine, so differentiating the outer layer gives

[

\cos(3x^2).

]

The inner function, (3x^2), has derivative (6x). Multiply the two results:

[

f'(x)=\cos(3x^2)\cdot 6x

=6x\cos(3x^2).

]

The factor (6x) is easy to overlook if you rush. But it carries important information: it tells us how quickly the inside expression is changing.

Why the inner derivative matters

Imagine following a moving point through two stages. First, (x) changes. That changes (3x^2). Then the sine function responds to the new value of (3x^2). The full rate of change depends on both stages.

This is similar to a chain of conversions. If a distance changes by a certain number of miles per hour, and each mile corresponds to a fixed number of kilometers, the kilometer rate depends on both rates. One change passes through another.

In calculus, the chain rule writes this idea precisely. If

[

y=f(g(x)),

]

then

[

\frac{dy}{dx}=f'(g(x)),g'(x).

]

The first factor measures how the outer function changes with its input. The second measures how the inner function changes with (x). Together, they describe the rate of change of the full composition.

For the sine example, the outer rate is (\cos(3x^2)), and the inner rate is (6x). Neither factor is decoration. Leave one out, and you’ve described only part of the motion.

A reliable way to spot the layers

When a function looks nested, pause before differentiating. Ask: what is the outer operation, and what expression is being fed into it?

For example, in

[

\cos(5x+1),

]

cosine is the outer function, and (5x+1) is inside it. The derivative of cosine is negative sine, so the outer derivative is

[

-\sin(5x+1).

]

The derivative of the inside is (5), giving

[

\frac{d}{dx}\cos(5x+1)=-5\sin(5x+1).

]

A different example adds another layer:

[

\left(2x^3-4\right)^5.

]

Here, the outside operation is raising an expression to the fifth power. The inside is (2x^3-4). Differentiating the outer layer gives

[

5(2x^3-4)^4,

]

and differentiating the inside gives (6x^2). Therefore,

[

\frac{d}{dx}\left(2x^3-4\right)^5

=30x^2(2x^3-4)^4.

]

The same pattern appears even when the functions look quite different. Identify the layers, work from the outside inward, and multiply by each inner derivative.

The chain rule with trigonometric functions

Trigonometric functions show why it’s important to know both the derivative rule and the chain rule. The basic derivatives include

[

\frac{d}{dx}\sin x=\cos x

]

and

[

\frac{d}{dx}\cos x=-\sin x.

]

Those rules apply directly when the input is simply (x). When the input is another expression, that expression’s derivative must also be included.

For instance,

[

\frac{d}{dx}\sin(3x^2)

= \cos(3x^2)\cdot 6x.

]

The sine becomes cosine; the inside stays in place; then the derivative of the inside, (6x), joins the product.

This also helps distinguish a sign change from an inner-function factor. Sine differentiates to cosine, with no negative sign. Cosine differentiates to negative sine. The negative sign comes from the derivative rule for cosine, not merely from the presence of a complicated input.

That distinction is small on paper but useful in longer expressions, where several rules may appear together.

A quick check through rates

A derivative can often be checked by thinking about what happens at a particular input. At (x=0), the function

[

f(x)=\sin(3x^2)

]

has derivative

[

f'(0)=6(0)\cos(0)=0.

]

That makes sense: near zero, the inner expression (3x^2) changes very slowly. Since the sine function is responding to that slowly changing input, the whole function has a horizontal tangent there.

For nonzero (x), the factor (6x) changes sign. When (x) is positive, the inner expression is increasing; when (x) is negative, it is decreasing. The cosine factor also affects the result, so the full behavior depends on both pieces. A derivative is not just a formula to memorize—it describes how the graph moves from point to point.

Common slips, and how to avoid them

One frequent slip is differentiating only the outside function. That would produce (\cos(3x^2)), but it ignores how fast (3x^2) changes. The missing factor is (6x).

Another is treating the inner expression as if it were itself the derivative. The expression (3x^2) is the input to sine; its derivative is (6x). Keeping those roles separate prevents a lot of confusion.

A third slip is mixing up the trigonometric derivative rules. Sine leads to cosine, while cosine leads to negative sine. It can help to write the outer-function rule first, then substitute the full inner expression, and only then multiply by the inner derivative.

For the original function, that sequence is:

[

\sin(3x^2)

\longrightarrow

\cos(3x^2)

\longrightarrow

\cos(3x^2)\cdot 6x.

]

The idea in a nutshell

The chain rule handles nested change. It asks you to track the outer function’s response and the inner function’s rate at the same time.

For

[

f(x)=\sin(3x^2),

]

the outer derivative is (\cos(3x^2)), and the inner derivative is (6x). Thus,

[

\boxed{f'(x)=6x\cos(3x^2)}.

]

Once you learn to see a composite function as a set of layers, the rule becomes less like a trick and more like a clear description of how change travels through a function.