Skip to main content
Contents Index
Dark Mode Prev Up Next
\(\usepackage{siunitx}
\newcommand{\lrp}[1]{\left(#1\right)}
\newcommand{\lrb}[1]{\left[#1\right]}
\newcommand{\lrbrace}[1]{\left\lbrace#1\right\rbrace}
\newcommand{\abs}[1]{\left|#1\right|}
\newcommand{\dint}{\displaystyle\int}
\newcommand{\defint}[2]{\dint^{#2}_{#1}}
\newcommand{\dlim}[2]{\displaystyle\lim_{#1\rightarrow #2}\,}
\newcommand{\dydx}{\dfrac{dy}{dx}}
\newcommand{\ddx}{\tfrac{d}{dx}}
\newcommand{\dddx}{\dfrac{d}{dx}}
\newcommand{\ifsol}[1]{\ifprintanswers{#1}\fi}
\newcommand{\Nat}{\mathbb{N}}
\newcommand{\Whole}{\mathbb{W}}
\newcommand{\Int}{\mathbb{Z}}
\newcommand{\Rat}{\mathbb{Q}}
\newcommand{\Real}{\mathbb{R}}
\newcommand{\Complex}{\mathbb{C}}
\DeclareMathOperator\arcsinh{arcsinh}
\DeclareMathOperator\arccosh{arccosh}
\DeclareMathOperator\arctanh{arctanh}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\newcommand{\sfrac}[2]{{#1}/{#2}}
\)
Section 15.1 Definite Integrals
The int() and Int() commands allows us to compute definite and indefinite directly. It is important to know the difference between these two commands:
Int()
This is the βinertβ form of the command, which outputs only the definite or indefinite integral itself, without computing the result.
This version of the command makes it possible to assign a name to the integral and use it in other commands.
The value() command may be applied to the output of an Int() command to compute the result of integration.
Always remember that capitalization is important in Maple.
To see the difference between the two version, we can evaluate the definite integral of
\(f(x) = \frac{1}{x^2+1}\) over the interval
\([-3,3]\text{.}\)
\begin{equation*}
\displaystyle f\, := \,x\mapsto \frac{1}{ {x}^{2}+1 }
\end{equation*}
We use the
Int() command to display the integral, and the
int() command to evaluate the integral. The
evalf() command may be used to evaluate the result as a decimal.
\begin{equation*}
\displaystyle \int _{-3}^{3}\! \frac{1}{ {x}^{2}+1 }\,{dx}
\end{equation*}
> int(f(x), x=-3..3); evalf(%)
\begin{equation*}
\displaystyle 2\,\arctan \left( 3 \right)
\end{equation*}
\begin{equation*}
\displaystyle 2.498091544
\end{equation*}
Example 15.1 . The Net Area under \(g(x) = \ln(x)\) on \([1,10]\) .
In this example, we will use a definite integral to determine the net area bounded by
\(g(x) = \ln(x)\) and the
\(x\) -axis over the interval
\([1,10]\text{.}\) Weβll start by assigning the function and looking at a graph of the function to get a better sense of the area.
\begin{equation*}
\displaystyle g\, := \,x\mapsto \ln \left( x \right)
\end{equation*}
Weβll use the inert command
Int() to see how the integral is set up. This can then be combined with
value(%) and
evalf(%) to have the result computed exactly and as a rounded decimal.
> Int(g(x), x=1..10); value(%); evalf(%);
\begin{equation*}
\displaystyle \int _{1}^{10}\! \ln(x)\,{dx}
\end{equation*}
\begin{equation*}
\displaystyle -9+10\,\ln \left( 2 \right) +10\,\ln \left( 5 \right)
\end{equation*}
\begin{equation*}
\displaystyle 14.02585093
\end{equation*}
Example 15.2 . An Improper Integral.
The int() and Int() commands can also be used to compute improper definite integrals. In this example, we will determine whether the integral
\begin{equation*}
\displaystyle \int_{1}^{\infty}\! \frac{1}{x^2}{dx}
\end{equation*}
is convergent and if so, its exact value.
To begin, we will assign the function and take a look at its graph. The
plot() command may be able to plot a function over an infinite interval. This can produce unpredictable results, so sometimes it is better to simply choose a closed interval with large values of
\(x\) instead.
\begin{equation*}
\displaystyle h\, := \,x\mapsto {x}^{-2}
\end{equation*}
> plot(h(x), x=0..infinity);
Weβll start with the inert command, to see how the improper integral is set up. For
\(\infty\) in Maple, we type
infinity.
> Int(h(x), x=1..infinity);
\begin{equation*}
\displaystyle \int _{1}^{\infty }\!{x}^{-2}{dx}
\end{equation*}
Next weβll calculate the result using the lowercase
int() command to see if the result is finite.
> int(h(x), x=1..infinity);
\begin{equation*}
\displaystyle 1
\end{equation*}
Since the result is finite, this improper integral is convergent.