Integration by parts
MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
intlib::byparts(integral, du) performs on
integration by parts, where
du is the part to be
integrated and returns an expression containing the unevaluated partial
Mathematically, the rule of integration by parts is formally defined for indefinite integrals as
and for definite integrals as
intlib::byparts works for indefinite as well
as for definite integrals.
If MuPAD® cannot solve the integral for
case of definite integration, the function call is returned unevaluated.
The second argument
du should typically be
a partial expression of the integrand in
As a first example we apply the rule of integration by parts to the integral
. By using the function
hold we ensure that the first argument is of type
intlib::byparts(hold(int)(x*exp(x), x = a..b), exp(x))
In this case the ansatz is chosen as and thus v(x) = x.
In the following we give a more advanced example using the method of
integration by parts for solving the integral . For this we have to prevent that the integrator
already evaluates the integrals. Thus we first inactivate the requested integral with the
F := freeze(int)(exp(a*x)*sin(b*x), x)
and apply afterwards partial integration with :
F1 := intlib::byparts(F, exp(a*x))
This result contains another symbolic integral, which MuPAD can solve directly:
Evaluate the indefinite and definite integration by parts.
Integral: an arithmetical
expression containing a symbolic
The part to be integrated: an arithmetical expression