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

If the `limit`

command
cannot compute a limit of a function at a particular point and also
cannot prove that the limit is not defined at this point, the command
returns an unresolved limit:

limit(gamma(1/x)*cos(sin(1/x)), x = 0)

If `limit`

can prove that the limit is undefined
at a particular point, then it returns `undefined`

:

limit(exp(x)*cos(1/x), x = 0)

The function `exp(x)*cos(1/x)`

also does not
have one-sided limits at `x = 0`

:

limit(exp(x)*cos(1/x), x = 0, Left); limit(exp(x)*cos(1/x), x = 0, Right)

The plot shows that as `exp(x)*cos(1/x)`

approaches ```
x
= 0
```

, the function oscillates between
and
:

p1 := plot::Function2d(exp(x)*cos(1/x), x = -PI/4..PI/4): p2 := plot::Function2d(exp(x), x = -PI/4..PI/4, Color = RGB::Red): p3 := plot::Function2d(-exp(x), x = -PI/4..PI/4,Color = RGB::Red): plot(p1, p2, p3)

To get the interval of all possible accumulation points of the
function `exp(x)*cos(1/x)`

near the singularity ```
x
= 0
```

, use the option `Intervals`

:

limit(exp(x)*cos(1/x), x = 0, Intervals)

Was this topic helpful?