Derivatives of Exponentials, Logarithms, and Trigonometric Functions
Learning Objectives
- Explain why is the base whose exponential function is its own derivative, and derive .
- Derive from the exponential, and state its domain.
- State the derivatives of , , and the need for radians, and combine them with the chain rule.
- Differentiate an expression defined implicitly, and recognize the points where the method breaks down.
- Use logarithmic differentiation for expressions such as that the basic rules do not reach.
Context & Motivation
The previous lesson, differentiation-rules-and-the-chain-rule, can differentiate any combination of powers, sums, products, quotients and compositions. Its reach stops at the first function that is not a power of . Exponentials, logarithms and trigonometric functions are the functions that model growth, decay, scale and oscillation: compound interest, algorithm running times measured in , probabilities in a classifier, a vibrating spring, a rotating coordinate frame. A differentiation toolkit that cannot handle them is not usable.
The exponential, sine and cosine have a property that polynomials lack: differentiating keeps them inside their family and never reduces them to . The exponential's derivative is a multiple of itself, and and differentiate into each other, while differentiating a polynomial lowers its degree until nothing is left. The logarithm and the tangent do leave their family, giving and , but the results are simple expressions in functions already known. The limit work differs from one to the next: the exponential needs one limit, sine and cosine need two, and the logarithm needs no new limit at all, because it follows from the exponential through the inverse relationship. Once a derivative is found, the chain rule carries it everywhere.
The lesson also covers two techniques that handle expressions where the variable sits where a basic rule does not expect it: implicit differentiation, for curves such as that are not given as , and logarithmic differentiation, for expressions such as .
Core Theory
The number and the exponential
For a base the difference quotient of factors:
The factor does not depend on . If the limit exists, then : the derivative of an exponential is proportional to itself, and the whole question is the constant. Numerically, with :
textb L(b) 2 0.693147 2.5 0.916291 3 1.098613 10 2.302588
. Three facts are taken as given here: the limit exists for every , it changes continuously with , and it is strictly increasing in . Continuity and the Intermediate Value Theorem from continuity-and-the-intermediate-value-theorem then give a base between and with , and the strict increase makes it the only one. That base is called . With the constant is :
So is not an arbitrary choice: it is the base for which the slope of the graph equals its height at every point. The same number is the limit of , which takes the values , , , , for (the equivalence of the two descriptions is proved in the textbooks cited below).
The natural logarithm is the inverse of , so for any . Writing and using the chain rule:
This also identifies the table's constant, : indeed and . Example: at is . A misapplied power rule would give at , which is wrong because is not a power of .
The logarithm
Let for , so that . Differentiate both sides with respect to . The right side gives . The left side, by the chain rule, gives . Therefore
This step assumes is differentiable, which holds because the inverse of a differentiable function with nonzero derivative is differentiable; ensures that. For , , which is why antiderivatives of later carry an absolute value. With the chain rule, wherever . For another base, gives .
Sine, cosine and tangent
The derivatives of and come from the angle-addition formula and two limits. The first, , is the squeeze-theorem result of limit-laws-and-indeterminate-forms. The second, , follows from that lesson's , because . Then:
The same computation for cosine gives :
Both limits are statements about angles in radians. In degrees, , so , about at . Radians are what make the derivative formula clean. By the quotient rule, , valid wherever . Two inverse functions follow from the same inverse argument used for the logarithm: for all , and on only. The latter grows without bound toward the endpoints: it is at , at and at .
Implicit differentiation
Sometimes a curve is given by an equation relating and rather than by a formula . If near a point is a differentiable function of , differentiate both sides of the equation with respect to , treating as so that the chain rule contributes a factor to every term containing , then solve for .
For , differentiating gives , so , valid where . At the circle has a vertical tangent and is not a function of near that point, so there is no to find. The method silently assumes what it needs; it returns a formula even in places where the assumption is false, and the denominator is where to look.
Logarithmic differentiation
When the variable is in both the base and the exponent, or an expression is a long product and quotient, take the logarithm first. For :
If can be negative but not zero, use , whose derivative is also . The same idea proves the general power rule: for and any real , and .
Worked Examples
Example 1: the sigmoid
The logistic function is defined for all real and turns any real score into a number in . By the chain rule applied to the reciprocal,
The second form is obtained by writing . Values, checked against a central difference:
textz sigma(z) sigma'(z) -5 0.006693 0.006648 0 0.500000 0.250000 2 0.880797 0.104994 5 0.993307 0.006648
The derivative is largest at with value , because for any , and it decays on both sides. This is the factor each sigmoid layer contributes to the product in a backward pass: ten of them at their best multiply to at most , a concrete reason why deep stacks of sigmoids train slowly.
Example 2: oscillation
A mass on a spring has position (meters, in seconds). With the chain rule:
Comparing, : acceleration is proportional to displacement and opposite in sign, the signature of harmonic motion. At : , m/s, m/s$^2$, and indeed . Because the function is , not , each derivative picks up a factor from the chain rule.
Example 3: implicit differentiation
For (a curve called the folium of Descartes), the point lies on it since . Differentiate both sides, using the product rule on :
Solving requires . At : . The tangent line is . For the circle at the same method gives , and at the denominator is zero, matching the vertical tangent.
Example 4: logarithmic differentiation of
For , let . Then . Differentiate both sides, using the product rule on the right:
At : , and a central difference gives . The power rule would give here, and the exponential rule alone would give ; each captures only one of the two places the variable appears, so the true derivative is the sum of both contributions.
Common Misconceptions & Pitfalls
- "." The power rule is for a variable base with a constant exponent. In the variable is in the exponent, and the derivative is .
- "." The chain rule gives , the same as the derivative of .
- "The derivative of is ." The sign is negative. A quick check: is decreasing just after , so its slope there must be negative, and is negative for small .
- "Trigonometric derivative formulas hold in any angle unit." They hold in radians. Using degrees brings a factor into every derivative.
- "Implicit differentiation always yields ." It yields where is locally a differentiable function of . Where the denominator vanishes, as at on the circle, the curve may have a vertical tangent and no .
- "Logarithmic differentiation works for any ." It needs (use if ), and is only defined as a real function for here.
Summary
The exponential has derivative , and is the base for which , so and, in general, . The logarithm follows from the inverse relationship: for , and for where . For trigonometric functions, , and where , all in radians. With the chain rule these reach sigmoids, oscillations and growth laws. Implicit differentiation handles curves given by an equation, with the denominator showing where it fails, and logarithmic differentiation handles variable exponents, giving for and the general power rule for real exponents. These derivatives make the derivative toolkit complete for the elementary functions, and the next lesson, the-mean-value-theorem-and-monotonicity, begins using derivatives to draw conclusions about what a function does.
Documentation Links
- OpenStax: Calculus Volume 1, 3.9 Derivatives of Exponential and Logarithmic Functions
- OpenStax: Calculus Volume 1, 3.5 Derivatives of Trigonometric Functions
- OpenStax: Calculus Volume 1, 3.8 Implicit Differentiation
- MIT OCW 18.01SC: Session 17, The Exponential Function, its Derivative, and its Inverse
- MIT OCW 18.01SC: Session 19, An Interesting Limit Involving e
- Active Calculus: 2.7 Derivatives of functions given implicitly