 Calculus1 Integration Apps - Maple Help

Calculus 1: Applications of Integration

The Student[Calculus1] package contains four routines that can be used to both work with and visualize the concepts of function averages, arc lengths, and volumes and surfaces of revolution.  This worksheet demonstrates this functionality.

For further information about any command in the Calculus1 package, see the corresponding help page.  For a general overview, see Calculus1.

Getting Started

While any command in the package can be referred to using the long form, for example, Student[Calculus1][DerivativePlot],  it is easier, and often clearer, to load the package, and then use the short form command names.

 > $\mathrm{restart}$
 > $\mathrm{with}\left(\mathrm{Student}\left[\mathrm{Calculus1}\right]\right):$

The following sections show how the routines work.  In some cases, examples show to use these visualization routines in conjunction with the single-stepping Calculus1 routines. Function Average

The average value of a function $f\left(x\right)$ on the interval $\left[a,b\right]$ is:

 > $\mathrm{FunctionAverage}\left(f\left(x\right),x=a..b,\mathrm{output}=\mathrm{integral}\right)$
 $\frac{{\mathrm{Int}}{}\left({f}{}\left({x}\right){,}{x}{=}{a}{..}{b}\right)}{{b}{-}{a}}$ (1.1)
 > $\mathrm{FunctionAverage}\left(\mathrm{sin}\left(x\right)+x,x=0..2\mathrm{π},\mathrm{output}=\mathrm{plot}\right)$ The integral output option can be used with the single-stepping functionality.

 > $\mathrm{FunctionAverage}\left(\mathrm{sin}\left(x\right)+x,x=0..2\mathrm{π},\mathrm{output}=\mathrm{integral}\right)$
 $\frac{{1}}{{2}}\frac{{\mathrm{Int}}{}\left({\mathrm{sin}}{}\left({x}\right){+}{x}{,}{x}{=}{0}{..}{2}{\mathrm{π}}\right)}{{\mathrm{π}}}$ (1.2)
 > $\mathrm{Rule}\left[\mathrm{sum}\right]\left(\right)$
 ${\mathrm{CALCULUS1OBJECT}}{}\left(\left[{1}{,}\left[{4}\right]{,}\left[{}\right]\right]{,}\left\{{x}\right\}\right){=}\frac{{1}}{{2}}\frac{{\mathrm{Int}}{}\left({\mathrm{sin}}{}\left({x}\right){,}{x}{=}{0}{..}{2}{\mathrm{π}}\right){+}{\mathrm{Int}}{}\left({x}{,}{x}{=}{0}{..}{2}{\mathrm{π}}\right)}{{\mathrm{π}}}$ (1.3)
 > $\mathrm{Rule}\left[\mathrm{sin}\right]\left(\right)$
 ${\mathrm{CALCULUS1OBJECT}}{}\left(\left[{1}{,}\left[{4}\right]{,}\left[{}\right]\right]{,}\left\{{x}\right\}\right){=}\frac{{1}}{{2}}\frac{{\mathrm{Int}}{}\left({x}{,}{x}{=}{0}{..}{2}{\mathrm{π}}\right)}{{\mathrm{π}}}$ (1.4)
 > $\mathrm{Rule}\left[\mathrm{power}\right]\left(\right)$
 $\frac{{{\int }}_{{0}}^{{2}{\mathrm{\pi }}}\left({\mathrm{sin}}{}\left({x}\right){+}{x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}}{{2}{\mathrm{\pi }}}{=}{\mathrm{\pi }}$ (1.5)

You can also compute the average value of a function using the FunctionAverageTutor command.

 > $\mathrm{FunctionAverageTutor}\left(\right)$  Volume of Revolution

Given a function $f\left(x\right)$, rotate its graph around the $x$-axis and determine the volume of the resulting solid.  The red line represents the value of the function.

 > $\mathrm{VolumeOfRevolution}\left(\mathrm{sin}\left(x\right)+2,x=0..4\mathrm{π},\mathrm{output}=\mathrm{plot}\right)$ The volume of this 3-D shape is given by the integral:

 > $\mathrm{VolumeOfRevolution}\left(\mathrm{sin}\left(x\right)+2,x=0..4\mathrm{π},\mathrm{output}=\mathrm{integral}\right)$
 ${\mathrm{Int}}{}\left({\mathrm{π}}{\left({\mathrm{sin}}{}\left({x}\right){+}{2}\right)}^{{2}}{,}{x}{=}{0}{..}{4}{\mathrm{π}}\right)$ (2.1)
 > $\mathrm{value}\left(\right)$
 ${18}{{\mathrm{\pi }}}^{{2}}$ (2.2)

Similarly, rotate the graph of $f\left(x\right)$ around the $y$-axis; in this case, determine the volume under the resulting surface. (Note: The function f should increase or decrease monotonically.)

 > $\mathrm{VolumeOfRevolution}\left(-\mathrm{cos}\left(x\right),x=\frac{\mathrm{π}}{2}..\mathrm{π},\mathrm{output}=\mathrm{plot},\mathrm{axis}=\mathrm{vertical}\right)$ This volume is given by:

 > $\mathrm{VolumeOfRevolution}\left(-\mathrm{cos}\left(x\right),x=\frac{\mathrm{π}}{2}..\mathrm{π},\mathrm{output}=\mathrm{integral},\mathrm{axis}=\mathrm{vertical}\right)$
 ${\mathrm{Int}}{}\left({-}{2}{\mathrm{π}}{x}{\mathrm{cos}}{}\left({x}\right){,}{x}{=}\frac{{1}}{{2}}{\mathrm{π}}{..}{\mathrm{π}}\right)$ (2.3)
 > $\mathrm{value}\left(\right)$
 ${{\mathrm{\pi }}}^{{2}}{+}{2}{\mathrm{\pi }}$ (2.4)

You can also determine the volume between two functions rotated around an axis.  Consider the two expressions ${\left(x-1\right)}^{4}+1$ and $x$ on the interval $\left[1,2\right]$.

 > $\mathrm{VolumeOfRevolution}\left({\left(x-1\right)}^{4}+1,x,x=1..2,\mathrm{output}=\mathrm{plot}\right)$ > $\mathrm{VolumeOfRevolution}\left({\left(x-1\right)}^{4}+1,x,x=1..2,\mathrm{output}=\mathrm{plot},\mathrm{axis}=\mathrm{vertical}\right)$ > $\mathrm{VolumeOfRevolution}\left({\left(x-1\right)}^{4}+1,x,x=1..2\right)$
 $\frac{{37}{\mathrm{\pi }}}{{45}}$ (2.5)
 > $\mathrm{VolumeOfRevolution}\left({\left(x-1\right)}^{4}+1,x,x=1..2,\mathrm{axis}=\mathrm{vertical}\right)$
 $\frac{{14}{\mathrm{\pi }}}{{15}}$ (2.6)

You can also compute the volume of revolution and display the resulting solid using the VolumeOfRevolutionTutor command.

 > $\mathrm{VolumeOfRevolutionTutor}\left(\right)$  Arc Length

Given a function $f\left(x\right)$, determine the length of the curve (or arc) from the point ($a,f\left(a\right)$) to the point ($b,f\left(b\right)$).  This value is given by the formula:

 > $\mathrm{ArcLength}\left(f\left(x\right),x=a..b,\mathrm{output}=\mathrm{integral}\right)$
 ${\mathrm{Int}}{}\left(\sqrt{{\left({\mathrm{diff}}{}\left({f}{}\left({x}\right){,}{x}\right)\right)}^{{2}}{+}{1}}{,}{x}{=}{a}{..}{b}\right)$ (3.1)

When calling ArcLength with the plot output option, three curves are plotted:

1.  The expression (in red by default),

2.  The integrand (in blue by default),

3.  The expression (in green by default) ${{\int }}_{a}^{x}\sqrt{{\left(\frac{ⅆ}{ⅆs}f\left(s\right)\right)}^{2}+1}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}s$

