{
  "id": "integration-by-parts",
  "title": "Integration by Parts",
  "lang": "en",
  "source_lang": "en",
  "summary": "Integration by parts transforms an integral of a product by transferring a derivative between its factors, with a boundary term.",
  "category": "mathematics",
  "subcategory": "analysis",
  "type": "concept",
  "aliases": [
    "Partial integration"
  ],
  "generated_at": "2026-11-03",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/integration-by-parts/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/integration-by-parts/",
      "json": "https://aiwiki.page/zh/integration-by-parts.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Integration by parts is a method in calculus that transforms an integral of a product into a boundary term and another integral. It reverses the product rule for differentiation. In its familiar notation,\n\n\\[\\int u\\,dv=uv-\\int v\\,du.\\]\n\nThe method is useful when differentiating one factor and integrating the other produces a simpler expression. Beyond evaluating integrals, it is a fundamental tool for studying differential equations, Fourier analysis, variational problems, and generalized derivatives."
    },
    {
      "heading": "Formula and justification",
      "text": "Suppose \\(u\\) and \\(v\\) are continuously differentiable functions on a closed interval \\([a,b]\\). The product rule gives\n\n\\[\\frac{d}{dx}\\bigl(u(x)v(x)\\bigr) =u'(x)v(x)+u(x)v'(x).\\]\n\nIntegrating and applying the fundamental theorem of calculus yields\n\n\\[\\int_a^b u(x)v'(x)\\,dx = \\bigl[u(x)v(x)\\bigr]_a^b -\\int_a^b u'(x)v(x)\\,dx,\\]\n\nwhere\n\n\\[[uv]_a^b=u(b)v(b)-u(a)v(a).\\]\n\nThus integration by parts transfers differentiation from \\(v\\) to \\(u\\), changes the sign of the integral term, and introduces a boundary contribution.\n\nFor indefinite integrals, the same identity is written\n\n\\[\\int u(x)v'(x)\\,dx =u(x)v(x)-\\int u'(x)v(x)\\,dx,\\]\n\nwith an arbitrary constant understood. More explicitly, if \\(F\\) is an antiderivative of \\(u'v\\), then \\(uv-F\\) is an antiderivative of \\(uv'\\).\n\nThe shorthand \\(du=u'(x)\\,dx\\) and \\(dv=v'(x)\\,dx\\) gives the standard expression\n\n\\[\\int u\\,dv=uv-\\int v\\,du.\\]\n\nHere, choosing \\(dv\\) includes choosing an antiderivative \\(v\\).\n\nContinuous differentiability is sufficient but not necessary. In the setting of the Lebesgue integral, the definite formula remains valid when both functions are absolutely continuous on \\([a,b]\\). Their derivatives then exist almost everywhere, are integrable, and recover the functions by integration."
    },
    {
      "heading": "Choosing the factors",
      "text": "Integration by parts is an identity, not a guarantee of simplification. Its practical value depends on the choice of \\(u\\) and \\(dv\\).\n\nA useful decomposition usually has two features:\n\n- \\(u\\) becomes simpler when differentiated.\n- \\(dv\\) has an accessible antiderivative.\n\nFor instance, a polynomial loses degree under differentiation, whereas an exponential function retains its basic form under integration. Products of these types are therefore natural candidates.\n\nA common classroom mnemonic, LIATE, suggests considering logarithmic, inverse trigonometric, algebraic, trigonometric, and exponential factors, in that order, as candidates for \\(u\\). This is a heuristic rather than a theorem. The structure of the resulting integral takes precedence over the mnemonic.\n\nUnlike integration by substitution, which reverses the chain rule, integration by parts reverses differentiation of a product. The two methods can also be combined."
    },
    {
      "heading": "Basic examples",
      "text": "A polynomial times an exponential\n\nFor\n\n\\[\\int xe^x\\,dx,\\]\n\ntake \\(u=x\\) and \\(dv=e^x\\,dx\\). Then \\(du=dx\\) and \\(v=e^x\\), giving\n\n\\[\\int xe^x\\,dx =xe^x-\\int e^x\\,dx =e^x(x-1)+C.\\]\n\nThe corresponding definite integral is\n\n\\[\\int_0^1 xe^x\\,dx =\\bigl[xe^x\\bigr]_0^1-\\int_0^1e^x\\,dx =1.\\]\n\nA logarithm as a product\n\nA product need not be visibly present. Writing the integrand as \\(\\ln x\\cdot1\\), choose\n\n\\[u=\\ln x,\\qquad dv=dx.\\]\n\nFor \\(x>0\\),\n\n\\[\\int\\ln x\\,dx =x\\ln x-\\int1\\,dx =x\\ln x-x+C.\\]\n\nThis illustrates why a natural logarithm is often chosen as the differentiated factor: its derivative is simpler even though its antiderivative is not immediately apparent.\n\nA trigonometric example\n\nTaking \\(u=x\\) and \\(dv=\\cos x\\,dx\\) gives\n\n\\[\\int x\\cos x\\,dx =x\\sin x-\\int\\sin x\\,dx =x\\sin x+\\cos x+C.\\]\n\nRepeated integration of trigonometric functions remains manageable because their derivatives and antiderivatives cycle among a small set of functions."
    },
    {
      "heading": "Repeated and cyclic integration",
      "text": "Repeated integration by parts\n\nIf the differentiated factor continues to simplify, integration by parts can be repeated. For example,\n\n\\[\\begin{aligned} \\int x^2e^x\\,dx &=x^2e^x-2\\int xe^x\\,dx\\\\ &=e^x(x^2-2x+2)+C. \\end{aligned}\\]\n\nMore generally, for a polynomial \\(P\\) of degree \\(n\\) and a nonzero real constant \\(a\\),\n\n\\[\\int P(x)e^{ax}\\,dx = e^{ax}\\sum_{k=0}^{n} \\frac{(-1)^kP^{(k)}(x)}{a^{k+1}}+C.\\]\n\nThe procedure terminates because \\(P^{(n+1)}=0\\).\n\nTabular integration by parts organizes this process into columns of successive derivatives of one factor and successive antiderivatives of the other, with alternating signs. It is bookkeeping for repeated use of the same identity, not a different integration principle.\n\nCyclic integrals\n\nRepeated application sometimes returns the original integral rather than eliminating it. The resulting equation can then be solved algebraically.\n\nLet\n\n\\[I=\\int e^x\\cos x\\,dx.\\]\n\nIntegration by parts gives\n\n\\[I=e^x\\cos x+\\int e^x\\sin x\\,dx.\\]\n\nApplying the method to the remaining integral gives\n\n\\[\\int e^x\\sin x\\,dx=e^x\\sin x-I.\\]\n\nHence\n\n\\[2I=e^x(\\sin x+\\cos x),\\]\n\nand therefore\n\n\\[\\int e^x\\cos x\\,dx =\\frac{e^x}{2}(\\sin x+\\cos x)+C.\\]\n\nThe algebra can be carried out using chosen antiderivatives, with the arbitrary constant restored at the end."
    },
    {
      "heading": "Improper integrals and endpoint limits",
      "text": "For an infinite interval or a singular endpoint, integration by parts must first be applied on a truncated interval. Limits are taken only afterward.\n\nFor example, on \\([0,R]\\),\n\n\\[\\int_0^R xe^{-x}\\,dx =-Re^{-R}+1-e^{-R}.\\]\n\nSince \\(Re^{-R}\\to0\\) and \\(e^{-R}\\to0\\),\n\n\\[\\int_0^\\infty xe^{-x}\\,dx=1.\\]\n\nIn general,\n\n\\[\\int_a^R uv'\\,dx=[uv]_a^R-\\int_a^R u'v\\,dx\\]\n\nholds for each finite \\(R\\) under suitable regularity assumptions. Passing to \\(R\\to\\infty\\) requires examining the boundary term and the transformed integral. If both have finite limits, the original improper integral converges and the limiting formula is valid. If they diverge separately, they cannot simply be treated as a difference of infinities.\n\nThe gamma function supplies an important example. For real \\(s>0\\),\n\n\\[\\Gamma(s)=\\int_0^\\infty x^{s-1}e^{-x}\\,dx.\\]\n\nIntegration by parts, with the endpoint limits checked, gives\n\n\\[\\Gamma(s+1)=s\\Gamma(s).\\]\n\nTogether with \\(\\Gamma(1)=1\\), this implies\n\n\\[\\Gamma(n+1)=n!\\]\n\nfor nonnegative integers \\(n\\)."
    },
    {
      "heading": "Applications in analysis",
      "text": "Fourier transforms\n\nIntegration by parts explains why differentiation becomes multiplication in the Fourier transform. With the convention\n\n\\[\\widehat f(\\xi)=\\int_{\\mathbb R}f(x)e^{-i\\xi x}\\,dx,\\]\n\nsufficient decay and integrability give\n\n\\[\\widehat{f'}(\\xi)=i\\xi\\,\\widehat f(\\xi).\\]\n\nThe boundary term vanishes because of the decay assumptions.\n\nConversely, applying integration by parts to the transform integral can yield decay estimates. If the required derivatives are integrable and the relevant boundary terms vanish, then for \\(\\xi\\ne0\\),\n\n\\[|\\widehat f(\\xi)| \\le \\frac{\\|f^{(k)}\\|_{L^1}}{|\\xi|^k}.\\]\n\nThis expresses a central connection between smoothness of a function and decay of its transform.\n\nVariational equations\n\nIn the calculus of variations, consider\n\n\\[J[y]=\\int_a^b L(x,y,y')\\,dx.\\]\n\nFor a sufficiently smooth variation \\(y+\\varepsilon\\eta\\), with\n\\(\\eta(a)=\\eta(b)=0\\), the first variation contains\n\n\\[\\int_a^b \\left(L_y\\eta+L_{y'}\\eta'\\right)\\,dx.\\]\n\nIntegration by parts transfers the derivative from \\(\\eta\\):\n\n\\[\\int_a^b L_{y'}\\eta'\\,dx = -\\int_a^b\\frac{d}{dx}L_{y'}\\,\\eta\\,dx.\\]\n\nThe boundary term vanishes because the endpoints are fixed. This leads to the Euler–Lagrange equation\n\n\\[L_y-\\frac{d}{dx}L_{y'}=0.\\]\n\nWhen endpoint variations are not required to vanish, the boundary term instead contributes to natural boundary conditions.\n\nWeak derivatives\n\nIntegration by parts also motivates the definition of a weak derivative. A locally integrable function \\(g\\) is the weak derivative of \\(f\\) if\n\n\\[\\int f(x)\\varphi'(x)\\,dx = -\\int g(x)\\varphi(x)\\,dx\\]\n\nfor every smooth, compactly supported test function \\(\\varphi\\).\n\nThere is no boundary contribution because the test function vanishes outside a compact subset of the domain. This definition extends differentiation to functions that need not have classical derivatives everywhere. It is central to Sobolev spaces, distribution theory, and the formulation of a weak solution of a differential equation."
    },
    {
      "heading": "Higher-dimensional form",
      "text": "The higher-dimensional analogue follows from the divergence theorem. For a sufficiently regular bounded domain \\(\\Omega\\), a scalar function \\(u\\), and a vector field \\(\\mathbf F\\),\n\n\\[\\int_\\Omega u\\,\\nabla\\cdot\\mathbf F\\,dx = \\int_{\\partial\\Omega}u\\,\\mathbf F\\cdot\\mathbf n\\,dS -\\int_\\Omega \\nabla u\\cdot\\mathbf F\\,dx,\\]\n\nwhere \\(\\mathbf n\\) is the outward unit normal.\n\nSetting \\(\\mathbf F=\\nabla v\\) gives Green's first identity:\n\n\\[\\int_\\Omega u\\,\\Delta v\\,dx = \\int_{\\partial\\Omega} u\\,\\frac{\\partial v}{\\partial n}\\,dS -\\int_\\Omega\\nabla u\\cdot\\nabla v\\,dx.\\]\n\nHere \\(\\Delta\\) is the Laplace operator and\n\\(\\partial v/\\partial n=\\nabla v\\cdot\\mathbf n\\).\n\nThis identity is used in boundary-value problems and the finite element method. It transfers derivatives from an unknown function to a test function, permitting formulations that require less classical differentiability."
    },
    {
      "heading": "Limitations and common errors",
      "text": "Integration by parts rearranges an integral; it does not necessarily make it easier or produce an elementary antiderivative. An unsuitable choice of factors may increase complexity or merely reproduce the original problem.\n\nFrequent errors include:\n\n- Omitting the boundary term. It disappears only under specific endpoint, decay, support, or boundary conditions.\n- Losing the minus sign. The transformed integral is subtracted.\n- Choosing \\(dv\\) without finding \\(v\\). The method requires an antiderivative of the selected factor.\n- Treating improper endpoints as ordinary values. Infinite or singular endpoints require limits.\n- Assuming cancellation proves convergence. An identity on finite intervals does not justify subtracting divergent limiting quantities.\n- Ignoring regularity assumptions. Classical formulas require enough differentiability and integrability; weaker settings require an appropriate generalized formulation."
    }
  ],
  "links": [
    "calculus",
    "integral",
    "derivative",
    "fundamental-theorem-of-calculus",
    "antiderivative",
    "lebesgue-integral",
    "absolute-continuity",
    "almost-everywhere",
    "polynomial",
    "exponential-function",
    "chain-rule",
    "natural-logarithm",
    "trigonometric-functions",
    "gamma-function",
    "fourier-transform",
    "calculus-of-variations",
    "euler-lagrange-equations",
    "sobolev-space",
    "weak-solution",
    "divergence-theorem",
    "laplace-operator",
    "finite-element-method"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}