Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Apply Standard Integration Methods Directly

MuPAD® notebooks are not recommended. 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.

Integration by Parts

Integration by parts is one of the common methods for computing integrals. Using this method, you rewrite the original integral in terms of an expression containing a simpler integral. Integration by parts for indefinite integrals uses the definition:

.

For definite integrals, integration by parts is defined as follows:

.

Internally, MuPAD® uses integration by parts along with other integration methods. To use this method explicitly, call the intlib::byparts function. If you want to integrate an expression by parts, keep the original integral unevaluated. By default, int returns evaluated integrals. Use the hold or freeze commands to prevent evaluation of the integral:

f := freeze(int)(exp(a*x)*cos(I*x*b), x)

Call intlib::byparts and specify the part of an expression you want to integrate. For example, specify :

f_int := intlib::byparts(f, exp(a*x))

To evaluate the resulting integral, use the eval command:

eval(f_int)

If the resulting expression is too long, try using the simplify or Simplify function:

Simplify(%)

Change of Variable

Change of variable is also one of the common methods for computing integrals. For explicit use of this method, MuPAD provides the intlib::changevar function. When changing an integration variable, you need to keep the integral unevaluated. By default, int returns evaluated integrals. Use the hold or freeze commands to prevent evaluation of the integral:

f := intlib::changevar(hold(int)(sin(exp(x)), x), t = exp(x), t)

To evaluate the resulting integral, use the eval command:

eval(f)

The change of variable method also works for computing definite integrals:

f := intlib::changevar(hold(int)(x/sqrt(1 - x^2),
                           x = a..b), t = x^2, t)

Was this topic helpful?