and thus, the value of the green line at the point b is the total arc length of the curve.

 > $\mathrm{ArcLength}\left(2\mathrm{sin}\left(x\right),x=0..2\mathrm{π},\mathrm{output}=\mathrm{plot}\right)$ In general, the resulting integrand is difficult to solve.

You can also computer arc length using the ArcLengthTutor command.

 > $\mathrm{ArcLengthTutor}\left(\right)$  Simple Example Using Single Stepping

 > $\mathrm{ArcLength}\left({x}^{2}-\frac{\mathrm{ln}\left(x\right)}{8},x=1..3,\mathrm{output}=\mathrm{integral}\right)$
 ${\mathrm{Int}}{}\left(\frac{{1}}{{8}}\frac{{16}{{x}}^{{2}}{+}{1}}{{x}}{,}{x}{=}{1}{..}{3}\right)$ (3.1.1)
 > $\mathrm{simplify}\left(\right)$
 $\frac{{1}}{{8}}{\mathrm{Int}}{}\left(\frac{{16}{{x}}^{{2}}{+}{1}}{{x}}{,}{x}{=}{1}{..}{3}\right)$ (3.1.2)
 >
 ${\mathrm{CALCULUS1OBJECT}}{}\left(\left[{2}{,}\left[{4}\right]{,}\left[{}\right]\right]{,}\left\{{x}\right\}\right){=}\frac{{1}}{{8}}{\mathrm{Int}}{}\left({16}{x}{+}\frac{{1}}{{x}}{,}{x}{=}{1}{..}{3}\right)$ (3.1.3)
 > $\mathrm{Rule}\left[\mathrm{sum}\right]\left(\right)$
 ${\mathrm{CALCULUS1OBJECT}}{}\left(\left[{2}{,}\left[{4}{,}{4}\right]{,}\left[{}\right]\right]{,}\left\{{x}\right\}\right){=}\frac{{1}}{{8}}{\mathrm{Int}}{}\left({16}{x}{,}{x}{=}{1}{..}{3}\right){+}\frac{{1}}{{8}}{\mathrm{Int}}{}\left(\frac{{1}}{{x}}{,}{x}{=}{1}{..}{3}\right)$ (3.1.4)
 > $\mathrm{Rule}\left[\mathrm{c*}\right]\left(\right)$
 ${\mathrm{CALCULUS1OBJECT}}{}\left(\left[{2}{,}\left[{4}{,}{4}{,}{4}\right]{,}\left[{}\right]\right]{,}\left\{{x}\right\}\right){=}{2}\left({\mathrm{Int}}{}\left({x}{,}{x}{=}{1}{..}{3}\right)\right){+}\frac{{1}}{{8}}{\mathrm{Int}}{}\left(\frac{{1}}{{x}}{,}{x}{=}{1}{..}{3}\right)$ (3.1.5)
 > $\mathrm{Rule}\left[\mathrm{^}\right]\left(\right)$
 ${\mathrm{CALCULUS1OBJECT}}{}\left(\left[{2}{,}\left[{4}{,}{4}\right]{,}\left[{}\right]\right]{,}\left\{{x}\right\}\right){=}{8}{+}\frac{{1}}{{8}}{\mathrm{Int}}{}\left(\frac{{1}}{{x}}{,}{x}{=}{1}{..}{3}\right)$ (3.1.6)
 > $\mathrm{Rule}\left[\mathrm{^}\right]\left(\right)$
 $\frac{\left({{\int }}_{{1}}^{{3}}\frac{{16}{{x}}^{{2}}{+}{1}}{{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right)}{{8}}{=}{8}{+}\frac{{\mathrm{ln}}{}\left({3}\right)}{{8}}$ (3.1.7) One special case is the hyperbolic cosine function, which is defined as:
$\mathrm{cosh}\left(x\right)=\frac{{ⅇ}^{x}+{ⅇ}^{-x}}{2}$
For example, this function gives the shape of a wire hanging from two points.

 > $\mathrm{plot}\left(\mathrm{cosh}\left(x\right),x=-1..1.1\right)$ In this special case, the length of the curve $\mathrm{cosh}\left(x\right)$ is equal to the integral of $\mathrm{cosh}\left(x\right)$.

 > $\mathrm{ArcLength}\left(\mathrm{cosh}\left(x\right),x=-1.0..1.1\right)$
 ${2.510848664}$ (3.2.1)
 > ${∫}_{-1.0}^{1.1}\mathrm{cosh}\left(x\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆx$
 ${2.510848664}$ (3.2.2) Surface of Revolution

Given a function $f\left(x\right)$, rotate its graph around the $x$-axis and determine the area of the resulting surface.  The red line represents the value of the function.

 > $\mathrm{SurfaceOfRevolution}\left(\mathrm{sin}\left(x\right)+2,x=0..4\mathrm{π},\mathrm{output}=\mathrm{plot}\right)$ The area of this surface is given by:

 > $\mathrm{SurfaceOfRevolution}\left(\mathrm{sin}\left(x\right)+2,x=0..4\mathrm{π},\mathrm{output}=\mathrm{integral}\right)$
 ${\mathrm{Int}}{}\left({2}{\mathrm{π}}\left({\mathrm{sin}}{}\left({x}\right){+}{2}\right)\sqrt{{1}{+}{{\mathrm{cos}}{}\left({x}\right)}^{{2}}}{,}{x}{=}{0}{..}{4}{\mathrm{π}}\right)$ (4.1)

Another example:

 > $\mathrm{SurfaceOfRevolution}\left({ⅇ}^{x},x=0..1,\mathrm{output}=\mathrm{integral}\right)$
 ${\mathrm{Int}}{}\left({2}{\mathrm{π}}{\mathrm{exp}}{}\left({x}\right)\sqrt{{1}{+}{\left({\mathrm{exp}}{}\left({x}\right)\right)}^{{2}}}{,}{x}{=}{0}{..}{1}\right)$ (4.2)
 > $\mathrm{value}\left(\right)$
 ${-}{\mathrm{\pi }}{\mathrm{ln}}{}\left({1}{+}\sqrt{{2}}\right){-}{\mathrm{\pi }}\sqrt{{2}}{+}{\mathrm{\pi }}\sqrt{{1}{+}{{ⅇ}}^{{2}}}{ⅇ}{+}{\mathrm{\pi }}{\mathrm{arcsinh}}{}\left({ⅇ}\right)$ (4.3)

Similarly, rotate the graph of $f\left(x\right)$ around the $y$-axis and determine the area of the resulting surface.

 > $\mathrm{SurfaceOfRevolution}\left(\mathrm{sin}\left(x\right)+2,x=2\mathrm{π}..4\mathrm{π},\mathrm{output}=\mathrm{plot},\mathrm{axis}=\mathrm{vertical}\right)$ When determining the area of the surface of revolution around the $x$- or $y$-axis, the integrand is similar. Only the term multiplying the square root is different.

 > $\mathrm{SurfaceOfRevolution}\left(f\left(x\right),x=a..b,\mathrm{output}=\mathrm{integral}\right)$
 ${\mathrm{Int}}{}\left({2}{\mathrm{π}}{\mathrm{abs}}{}\left({f}{}\left({x}\right)\right)\sqrt{{\left({\mathrm{diff}}{}\left({f}{}\left({x}\right){,}{x}\right)\right)}^{{2}}{+}{1}}{,}{x}{=}{a}{..}{b}\right)$ (4.4)
 > $\mathrm{SurfaceOfRevolution}\left(f\left(x\right),x=a..b,\mathrm{output}=\mathrm{integral},\mathrm{axis}=\mathrm{vertical}\right)$
 ${\mathrm{Int}}{}\left({2}{\mathrm{π}}{\mathrm{abs}}{}\left({x}\right)\sqrt{{\left({\mathrm{diff}}{}\left({f}{}\left({x}\right){,}{x}\right)\right)}^{{2}}{+}{1}}{,}{x}{=}{a}{..}{b}\right)$ (4.5)

You can also compute and view the surface of revolution using the SurfaceOfRevolutionTutor command.

 > $\mathrm{SurfaceOfRevolutionTutor}\left(\right)$  Negative Values

The interpretation of negative values requires some explanation.  When rotating a function around the $x$-axis, a negative value of the function is interpreted as a negative surface value.

 > $\mathrm{SurfaceOfRevolution}\left(\mathrm{sin}\left(x\right),x=0..2\mathrm{π}\right)$
 ${4}{\mathrm{\pi }}{\mathrm{ln}}{}\left({1}{+}\sqrt{{2}}\right){+}{4}{\mathrm{\pi }}\sqrt{{2}}$ (4.1.1)

The absolute value function can be used to get the expected value.

 > $\mathrm{SurfaceOfRevolution}\left(\left|\mathrm{sin}\left(x\right)\right|,x=0..2\mathrm{π}\right)$
 ${2}{\mathrm{\pi }}{\mathrm{ln}}{}\left({1}{+}\sqrt{{2}}\right){+}{4}{\mathrm{\pi }}\sqrt{{2}}{-}{2}{\mathrm{\pi }}{\mathrm{ln}}{}\left(\sqrt{{2}}{-}{1}\right)$ (4.1.2)

Similarly, when the graph is rotated around the $y$-axis, negative $x$ values are interpreted as negative surface values.

 > $\mathrm{SurfaceOfRevolution}\left(\mathrm{cosh}\left(x\right),x=-\mathrm{π}..\mathrm{π},\mathrm{axis}=\mathrm{vertical}\right)$
 ${2}{{ⅇ}}^{{\mathrm{\pi }}}{{\mathrm{\pi }}}^{{2}}{-}{2}{{ⅇ}}^{{-}{\mathrm{\pi }}}{{\mathrm{\pi }}}^{{2}}{-}{2}{\mathrm{\pi }}{{ⅇ}}^{{\mathrm{\pi }}}{-}{2}{\mathrm{\pi }}{{ⅇ}}^{{-}{\mathrm{\pi }}}{+}{4}{\mathrm{\pi }}$ (4.1.3)

If the function is symmetric, the integral must be calculated from the origin. Otherwise, the surface area is added twice.

 > $\mathrm{SurfaceOfRevolution}\left(\mathrm{cosh}\left(x\right),x=0..\mathrm{π},\mathrm{axis}=\mathrm{vertical}\right)$
 ${2}{\mathrm{\pi }}{+}{{ⅇ}}^{{\mathrm{\pi }}}{{\mathrm{\pi }}}^{{2}}{-}{{ⅇ}}^{{-}{\mathrm{\pi }}}{{\mathrm{\pi }}}^{{2}}{-}{\mathrm{\pi }}{{ⅇ}}^{{\mathrm{\pi }}}{-}{\mathrm{\pi }}{{ⅇ}}^{{-}{\mathrm{\pi }}}$ (4.1.4)

When the function is not symmetric, the sum of each positive branch must be added.

 > $\mathrm{SurfaceOfRevolution}\left({ⅇ}^{x},x=0..\mathrm{π},\mathrm{axis}=\mathrm{vertical}\right)+\mathrm{SurfaceOfRevolution}\left({ⅇ}^{-x},x=0..\mathrm{π},\mathrm{axis}=\mathrm{vertical}\right)$
 ${\mathrm{int}}{}\left({2}{\mathrm{π}}{x}\sqrt{{1}{+}{\left({\mathrm{exp}}{}\left({x}\right)\right)}^{{2}}}{,}{x}{=}{0}{..}{\mathrm{π}}\right){+}{\mathrm{int}}{}\left({2}{\mathrm{π}}{x}\sqrt{{1}{+}{\left({\mathrm{exp}}{}\left({-}{x}\right)\right)}^{{2}}}{,}{x}{=}{0}{..}{\mathrm{π}}\right)$ (4.1.5)
 > $\mathrm{SurfaceOfRevolution}\left({ⅇ}^{x},x=-\mathrm{π}..\mathrm{π},\mathrm{axis}=\mathrm{vertical},\mathrm{output}=\mathrm{plot}\right)$ > 

Main: Visualization

Previous: Integration