Integration by parts in physics
Transform integrals where a quantity and its rate of change appear coupled together.
What it is
Integration by parts is a technique for solving integrals where the integrand is a product of two functions, transforming that integral into another (ideally simpler) one through the formula ∫u dv = uv - ∫v du. The central idea is to "shift" the derivative from one function to the other, in exchange for a boundary term evaluated at the integration limits.
This technique is especially useful when one of the two functions simplifies upon differentiation (such as a polynomial, which eventually becomes a constant), while the other can be repeatedly integrated without trouble (such as an exponential or trigonometric function).
Why it appears in physics
It appears because many physical integrals involve products of coupled quantities: a position multiplied by a force, a time multiplied by a rate of change, or a wave function multiplied by its own derivative. In these cases, the integral cannot be solved with a simple substitution, and integration by parts allows rearranging the expression until something integrable is obtained.
In analytical mechanics, for example, integration by parts is the tool that allows moving from an expression with the derivative of velocity with respect to time to a more manageable expression when deriving the action principle or obtaining the Euler-Lagrange equations, transferring derivatives between terms of the integrand.
Visual or geometric idea
The visual idea is that of "distributing" the differentiation work between two parts of a product: instead of directly integrating a complicated product, one part is chosen to differentiate (which simplifies) and the other to integrate (which can be handled), and the price to pay is a boundary term (uv evaluated at the limits) plus a new integral, generally simpler than the original.
Geometrically, one can think of the formula as an integrated version of the product rule for derivatives: just as (uv)' = u'v + uv', integrating both sides of that equality and rearranging terms directly gives the integration-by-parts formula.
Minimal symbolic language
The formula is ∫u dv = uv - ∫v du, where one chooses which part of the original integrand to call u (to differentiate) and which to call dv (to integrate). For definite integrals: ∫ₐᵇ u dv = [uv]ₐᵇ - ∫ₐᵇ v du.
The choice of u and dv is crucial: one normally chooses u as the part that simplifies upon differentiation (polynomials, logarithms), and dv as the part that is easy to integrate (exponentials, trigonometric functions), although the optimal choice depends on the specific problem.
What the result means
The result of an integration by parts is the same original integral, but expressed in an equivalent form that, in the cases where the technique is useful, turns out to be easier to evaluate (a simpler integral, or directly zero, or a repeating expression allowing the equation to be solved algebraically).
The boundary term [uv] that appears in the process often has its own physical meaning: in mechanics, it can represent an energy term evaluated at the endpoints of the motion; in electromagnetism, it can represent flux through a boundary.
When not to use it
Do not apply integration by parts if the integral can be more easily solved with a simple substitution: integration by parts usually requires more steps and is prone to sign errors if the problem admits a more direct method.
Also do not choose u and dv at random without considering which combination actually simplifies the problem: an incorrect choice can lead to a resulting integral just as complicated (or more complicated) than the original, requiring undoing the work and starting over with a different choice.
Operational summary
Identify whether the integrand is a product of two functions where one simplifies upon differentiation, strategically choose u (to differentiate) and dv (to integrate), apply the formula ∫u dv = uv - ∫v du, evaluate the boundary term if it is a definite integral, and solve the resulting new integral (which may require applying the technique again if the problem demands it).
Procedure
Before calculating
Check that the integrand is actually a product of two functions (or can be rewritten as such) and that there is no simpler method (direct substitution) to solve the integral.
Identify which of the two functions simplifies upon differentiation (candidate for u) and which can be integrated without difficulty, possibly repeating the process several times (candidate for dv).
Step 1: identify the mathematical object
Explicitly write the integral ∫u dv you want to solve, clearly assigning which part of the original integrand is u and which is dv, including the corresponding differential.
Calculate du (differentiating u) and v (integrating dv), checking that both calculations are correct before continuing.
Step 2: choose the operation
Apply the formula ∫u dv = uv - ∫v du, substituting the values of u, v, du calculated in the previous step.
If the new integral ∫v du is still complicated, evaluate whether it can be solved with another round of integration by parts, or whether it can be solved algebraically if the original integral reappears in the process (cyclic integral case).
Step 3: preserve units and signs
Check that the term uv and the new integral ∫v du have the same units as the original integral, since both must combine correctly to reconstruct a dimensionally meaningful result.
Pay attention to the negative sign in the formula (uv - ∫v du): a sign error at this step is one of the most common errors when applying this technique.
Step 4: calculate
If the integral is definite, evaluate the boundary term [uv] at the corresponding limits before continuing with the new integral.
Solve the resulting integral ∫v du using the appropriate methods, which may include another application of integration by parts if necessary.
Step 5: interpret the result
If the boundary term has a specific physical meaning (energy evaluated at the endpoints, flux through a surface), explicitly interpret it in the context of the problem.
Check the final result by differentiating it back (if it is an indefinite integral) or by checking that the units and order of magnitude are reasonable (if it is a definite integral with physical meaning).
Self-check checklist
Check that you chose u and dv so that the new integral is actually simpler than the original, that you correctly calculated du and v, that you kept the correct sign in the formula, and that you checked the final result by differentiating it back or checking its physical sense.
Guided example
Physical situation
The task is to calculate the work done by a force F(t) = t·e^(-t) (in newtons, t in seconds) integrated with respect to time between t=0 and t=1, as part of an impulse-work calculation in a damped system.
Mathematical translation
The goal is ∫₀¹ t e^(-t) dt. This integral is a product of two functions (t and e^(-t)), and is solved with integration by parts choosing u=t (simplifies upon differentiation) and dv=e^(-t)dt (easy to integrate).
Step-by-step calculation
u=t, du=dt. dv=e^(-t)dt, v=-e^(-t). Applying the formula: ∫t e^(-t) dt = -t e^(-t) - ∫(-e^(-t)) dt = -t e^(-t) + ∫e^(-t) dt = -t e^(-t) - e^(-t) + C. Evaluating between 0 and 1: [-1·e^(-1) - e^(-1)] - [-0 - 1] = [-2e^(-1)] - [-1] = 1 - 2/e ≈ 0.264.
Reading the result
The result ≈ 0.264 (in joules, if F is in newtons and t in seconds) represents the accumulated contribution to the total work during that interval, correctly calculated taking into account how the force F(t) decays exponentially as t increases.
Common error avoided
This avoids the common sign error when applying the formula ∫u dv = uv - ∫v du: forgetting the negative sign in front of the new integral (∫v du) would have given an incorrect result, with a term added instead of subtracted.
Inverse example
Given result
When applying integration by parts twice in succession to an integral with an exponential function multiplied by a trigonometric function, the original integral reappears in the process, allowing it to be solved algebraically by isolating it from the resulting equation.
What physical question it can answer
This type of result allows solving integrals that frequently appear in damped oscillation problems, where the solution involves the product of a decreasing exponential (damping) with a trigonometric function (oscillation). Recognizing that the integral "repeats" after two applications of integration by parts, it can be treated as an algebraic equation and the value of the integral can be solved for directly, instead of trying to integrate indefinitely.
Common errors
Error 1: choosing u and dv so the new integral is more complicated
It seems reasonable to choose any part of the integrand as u without evaluating whether that choice actually simplifies the problem. It fails because an incorrect choice can produce a resulting integral ∫v du just as or more complicated than the original, wasting time and effort. Detect it by comparing the complexity of the resulting integral with the original immediately after the first application. Correct it by trying the opposite choice of u and dv if the first one does not simplify the problem. Mini-example: in ∫x e^x dx, choosing u=e^x and dv=x dx complicates the problem, while u=x and dv=e^x dx correctly simplifies it.
Error 2: forgetting the negative sign in the formula
It seems reasonable to write ∫u dv = uv + ∫v du, forgetting that the correct formula has a negative sign before the new integral. It fails because that sign error completely reverses the contribution of the new integral, giving an incorrect result. Detect it by carefully reviewing the formula before substituting values: ∫u dv = uv - ∫v du. Correct it by memorizing the formula with the explicit negative sign, or re-deriving it from the product rule if in doubt. Mini-example: forgetting the negative sign when calculating ∫t e^(-t) dt can give a result with the sign reversed in the final term.
Error 3: forgetting to evaluate the boundary term in definite integrals
It seems reasonable to calculate the complete antiderivative using integration by parts but forget to evaluate the term [uv] at the corresponding limits when dealing with a definite integral. It fails because that boundary term is an essential part of the final result, and omitting it gives an incomplete result. Detect it by checking whether the term [uv]ₐᵇ explicitly appears in the final result. Correct it by always evaluating that term at the limits before giving the final answer. Mini-example: calculating ∫₀¹ t e^(-t) dt without evaluating the boundary term -t e^(-t) at the limits 0 and 1 leaves the calculation incomplete.
Error 4: not recognizing when the original integral reappears
It seems reasonable to keep applying integration by parts indefinitely without noticing that, after two applications, the original integral reappears in the equation. It fails because in those cases (such as products of exponentials and trigonometric functions) the integral can be algebraically solved for, and not recognizing this leads to an infinite cycle of calculations without resolving anything. Detect it by comparing the new integral obtained with the original integral after each application of the technique. Correct it by treating the equation as an algebraic equation where the integral is the unknown, solving for it directly. Mini-example: when integrating e^x cos(x) twice with integration by parts, the original integral reappears, allowing it to be solved for algebraically instead of continuing to integrate.
Error 5: applying integration by parts when a simple substitution suffices
It seems reasonable to use integration by parts as the first option for any integral that seems complicated, without checking whether a simple substitution would solve the problem more quickly. It fails because integration by parts usually requires more steps and is more prone to errors than a direct substitution when the latter is applicable. Detect it by asking whether there is a substitution u=g(x) that directly simplifies the integrand before resorting to integration by parts. Correct it by trying simple substitution first, and resorting to integration by parts only if that option does not work. Mini-example: ∫x e^(x²) dx is more easily solved with substitution u=x² than with integration by parts.
Quick detection rule
If the new integral obtained after integration by parts is just as or more complicated than the original, if the negative sign in the formula was omitted, or if the boundary term in a definite integral was forgotten, the error is probably in the setup of the technique, not in the final arithmetic.
Physical applications
1. Damped oscillations
It appears when integrating products of exponential functions (damping) and trigonometric functions (oscillation) that arise when solving for energy or work in oscillating systems with energy loss. It is calculated by applying integration by parts twice and algebraically solving for the integral when it reappears. The result gives the accumulated energy contribution over the considered interval. The dangerous error is stopping after the first application without noticing that a second round is needed for the integral to repeat and be solvable. As a final control, the learner must explain why this technique avoids an infinite cycle of integrations by parts.
2. Analytical mechanics and the action principle
It appears when deriving the Euler-Lagrange equations from the principle of least action, where a time derivative of velocity must be "shifted" to the coordinate through integration by parts, generating a boundary term that vanishes if the variations are fixed at the endpoints. It is calculated by applying the integration-by-parts formula to the term with the time derivative in the action's integrand. The result gives the standard form of the equations of motion. The dangerous error is forgetting the boundary term and assuming it always vanishes without checking the problem's conditions. As a final control, the learner must explain why the variational problem's boundary conditions guarantee that term vanishes.
3. Work of time-dependent forces
It appears when calculating the work or impulse of a force that depends on time in a coupled way with another quantity (such as F(t)=t·g(t)), requiring integration by parts to separate the contributions. It is calculated by choosing the polynomial part as u and the remaining function as dv. The result gives the accumulated physical quantity over the interval of interest. The dangerous error is trying to solve the integral with simple substitution when it actually requires integration by parts due to the structure of the product. As a final control, the learner must explain why choosing u as the polynomial part simplifies the problem.
4. Fourier transforms and analysis
It appears when calculating Fourier series coefficients or integral transforms where the integrand includes the product of a function and a complex exponential or trigonometric term, requiring integration by parts when the function is not trivial to integrate directly together with the oscillatory term. It is calculated by applying the standard formula, treating the non-oscillatory part as u. The result gives the coefficients describing the frequency content of the signal. The dangerous error is not correctly simplifying the boundary terms when the integration interval is periodic. As a final control, the learner must explain why certain boundary terms automatically cancel in integrals over a complete period.
5. Electromagnetism and potentials
It appears when solving integrals to calculate electric or magnetic potentials from charge or current distributions, where the integrand may couple a distribution function with a Green's function or a geometric term, requiring integration by parts to simplify the expression. It is calculated by applying the standard formula over the spatial integration variable. The result gives a more manageable expression for the resulting potential or field. The dangerous error is ignoring the boundary term when the charge or current distribution does not vanish at the integration limits. As a final control, the learner must explain under what physical conditions that boundary term actually vanishes.
Practice
Level 1: recognition
Identify, for three given integrals, which requires integration by parts and which can be solved with simple substitution.
Exercise: explain why ∫x cos(x) dx requires integration by parts while ∫x cos(x²) dx does not.
Level 2: direct application
Solve a simple integral by applying the integration-by-parts formula, choosing u and dv appropriately.
Exercise: calculate ∫x e^x dx using integration by parts.
Level 3: choosing the tool
Decide which function should be u and which dv in an integral with a product of functions, justifying the choice based on which function simplifies upon differentiation.
Exercise: given ∫x² ln(x) dx, decide which function to assign as u and which as dv, and justify your choice.
Level 4: physical interpretation
Interpret the boundary term obtained when applying integration by parts in a physics problem, explaining what it represents in that context.
Exercise: given a boundary term representing kinetic energy evaluated at the endpoints of a motion, interpret what that term physically means.
Level 5: intentional error
Analyze a calculation where the negative sign in the integration-by-parts formula was omitted, or where the boundary term in a definite integral was forgotten. Detect the error, correct it, and explain the physical consequence.
Exercise: invent a plausible error when calculating ∫₀¹ t e^(-t) dt forgetting the boundary term, show why it seems reasonable, correct it, and state the incorrect result it would have produced.