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.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

**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.**

For definite integration, the `int`

command restricts the integration
variable `x`

to the given range of integration.

int(sin(ln(x)), x = 0..5)

If the `int`

command
determines that an integral does not converge, it returns the special
value `undefined`

:

int(exp(x*I), x = 1..infinity)

When the `int`

command
cannot compute an integral and also cannot prove that the integral
does not converge, it returns an unresolved integral:

int(sin(cos(x)), x = 0..10)

For definite integrals, the `int`

command restricts the integration
to the specified interval. If you use the `assume`

function to set properties on
the integration variable, `int`

temporarily
overwrites these properties and integrates over the specified interval.
To display warnings, set the value of `intlib::printWarnings`

to `TRUE`

:

intlib::printWarnings(TRUE): assume(x > 0): int(x, x = 1 .. 2); int(x, x = -3 .. 1)

Warning: The assumption that 'x' has property 'Dom::Interval([1], [2])' instead of given property 'Dom::Interval(0, infinity)' is used for integration. [int]

Warning: The assumption that 'x' has property 'Dom::Interval([-3], [1])' instead of given property 'Dom::Interval(0, infinity)' is used for integration. [int]

After computing an integral, MuPAD^{®} restores the assumptions
set for integration variable. If you do not want the assumptions to
affect further computations, use the `unassume`

function:

unassume(x)

MuPAD also makes implicit assumptions on the specified
interval. Suppose, you use the integration range as `[a, b]`

.
The system assumes that both `a`

and `b`

represent
real numbers, and that `a <= b`

unless you clearly
specify otherwise. If you set the value of `intlib::printWarnings`

to `TRUE`

, MuPAD displays
the warning about using implicit assumptions:

int(heaviside(x - a), x = a..b)

Warning: Cannot decide if 'a <= b' is true, will temporarily assume it is true. [int]

To avoid this implicit assumption, specify that ```
a >
b
```

or `a < b`

int(heaviside(x - a), x = a..b) assuming a > b

int(heaviside(x - a), x = a..b) assuming a < b

For further computations, disable the warnings:

intlib::printWarnings(FALSE):

Was this topic helpful?