Back to Blog
    Math

    Derivative of ln(ax), sin(ax), cos(ax): Chain Rule Explained

    Y
    Ytools Team
    October 2, 2026 3 min read
    Share →
    Derivative of ln(ax), sin(ax) and cos(ax) — d/dx ln(ax) = 1/x

    Quick answers (for any non-zero constant aa, xx in radians):

    ddxln⁡(ax)=1xddxsin⁡(ax)=acos⁡(ax)ddxcos⁡(ax)=−asin⁡(ax)\frac{d}{dx}\ln(ax) = \frac{1}{x} \qquad \frac{d}{dx}\sin(ax) = a\cos(ax) \qquad \frac{d}{dx}\cos(ax) = -a\sin(ax)

    The surprising one is the first: the aa disappears. This guide shows why, using one chain-rule pattern that covers all three — plus eaxe^{ax}, tan⁡(ax)\tan(ax) and more.

    The one pattern: ddxf(ax)=a f′(ax)\frac{d}{dx}f(ax) = a\,f'(ax)

    When a function has another function inside it, the chain rule says: differentiate the outside, keep the inside, then multiply by the derivative of the inside.

    ddxf(g(x))=f′(g(x))⋅g′(x)\frac{d}{dx}f(g(x)) = f'(g(x))\cdot g'(x)

    With inside g(x)=axg(x) = ax, the inside's derivative is just aa. So every "f(ax)f(ax)" derivative is the normal derivative of ff, evaluated at axax, multiplied by aa.

    Derivative of ln(ax) = 1/x

    Proof 1 — log laws

    For a>0a > 0 and x>0x > 0, ln⁡(ax)=ln⁡a+ln⁡x\ln(ax) = \ln a + \ln x. Since ln⁡a\ln a is a constant, its derivative is 0:

    ddxln⁡(ax)=0+1x=1x\frac{d}{dx}\ln(ax) = 0 + \frac{1}{x} = \frac{1}{x}

    Proof 2 — chain rule

    Outside ln⁡(u)\ln(u) has derivative 1u\frac{1}{u}; inside u=axu = ax has derivative aa:

    ddxln⁡(ax)=1ax⋅a=1x\frac{d}{dx}\ln(ax) = \frac{1}{ax}\cdot a = \frac{1}{x}

    The aa in the denominator cancels the aa from the inside. This works whenever ax>0ax > 0 — including negative aa with negative xx. For example, for x<0x < 0, ddxln⁡(−2x)=1−2x⋅(−2)=1x\frac{d}{dx}\ln(-2x) = \frac{1}{-2x}\cdot(-2) = \frac{1}{x}.

    The graph that makes it obvious

    Graphs of ln(x), ln(2x) and ln(5x) with parallel tangent lines at x = 1.5
    Graphs of ln(x), ln(2x) and ln(5x) with parallel tangent lines at x = 1.5

    Because ln⁡(ax)=ln⁡x+ln⁡a\ln(ax) = \ln x + \ln a, the graph of ln⁡(5x)\ln(5x) is just ln⁡(x)\ln(x) shifted up by ln⁡5≈1.61\ln 5 \approx 1.61. Shifting a curve vertically doesn't change its steepness, so at every xx the three curves have exactly the same slope. At x=1.5x = 1.5 each tangent has slope 11.5≈0.667\frac{1}{1.5} \approx 0.667.

    Example: ddxln⁡(5x)=1x\frac{d}{dx}\ln(5x) = \frac{1}{x}. At x=1.3x = 1.3 the slope is 11.3≈0.769\frac{1}{1.3} \approx 0.769 — the same as for ln⁡x\ln x.

    Derivative of sin(ax) = a cos(ax)

    Outside sin⁡(u)\sin(u) → cos⁡(u)\cos(u); inside axax → aa:

    ddxsin⁡(ax)=acos⁡(ax)\frac{d}{dx}\sin(ax) = a\cos(ax)

    Example: ddxsin⁡(4x)=4cos⁡(4x)\frac{d}{dx}\sin(4x) = 4\cos(4x). Geometrically, sin⁡(4x)\sin(4x) oscillates 4 times faster than sin⁡x\sin x, so its slopes are 4 times steeper.

    Derivative of cos(ax) = −a sin(ax)

    Outside cos⁡(u)\cos(u) → −sin⁡(u)-\sin(u); inside → aa:

    ddxcos⁡(ax)=−asin⁡(ax)\frac{d}{dx}\cos(ax) = -a\sin(ax)

    Example: ddxcos⁡(3x)=−3sin⁡(3x)\frac{d}{dx}\cos(3x) = -3\sin(3x). Don't drop the minus sign — it comes from the derivative of cosine itself.

    Cheat sheet

    Chain rule cheat sheet for sin(ax), cos(ax), ln(ax), e^(ax) and tan(ax)
    Chain rule cheat sheet for sin(ax), cos(ax), ln(ax), e^(ax) and tan(ax)
    f(x)f(x)f′(x)f'(x)
    sin⁡(ax)\sin(ax)acos⁡(ax)a\cos(ax)
    cos⁡(ax)\cos(ax)−asin⁡(ax)-a\sin(ax)
    ln⁡(ax)\ln(ax), ax>0ax>01x\frac{1}{x}
    eaxe^{ax}a eaxa\,e^{ax}
    tan⁡(ax)\tan(ax)asec⁡2(ax)a\sec^2(ax)
    ln⁡(ax+b)\ln(ax+b), ax+b>0ax+b>0aax+b\frac{a}{ax+b}

    Note the last row: with an added constant bb, the aa no longer cancels completely.

    Beyond ax: when the inside is more complicated

    The same chain rule handles any inside function — you just multiply by its derivative.

    • ddxln⁡(x2+1)=1x2+1⋅2x=2xx2+1\frac{d}{dx}\ln(x^2+1) = \frac{1}{x^2+1}\cdot 2x = \frac{2x}{x^2+1}
    • ddxsin⁡(x2)=cos⁡(x2)⋅2x=2xcos⁡(x2)\frac{d}{dx}\sin(x^2) = \cos(x^2)\cdot 2x = 2x\cos(x^2)

    Common mistakes

    • Answering ax\frac{a}{x} or 1ax\frac{1}{ax} for ln⁡(ax)\ln(ax) — the correct answer is 1x\frac{1}{x}.
    • Forgetting the factor aa for sin, cos and exp.
    • Losing the minus sign on the derivative of cosine.
    • Working in degrees. These formulas assume radians; in degrees an extra factor of π180\frac{\pi}{180} appears.

    Check with a derivative calculator

    Use the derivative of ln calculator, the derivative of cos(ax) calculator, the sin derivative calculator or the exponential derivative calculator to confirm each result step by step. For any other inner function, the chain rule calculator shows the outside/inside split. New to derivatives? Start with the calculus step-by-step guide.

    FAQ

    What is the derivative of ln(ax)? 1x\frac{1}{x}, for any non-zero constant aa where ax>0ax > 0.

    Why doesn't the a appear in the derivative of ln(ax)? Because ln⁡(ax)=ln⁡a+ln⁡x\ln(ax) = \ln a + \ln x, and the constant ln⁡a\ln a differentiates to zero. With the chain rule, the aa cancels.

    What is the derivative of cos(ax)? −asin⁡(ax)-a\sin(ax).

    What is the derivative of sin(ax)? acos⁡(ax)a\cos(ax).

    What is the derivative of e^(ax)? a eaxa\,e^{ax}.

    Do these formulas work in degrees? No — they assume radians. In degrees, multiply by an extra π180\frac{\pi}{180}.

    Further reading: Wolfram MathWorld — Chain Rule · OpenStax Calculus Volume 1, chapter 3.