Calculus · real student question

Differentiate y = 5cos(3x^2) with respect to x.

Question

Differentiate

y=5cos ⁣(3x2)y=5\cos\!\left(3x^{2}\right)

Step-by-step solution

  1. Identify the composition. The function is a cosine of something that is not simply xx, so the chain rule is required. Peel it into layers: a constant multiple 55, an outer function cos(u)\cos(u), and an inner function

    u=3x2u=3x^{2}

    Differentiating cos(3x2)\cos(3x^{2}) as if it were cosx\cos x — giving sin(3x2)-\sin(3x^{2}) alone — is the error the chain rule exists to prevent.

  2. Pull the constant out. A constant multiple passes straight through differentiation:

    dydx=5ddx[cos ⁣(3x2)]\frac{dy}{dx}=5\cdot\frac{d}{dx}\left[\cos\!\left(3x^{2}\right)\right]

  3. Differentiate the outer function, keeping the inside untouched. With dducosu=sinu\frac{d}{du}\cos u=-\sin u, the chain rule gives

    ddxcosu=sin(u)dudx\frac{d}{dx}\cos u=-\sin(u)\cdot\frac{du}{dx}

    The argument of sin\sin stays exactly 3x23x^{2} — the inside is never differentiated inside the sine.

  4. Differentiate the inner function and multiply. By the power rule, dudx=ddx(3x2)=6x\dfrac{du}{dx}=\dfrac{d}{dx}\left(3x^{2}\right)=6x, so

    dydx=5[sin ⁣(3x2)]6x=30xsin ⁣(3x2)\frac{dy}{dx}=5\cdot\left[-\sin\!\left(3x^{2}\right)\right]\cdot6x=-30x\sin\!\left(3x^{2}\right)

    The three numeric factors 55, 1-1 and 66 collapse into the single coefficient 30-30.

  5. Verify numerically. A central difference y(x+h)y(xh)2h\frac{y(x+h)-y(x-h)}{2h} with h=106h=10^{-6} matches 30xsin(3x2)-30x\sin(3x^{2}) at x=0.4x=0.4, 1.11.1 and 2.02.0 to within 10510^{-5} ✓. A structural check also passes: at x=0x=0 the derivative is 00, which is right because y=5cos(3x2)y=5\cos(3x^{2}) has a maximum there.

Answer

dydx=30xsin ⁣(3x2)\frac{dy}{dx}=-30x\sin\!\left(3x^{2}\right)

Need to solve a different problem like this? Open the solver →