Integration by parts
From Academic Kids

In calculus, and more generally in mathematical analysis, integration by parts is a rule that transforms the integral of products of functions into other, possibly simpler, integrals. The rule arises from the product rule of differentiation.
Suppose f(x) and g(x) are two continuously differentiable functions. Then the integration by parts rule states that for endpoints a, b
 <math>\int_a^b f(x) g'(x)\,dx = \left[ f(x) g(x) \right]_{a}^{b}  \int_a^b f'(x) g(x)\,dx<math>
where we use the common notation
 <math>\left[f(x) g(x) \right]_{a}^{b} = f(b) g(b)  f(a) g(a).<math>
The rule is shown to be true by using the product rule for derivatives and the fundamental theorem of calculus. Thus
 <math> f(b)g(b)  f(a)g(a) = \int_a^b \frac{d}{dx} (f(x) g(x)) \, dx =<math>
<math>
\int_a^b f'(x) g(x) \, dx + \int_a^b f(x) g'(x) \, dx <math>
In the traditional calculus curriculum, this rule is often stated using indefinite integrals in the form
 <math>\int f(x) g'(x)\,dx = f(x) g(x)  \int g(x) f'(x)\,dx<math>
or in an even shorter form, if we let u = f(x), v = g(x) and the differentials du = f′(x) dx and dv = g′(x) dx, then it is in the form in which it is most often seen:
 <math>\int u\,dv = u v  \int v\,du.<math>
One can also formulate a discrete analogue for sequences, called summation by parts.
Note that the original integral contains the derivative of g; in order to be able to apply the rule, the antiderivative g must be found, and then the resulting integral ∫g f′ dx must be evaluated.
An alternative notation has the advantage that the factors of the original expression are identified as f and g, but the drawback of a nested integral:
 <math>\int f g\,dx = f \int g\,dx  \int \left ( f' \int g\,dx \right )dx<math>
This formula is valid whenever f is continuously differentiable and g is continuous.
Application
The rule is helpful in the integration of a function h(x) which can be expressed as a product of two functions, h(x) = f(x)g(x), in such a way that the derivative of f and an antiderivative of g are known, and the resulting integral of f ' times the integral of g can be evaluated.
Examples
In order to calculate:
 <math>\int x\cos (x) \,dx<math>
Let:
 u = x, so that du = dx,
 dv = cos(x) dx, so that v = sin(x).
Then:
 <math>\int x\cos (x) \,dx = \int u \,dv = uv  \int v \,du<math>
 <math>\int x\cos (x) \,dx = x\sin (x)  \int \sin (x) \,dx<math>
 <math>\int x\cos (x) \,dx = x\sin (x) + \cos (x) + C<math>
where C is an arbitrary constant of integration.
By repeatedly using integration by parts, integrals such as
 <math>\int x^{3} \sin (x) \,dx \quad \mbox{and} \quad \int x^{2} e^{x} \,dx<math>
can be computed in the same fashion: each application of the rule lowers the power of x by one.
An interesting example that is commonly seen is:
 <math>\int e^{x} \cos (x) \,dx<math>
where, strangely enough, in the end, the actual integration does not need to be performed.
This example uses integration by parts twice. First let:
 u = e^{x}; thus du = e^{x}dx
 v = sin(x); thus dv = cos(x)dx
Then:
 <math>\int e^{x} \cos (x) \,dx = e^{x} \sin (x)  \int e^{x} \sin (x) \,dx<math>
Now, to evaluate the remaining integral, we use integration by parts again, with:
 u = e^{x}; du = e^{x}dx
 v = cos(x); dv = sin(x)dx
Then:
 <math>\int e^{x} \sin (x) \,dx = e^{x} \cos (x)  \int e^{x} \cos (x) \,dx = e^{x} \cos (x) + \int e^{x} \cos (x) \,dx<math>
Putting these together, we get
 <math>\int e^{x} \cos (x) \,dx = e^{x} \sin (x) + e^x \cos (x)  \int e^{x} \cos (x) \,dx<math>
Notice that the same integral shows up on both sides of this equation. So we can simply add the integral to both sides to get:
 <math>2 \int e^{x} \cos (x) \,dx = e^{x} \left( \sin (x) + \cos (x) \right)<math>
 <math>\int e^{x} \cos (x) \,dx = {e^{x} \left( \sin (x) + \cos (x) \right) \over 2}<math>
Two other wellknown examples are when integration by parts is applied to a function expressed as a product of 1 and itself. This works if the derivative of the function is known, and the integral of this derivative times x is also known.
The first example is ∫ ln(x) dx. We write this as:
 <math>\int \ln (x) \cdot 1 \,dx<math>
Let:
 u = ln(x); du = 1/x dx
 v = x; dv = 1·dx
Then:
 <math>\int \ln (x) \,dx = x \ln (x)  \int x/x \,dx = x \ln (x)  \int 1 \,dx<math>
 <math>\int \ln (x) \,dx = x \ln (x)  {x} + {C}<math>
 <math>\int \ln (x) \,dx = x \left( \ln (x)  1 \right) + C<math>
where, again, C is the arbitrary constant of integration
The second example is ∫ arctan(x) dx, where arctan(x) is the inverse tangent function. Rewrite this as:
 <math>\int 1 \cdot \arctan (x) \,dx<math>
Now let:
 u = arctan(x); du = 1/(1+x^{2}) dx
 v = x; dv = 1·dx
Then:
 <math>\int \arctan (x) \,dx = x \arctan (x)  \int {x \over (1 + x^2)} \,dx = x \arctan (x)  {1 \over 2} \log(1 + x^2) + C<math>
using a combination of the inverse chain rule method and the natural logarithm integral condition.
Justification of the rule
Integration by parts follows from the product rule of differentiation: If the two continuously differentiable functions u(x) and v(x) are given, the product rule states that
 <math>(uv)' = (uv' + vu')<math>
By integrating both sides, we get
 <math>uv = \int (uv' + vu') \,dx<math>
The latter integral can be written as the sum of two integrals since integration is linear:
 <math>uv = \int uv' \,dx + \int vu' \,dx<math>
(the fact that u and v are continuously differentiable ensures that the two individual integrals exist.) Subtracting ∫ vu′ dx from both sides yields the desired formula of integration by parts.
 <math>\int uv' \,dx = uv  \int vu' \,dx<math>
Template:Wikibooksparde:Integralrechnung#Partielle_Integration he:אינטגרציה בחלקים pl:Całkowanie przez części