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.
Calculator
Adjust values & calculateStep-by-Step Breakdown
Function Values at Nearby Points
Formula
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.
Last reviewed: December 2025
Worked Examples
Example 1: Power of a Polynomial
Example 2: Sine of an Exponential
Background & Theory
The Chain Rule Calculator applies the following established principles and formulas. Mathematics rests on a hierarchy of number systems, each extending the previous. The natural numbers (1, 2, 3, ...) support counting and ordering. The integers add negative values and zero, enabling subtraction without restriction. The rational numbers, expressible as p/q where p and q are integers and q is nonzero, close the system under division. The real numbers fill the gaps left by irrationals such as the square root of 2 or pi, forming a complete ordered field. The complex numbers, written as a + bi where i is the square root of negative one, complete the algebraic closure of the reals and allow every polynomial to have a root. Prime factorization states that every integer greater than one is uniquely expressible as a product of primes, a result known as the Fundamental Theorem of Arithmetic. Computing the greatest common divisor (GCD) of two integers relies most efficiently on the Euclidean algorithm: repeatedly replace the larger number with the remainder when it is divided by the smaller, until the remainder is zero. The last nonzero remainder is the GCD. The least common multiple (LCM) follows from the identity LCM(a, b) = |a * b| / GCD(a, b). Modular arithmetic defines equivalence classes of integers that share the same remainder under division by a modulus n. Fermat's Little Theorem and Euler's Theorem arise from this structure and underpin modern cryptography. Logarithms are the inverses of exponential functions. If b raised to the power x equals y, then the logarithm base b of y equals x. The natural logarithm uses base e, approximately 2.71828. Combinatorics counts arrangements and selections. The number of ordered arrangements (permutations) of r objects from n distinct objects is nPr = n! / (n - r)!. The number of unordered selections (combinations) is nCr = n! / (r! * (n - r)!). Pascal's triangle arranges these binomial coefficients so that each entry equals the sum of the two entries directly above it. The Fibonacci sequence, defined by F(1) = 1, F(2) = 1, and F(n) = F(n-1) + F(n-2), appears throughout nature and connects deeply to the golden ratio via Binet's formula.
History
The history behind the Chain Rule Calculator traces back through the following developments. Mathematics as a systematic discipline traces to ancient Mesopotamia. Babylonian clay tablets dating to around 1800 BCE demonstrate knowledge of quadratic equations, Pythagorean triples, and base-60 arithmetic, suggesting a practical mathematical tradition far preceding Greek formalism. Euclid of Alexandria compiled the Elements around 300 BCE, establishing the axiomatic method that would define rigorous mathematics for over two thousand years. His work organized plane geometry, number theory, and proportion into logically chained propositions derived from a small set of postulates. The algorithm bearing his name for computing GCDs appears in Book VII and remains in use today. In the 9th century, the Persian scholar Muhammad ibn Musa Al-Khwarizmi wrote Al-Kitab al-mukhtasar fi hisab al-jabr wal-muqabala, the treatise whose title gave algebra its name. He systematized the solution of linear and quadratic equations and described procedures that operated on unknowns as objects, a conceptual leap away from purely numerical calculation. Rene Descartes introduced coordinate geometry in 1637 by uniting algebra and Euclidean geometry, allowing curves to be studied through equations. This synthesis set the stage for calculus. Isaac Newton and Gottfried Wilhelm Leibniz independently developed calculus during the 1660s and 1670s, triggering a priority dispute that lasted decades and divided British and Continental mathematicians. Carl Friedrich Gauss proved the Fundamental Theorem of Algebra in 1799, showing that every nonconstant polynomial has at least one complex root. His Disquisitiones Arithmeticae of 1801 established modern number theory. David Hilbert's formalist program at the turn of the 20th century sought to place all of mathematics on an explicit axiomatic foundation, a project that Kurt Godel's incompleteness theorems of 1931 showed to be fundamentally limited. Alan Turing's work in the 1930s on computability introduced the theoretical model of the stored-program computer and linked mathematical logic directly to the limits of algorithmic calculation. His proof that no algorithm can decide in general whether an arbitrary program will halt or run forever placed fundamental boundaries on what mathematics can mechanically determine, and it opened the discipline now known as theoretical computer science.
Frequently Asked Questions
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\nInner: g(x) = 2x^2 + 1, so g'(x) = 4x\ng(1) = 2(1) + 1 = 3\nf'(g(1)) = 3(3)^2 = 27\ng'(1) = 4(1) = 4\nChain 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)\nInner: g(x) = e^x, so g'(x) = e^x\ng(0) = e^0 = 1\nf'(g(0)) = cos(1) = 0.5403\ng'(0) = e^0 = 1\nChain 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.
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.
References
Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy