Chain Rule Calculator
Free Chain rule Calculator for calculus. Enter values to get step-by-step solutions with formulas and graphs. Get results you can export or share.
Reviewed for accuracy by Manoj Kumar, Mathematics Educator
Chain Rule Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: d/dx[f(g(x))] = f'(g(x)) * g'(x)
Worked example โ dy/dx at x = 1 is 108
Formula
d/dx[f(g(x))] = f'(g(x)) * g'(x)
The chain rule states that the derivative of a composite function f(g(x)) equals the derivative of the outer function evaluated at the inner function, multiplied by the derivative of the inner function. This rule is essential for differentiating nested or composed functions.
Worked Examples
Example 1: Power of a Polynomial
Problem:Find the derivative of f(x) = (2x^2 + 1)^3 at x = 1 using the chain rule.
Solution:Outer: f(u) = u^3, so f'(u) = 3u^2 Inner: g(x) = 2x^2 + 1, so g'(x) = 4x g(1) = 2(1) + 1 = 3 f'(g(1)) = 3(3)^2 = 27 g'(1) = 4(1) = 4 Chain rule: dy/dx = 27 * 4 = 108
Result:dy/dx at x = 1 is 108
Example 2: Sine of an Exponential
Problem:Find the derivative of f(x) = sin(e^x) at x = 0.
Solution:Outer: f(u) = sin(u), so f'(u) = cos(u) Inner: g(x) = e^x, so g'(x) = e^x g(0) = e^0 = 1 f'(g(0)) = cos(1) = 0.5403 g'(0) = e^0 = 1 Chain rule: dy/dx = 0.5403 * 1 = 0.5403
Result:dy/dx at x = 0 is 0.5403
Frequently Asked Questions
What is the chain rule in calculus?
The chain rule is a fundamental differentiation technique used to find the derivative of a composite function. When you have a function composed of an outer function f and an inner function g, written as f(g(x)), the chain rule states that the derivative equals the derivative of the outer function evaluated at the inner function, multiplied by the derivative of the inner function. In notation, d/dx[f(g(x))] equals f prime of g(x) times g prime of x. This rule is essential because many real-world functions are compositions of simpler functions, and without the chain rule, differentiating them would require expanding and simplifying complex expressions first, which is often impractical or impossible.
How do I identify the inner and outer functions?
To identify the inner and outer functions, think about the order of operations when evaluating the composite function. The inner function is what you calculate first, and the outer function is what you apply to that result. For example, in sin(x squared), the inner function is g(x) equals x squared (computed first) and the outer function is f(u) equals sin(u) (applied to the result). In e raised to the power 3x plus 1, the inner function is 3x plus 1 and the outer function is the exponential. A helpful technique is to ask yourself what you would substitute u for: whatever you replace with u is the inner function. Practice with increasingly complex compositions builds intuition for this identification step.
Can the chain rule be applied multiple times?
Yes, the chain rule can be applied repeatedly for functions with multiple layers of composition. If you have f(g(h(x))), a three-layer composition, you apply the chain rule twice. The derivative is f prime of g(h(x)) times g prime of h(x) times h prime of x. Each additional layer of composition adds another factor to the product. For example, to differentiate sin(cos(x squared)), you have three layers: the outer sin, the middle cos, and the inner x squared. The derivative is cos(cos(x squared)) times negative sin(x squared) times 2x. This multi-layer application is sometimes called the generalized chain rule and is common in neural network backpropagation algorithms used in machine learning.
What is the Leibniz notation for the chain rule?
In Leibniz notation, the chain rule is written as dy/dx equals dy/du times du/dx, where u represents the inner function. This notation makes the chain rule look like a fraction multiplication where du cancels out, which is a helpful mnemonic even though derivatives are not actually fractions. For example, if y equals u cubed and u equals 2x plus 1, then dy/du equals 3u squared and du/dx equals 2, giving dy/dx equals 3u squared times 2 equals 6(2x plus 1) squared. Leibniz notation extends naturally to multiple compositions: dy/dx equals dy/du times du/dv times dv/dx for three layers. This notation is particularly intuitive for related rates problems and implicit differentiation.
How does the chain rule relate to implicit differentiation?
Implicit differentiation is fundamentally an application of the chain rule. When you have an equation like x squared plus y squared equals 25, where y is implicitly defined as a function of x, differentiating the y terms requires the chain rule because y itself is a function of x. The derivative of y squared with respect to x is 2y times dy/dx, where 2y comes from the power rule and dy/dx comes from the chain rule treating y as the inner function. Without the chain rule, implicit differentiation would not work. This technique is essential for finding derivatives of curves that cannot be expressed as explicit functions, such as circles, ellipses, and other algebraic curves defined by equations in x and y.
What are common mistakes when applying the chain rule?
The most frequent mistake is forgetting to multiply by the derivative of the inner function entirely. For example, differentiating sin(3x) as just cos(3x) instead of 3cos(3x), missing the factor of 3 from the inner derivative. Another common error is applying the chain rule when it is not needed, such as treating the product xy as a composition instead of using the product rule. Students also frequently confuse the order, applying the inner derivative first instead of the outer derivative. With nested compositions, losing track of which layer you are differentiating is common. A useful verification technique is to check your result numerically by computing the difference quotient at a specific point and comparing it to your analytical derivative.
How is the chain rule used in related rates problems?
Related rates problems involve finding how one rate of change relates to another, and the chain rule is the mathematical bridge connecting them. For example, if a balloon radius r is increasing at 2 cm per second, and you want the rate of volume change, the chain rule gives dV/dt equals dV/dr times dr/dt. Since V equals four-thirds pi r cubed, dV/dr equals 4 pi r squared, and dr/dt equals 2, so dV/dt equals 8 pi r squared. The chain rule allows you to relate rates of change of different quantities through their functional relationships. Every related rates problem at its core is a chain rule application, making it one of the most practically important differentiation techniques in physics and engineering.
What is the chain rule formula for parametric equations?
For parametric equations where x equals x(t) and y equals y(t), the chain rule gives dy/dx equals (dy/dt) divided by (dx/dt), provided dx/dt is not zero. This formula arises because dy/dx equals dy/dt times dt/dx, and dt/dx is the reciprocal of dx/dt. For the second derivative, d squared y over dx squared equals [d/dt(dy/dx)] divided by (dx/dt). For example, if x equals cos(t) and y equals sin(t), then dx/dt equals negative sin(t) and dy/dt equals cos(t), giving dy/dx equals negative cos(t) divided by sin(t) equals negative cotangent(t). This parametric form of the chain rule is essential in physics for analyzing motion along curved paths.
How does the chain rule work with exponential and logarithmic functions?
Exponential and logarithmic functions frequently involve the chain rule because they often contain complex inner functions. For e raised to the power g(x), the derivative is e raised to g(x) times g prime of x. The exponential function is its own derivative, but the chain rule adds the inner derivative factor. For the natural log of g(x), the derivative is g prime of x divided by g(x). For general exponentials like a raised to g(x), you first rewrite as e raised to g(x) times ln(a), giving a derivative of a raised to g(x) times ln(a) times g prime of x. These formulas appear constantly in growth and decay models, compound interest calculations, population dynamics, and radioactive decay equations used throughout science and engineering.
Why is the chain rule important in machine learning and neural networks?
The chain rule is the mathematical foundation of backpropagation, the primary algorithm used to train neural networks. A neural network is essentially a deeply nested composite function, where each layer applies a linear transformation followed by a nonlinear activation function. During training, the network must compute how the error changes with respect to each weight, which requires differentiating through all layers using the chain rule repeatedly. The gradient of the loss function with respect to any weight equals the product of all the partial derivatives along the path from that weight to the output, computed efficiently via the chain rule. Without the chain rule, modern deep learning would be computationally infeasible. This application has made the chain rule arguably the most commercially valuable theorem in all of calculus.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎRelated Rates Calculator
Solve related rates problems with step-by-step chain rule application.
๐งฎDescartes Rule of Signs Calculator
Calculate descartes rule of signs with inputs, formulas, and instant results.
๐งฎProduct Rule Calculator
Calculate product rule with inputs, formulas, and instant results.
๐งฎQuotient Rule Calculator
Calculate quotient rule with inputs, formulas, and instant results.
๐งฎCramers Rule Calculator
Calculate cramers rule with inputs, formulas, and instant results.
๐งฎLhpitals Rule Calculator
Calculate lhpitals rule with inputs, formulas, and instant results.
๐งฎCramer Rule Calculator
Solve systems of linear equations using Cramer rule with determinant calculations shown.
๐งฎAnnulus Area Calculator
Calculate annulus area with inputs, formulas, and instant results.