integrateByParts
Applies integration by parts to an integral.
Category: Mathematics > Calculus
Syntax
G = integrateByParts(F, dv)
Rewrites F = int(u*dv) as u*v - int(v*du), where v is the antiderivative of dv.
Description
Integration by parts uses int(u dv) = u v - int(v du). The user chooses which part of the integrand is dv; the function divides it out to get u, integrates dv to get v and differentiates u. A good choice makes the new integral simpler, for example dv = exp(x) when u = x.
For a definite integral the result includes the bracket u*v evaluated at the limits.
Input arguments
F- An integral created with
int. dv- The factor of the integrand that is integrated; the rest of the integrand becomes
u.
Output arguments
G- Expression with boundary terms and, if needed, a new integral.
Example
Definite integral by parts
syms x
F = int(x*sin(x), x, 0, pi);
P = integrateByParts(F, sin(x))
Output
P = pi