{
  "id": "integration-by-substitution",
  "title": "Integration by Substitution",
  "lang": "en",
  "source_lang": "en",
  "summary": "Integration by substitution evaluates or transforms an integral by changing its variable, using the chain rule to determine the corresponding differential factor.",
  "category": "mathematics",
  "subcategory": "analysis",
  "type": "concept",
  "aliases": [
    "Substitution rule",
    "u-substitution",
    "Change of variable in integration"
  ],
  "generated_at": "2026-11-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/integration-by-substitution/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/integration-by-substitution/",
      "json": "https://aiwiki.page/zh/integration-by-substitution.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Integration by substitution is a method in calculus that transforms an integral by replacing its variable with a suitable function of another variable. It reverses the chain rule for differentiation: a composite expression together with the derivative of its inner function can be integrated by treating the inner function as a new variable. The method applies to both indefinite and definite integrals and extends, through change-of-variables theorems, to integration in several dimensions."
    },
    {
      "heading": "Mathematical basis",
      "text": "Suppose \\(f\\) is a continuous function on an interval \\(J\\), and \\(g\\) is continuously differentiable on an interval \\(I\\), with \\(g(I)\\subseteq J\\). If \\(F\\) is an antiderivative of \\(f\\), so that \\(F'=f\\), the chain rule gives\n\n\\[\\frac{d}{dx}F(g(x))=f(g(x))g'(x).\\]\n\nConsequently,\n\n\\[\\int f(g(x))g'(x)\\,dx=F(g(x))+C.\\]\n\nIntroducing\n\n\\[u=g(x),\\qquad du=g'(x)\\,dx\\]\n\nexpresses the same rule as\n\n\\[\\int f(g(x))g'(x)\\,dx=\\int f(u)\\,du.\\]\n\nThe right-hand side is evaluated in \\(u\\), after which \\(u=g(x)\\) is substituted back. The constant \\(C\\) represents an arbitrary additive constant on the interval under consideration.\n\nThe notation \\(du=g'(x)\\,dx\\), associated with the differential notation of Gottfried Wilhelm Leibniz, records the derivative factor required by the chain rule. In elementary calculus, the justification is the differentiation identity above, rather than treating \\(du\\) and \\(dx\\) as ordinary numbers.\n\nConnection with definite integration\n\nUnder the same continuity and differentiability assumptions, the fundamental theorem of calculus gives\n\n\\[\\boxed{ \\int_a^b f(g(x))g'(x)\\,dx = \\int_{g(a)}^{g(b)}f(u)\\,du }.\\]\n\nIndeed, both sides equal \\(F(g(b))-F(g(a))\\). This formula shows that a substitution changes not only the integrand and differential but also the endpoints.\n\nThese assumptions are convenient sufficient conditions. More general substitution theorems exist for the Riemann integral and the Lebesgue integral, but their hypotheses must be stated separately."
    },
    {
      "heading": "Choosing and carrying out a substitution",
      "text": "A useful substitution usually simplifies function composition, removes a troublesome expression, or changes the integrand into a known form. Typical candidates include:\n\n- an expression inside a power, root, exponential, or trigonometric function;\n- a denominator whose derivative occurs elsewhere in the integrand;\n- a transformation that removes a square root or exploits symmetry;\n- a rescaling or translation that reduces an expression to a standard form.\n\nFor an indefinite integral, the usual procedure is to choose \\(u=g(x)\\), compute \\(du\\), rewrite the entire integral in \\(u\\), integrate, and then return to \\(x\\). For a definite integral, the endpoints can instead be converted to \\(u\\)-values and the calculation completed entirely in the new variable.\n\nA composite function and its derivative\n\nConsider\n\n\\[\\int 2x\\cos(x^2)\\,dx.\\]\n\nWith \\(u=x^2\\) and \\(du=2x\\,dx\\),\n\n\\[\\int 2x\\cos(x^2)\\,dx = \\int\\cos u\\,du = \\sin(x^2)+C.\\]\n\nThe factor \\(2x\\) is what makes the substitution directly useful. A visually complicated inner expression is not, by itself, enough to guarantee a simpler integral.\n\nA derivative present up to a constant\n\nFor\n\n\\[\\int x(x^2+1)^5\\,dx,\\]\n\ntake \\(u=x^2+1\\). Since \\(du=2x\\,dx\\),\n\n\\[\\int x(x^2+1)^5\\,dx = \\frac12\\int u^5\\,du = \\frac{(x^2+1)^6}{12}+C.\\]\n\nA constant mismatch between the differential and the original integrand is handled by a compensating factor.\n\nLogarithmic form\n\nIf \\(g\\) is continuously differentiable and nonzero on an interval, then\n\n\\[\\int\\frac{g'(x)}{g(x)}\\,dx = \\ln|g(x)|+C.\\]\n\nThis follows by taking \\(u=g(x)\\) and using the antiderivative of \\(1/u\\). The absolute value allows the real natural logarithm to handle either sign of \\(g\\), provided the interval does not cross a zero of \\(g\\). Different connected intervals may have different constants of integration."
    },
    {
      "heading": "Definite integrals, orientation, and invertibility",
      "text": "For example,\n\n\\[\\int_0^1 2x e^{x^2}\\,dx\\]\n\nbecomes, under \\(u=x^2\\),\n\n\\[\\int_0^1 e^u\\,du=e-1.\\]\n\nHere the transformed endpoints happen to have the same numerical values as the original endpoints. In general, they do not:\n\n\\[\\int_0^2 2x e^{x^2}\\,dx = \\int_0^4 e^u\\,du = e^4-1.\\]\n\nDecreasing substitutions\n\nThe order of the transformed endpoints records orientation. With \\(u=1-x\\),\n\n\\[du=-dx,\\]\n\nand therefore\n\n\\[\\int_0^1 f(1-x)\\,dx = -\\int_1^0 f(u)\\,du = \\int_0^1 f(u)\\,du.\\]\n\nThe negative derivative and the reversal of limits are consistent parts of the same transformation.\n\nWhy one-to-one behavior is not always required\n\nThe identity\n\n\\[\\int_a^b f(g(x))g'(x)\\,dx = \\int_{g(a)}^{g(b)}f(u)\\,du\\]\n\ndoes not require \\(g\\) to be an injective function. It follows directly from an antiderivative and the chain rule. If \\(g\\) reverses direction, the signed contributions from retraced intervals cancel.\n\nFor instance,\n\n\\[\\int_{-1}^{1}2x e^{x^2}\\,dx = \\int_1^1 e^u\\,du = 0.\\]\n\nThis does not mean that every integral involving \\(x^2\\) can be transformed over \\([-1,1]\\) without further care. When the calculation requires an inverse function, a non-injective transformation may need to be restricted to separate monotone branches.\n\nThe distinction is between an oriented substitution, which carries the signed derivative, and a transformation of lengths, areas, or densities, which generally uses an absolute derivative and accounts for multiple branches."
    },
    {
      "heading": "Substitutions that introduce a new parameter",
      "text": "A substitution can also be written as \\(x=\\phi(t)\\). The rule then takes the form\n\n\\[\\int h(x)\\,dx = \\int h(\\phi(t))\\phi'(t)\\,dt,\\]\n\nwith an appropriate inverse relation or interval restriction when expressing the result back in \\(x\\).\n\nFor example, for \\(x>0\\), set \\(x=t^2\\) with \\(t>0\\). Then \\(dx=2t\\,dt\\), and\n\n\\[\\int\\frac{dx}{1+\\sqrt{x}} = \\int\\frac{2t}{1+t}\\,dt = 2t-2\\ln(1+t)+C.\\]\n\nThus,\n\n\\[\\int\\frac{dx}{1+\\sqrt{x}} = 2\\sqrt{x}-2\\ln(1+\\sqrt{x})+C.\\]\n\nThe restriction \\(t>0\\) ensures that \\(\\sqrt{t^2}=t\\), rather than \\(|t|\\).\n\nTrigonometric substitution\n\nIdentities among trigonometric functions make certain substitutions useful for square roots of quadratic expressions. For \\(a>0\\), standard choices include\n\n\\[\\begin{array}{c|c} \\text{Expression} & \\text{Substitution}\\\\ \\hline \\sqrt{a^2-x^2} & x=a\\sin\\theta\\\\ \\sqrt{a^2+x^2} & x=a\\tan\\theta\\\\ \\sqrt{x^2-a^2} & x=a\\sec\\theta \\end{array}\\]\n\nIntervals must be chosen carefully to determine signs and inverse branches.\n\nFor example, setting \\(x=a\\sin\\theta\\), with\n\\(-\\pi/2<\\theta<\\pi/2\\), gives\n\n\\[\\sqrt{a^2-x^2}=a\\cos\\theta, \\qquad dx=a\\cos\\theta\\,d\\theta.\\]\n\nHence, on \\(-a<x<a\\),\n\n\\[\\int\\sqrt{a^2-x^2}\\,dx = a^2\\int\\cos^2\\theta\\,d\\theta = \\frac{x}{2}\\sqrt{a^2-x^2} + \\frac{a^2}{2}\\arcsin\\left(\\frac{x}{a}\\right)+C.\\]\n\nThe substitution removes the radical, although a trigonometric identity is still needed to complete the integration."
    },
    {
      "heading": "Improper integrals and convergence",
      "text": "For an improper integral, substitution is justified through the limit defining the integral. It is first performed on a truncated proper integral, and then the endpoint limit is taken.\n\nFor \\(p>1\\), the substitution \\(x=1/t\\) gives\n\n\\[\\int_1^\\infty x^{-p}\\,dx = \\lim_{R\\to\\infty} \\int_{1/R}^{1}t^{p-2}\\,dt = \\frac{1}{p-1}.\\]\n\nThe infinite interval becomes a finite interval with a potentially singular endpoint.\n\nA formal change of variable does not establish convergence by itself. Interior singularities must also be handled separately. Cancellation across a singularity can produce a Cauchy principal value even when the ordinary improper integral does not exist; these are different notions of integration."
    },
    {
      "heading": "Higher-dimensional change of variables",
      "text": "In several dimensions, the derivative factor is replaced by a determinant built from the Jacobian matrix.\n\nLet \\(U,V\\subseteq\\mathbb{R}^n\\) be open sets, and let \\(\\Phi:U\\to V\\) be a continuously differentiable bijection with a continuously differentiable inverse. For an integrable function \\(f\\), the change-of-variables theorem gives\n\n\\[\\int_V f(x)\\,dx = \\int_U f(\\Phi(u)) \\left|\\det D\\Phi(u)\\right|\\,du.\\]\n\nThe absolute Jacobian determinant describes local volume scaling. Its absolute value appears because ordinary volume is nonnegative, unlike the oriented differential in the one-dimensional chain-rule formula.\n\nFor polar coordinates,\n\n\\[x=r\\cos\\theta,\\qquad y=r\\sin\\theta,\\]\n\nand\n\n\\[\\left| \\frac{\\partial(x,y)}{\\partial(r,\\theta)} \\right| =r \\qquad(r>0).\\]\n\nConsequently,\n\n\\[\\iint_D f(x,y)\\,dx\\,dy = \\iint_{\\widetilde D} f(r\\cos\\theta,r\\sin\\theta)\\,r\\,dr\\,d\\theta.\\]\n\nThe parameter range must avoid unintended multiple coverage. Boundary identifications and the degeneracy at \\(r=0\\) can be handled by excluding sets of measure zero or using an appropriate version of the theorem."
    },
    {
      "heading": "Applications and limitations",
      "text": "Transforming probability densities\n\nSubstitution underlies the transformation rule for a probability density function. If a random variable \\(X\\) has density \\(p_X\\), and \\(Y=g(X)\\) for a continuously differentiable, strictly monotone function with nonzero derivative on the relevant interval, then\n\n\\[p_Y(y) = p_X(g^{-1}(y)) \\left|\\frac{d}{dy}g^{-1}(y)\\right|.\\]\n\nFor a non-injective transformation, contributions from the inverse branches must be added. Under suitable regularity conditions,\n\n\\[p_Y(y) = \\sum_{x:\\,g(x)=y} \\frac{p_X(x)}{|g'(x)|},\\]\n\nat values where the inverse branches are regular. The absolute derivatives prevent negative densities, while the sum accounts for distinct original values mapped to the same outcome.\n\nDifferential equations and numerical integration\n\nSubstitution appears in separating variables in a differential equation, although division by a function of the unknown can exclude solutions where that function vanishes.\n\nIn numerical analysis, changes of variable can map an infinite interval to a finite one, reduce endpoint singularities, or redistribute resolution. The transformed integrand may also become more singular or vary more rapidly, so a formally correct substitution is not necessarily numerically advantageous.\n\nCommon errors and limits of the method\n\nFrequent errors include omitting the derivative factor, keeping old endpoints after changing variables, mixing old and new variables in the transformed integrand, and ignoring signs or branch restrictions.\n\nSubstitution also does not guarantee an elementary antiderivative. Transforming\n\n\\[\\int e^{x^2}\\,dx\\]\n\nwith \\(u=x^2\\) on \\(x>0\\) yields\n\n\\[\\frac12\\int u^{-1/2}e^u\\,du,\\]\n\nwhich does not turn the problem into an elementary integral. A successful substitution must simplify the complete transformed expression, not merely rename part of it.\n\nThe method may be combined with algebraic manipulation, trigonometric identities, or integration by parts. A proposed antiderivative can always be checked by taking its derivative on the stated domain."
    }
  ],
  "links": [
    "calculus",
    "integral",
    "chain-rule",
    "continuous-function",
    "antiderivative",
    "gottfried-wilhelm-leibniz",
    "fundamental-theorem-of-calculus",
    "riemann-integral",
    "lebesgue-integral",
    "function-composition",
    "absolute-value",
    "natural-logarithm",
    "injective-function",
    "inverse-function",
    "trigonometric-functions",
    "limit",
    "determinant",
    "jacobian-matrix",
    "polar-coordinates",
    "probability-density-function",
    "random-variable",
    "differential-equation",
    "numerical-analysis",
    "integration-by-parts",
    "derivative"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}