Overview - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim

Overview of Visualization in Calculus1


See Student:-Calculus1 for a general introduction to the Calculus1 subpackage of the Student package and a list of visualization routines.


The visualization functionality of the Calculus1 package is provided to enable an instructor to demonstrate and a student to understand a range of single-variable calculus concepts both visually and computationally.


To use the short forms of the routine names in the Student:-Calculus1 subpackage, enter:



The visualization component of Calculus 1 is divided into four categories.





Critical Points

Extreme Points

Points of Inflection






Preliminary Routines

Shortcomings of Point Interpolation

Newton Quotients

Plotting an Inverse






Plotting the Derivative

Plotting a Tangent

Function Charts

Taylor Approximation

Rolle's Theorem

The Mean Value Theorem

Newton's Method








Approximating an Integral

Plotting Antiderivatives

Average Value of a Function

Volume of Revolution

Arc Length

Surface of Revolution





Many of the visualization routines can return multiple forms of output, and with the exception of the property routines all can display plots to demonstrate an idea.




FunctionAverage(sin(x), x=0..10);



FunctionAverage(sin(x), x=0..10, output=integral);



FunctionAverage(sin(x), x=0..10, output=plot);


Any integrals which are returned can be used with the Calculus1 single-stepping routines (see Single Step Overview):

VolumeOfRevolution(exp(x), x=1..2, output=integral);






Rule[change, u=exp(x)]((5));











Preliminary Routines



Example Worksheet

List of Visualization Commands



The routines Roots, Asymptotes, CriticalPoints, ExtremePoints, and InflectionPoints return qualitative information about the given expression.


Each routine takes, as a second argument, a variable or a variable equated to a range representing the interval in which to search for solutions.  If no range is given, it attempts to return all valid answers.  If there is an infinite number of points of the given type, a warning is given and a few sample points are returned.  If there is only a finite number of points, each routine attempts to return all of them.



The Roots routine returns the roots of the given expression.

Roots(x^2 - 4*x + 1);



Roots(sin(x), maxsols=3);

Warning, the expression may have an infinite number of roots, some examples of which are given



Roots(sin(x), x=10..20);





The Asymptotes routine returns the horizontal, diagonal, and vertical asymptotes of the expression.


By default, horizontal and diagonal asymptotes are returned using the variable y, though this can be modified by using extra parameters.

Asymptotes((x^2 - 4*x + 1)/x);






Asymptotes(tan(x - 1));

Warning, the expression has an infinite number of potential vertical asymptotes, some examples of which are given



Asymptotes(tan(x - 1), x=20..25);



Critical Points


The CriticalPoints routine returns all points where the derivative is zero or undefined.

CriticalPoints((x^4 - 4*x^3 - 4*x)/x);



ExtremePoints((x^4 - 4*x^3 - 4*x)/x);



Extreme Points


The ExtremePoints routine returns all points where the expression attains a local minimum or maximum, including any finite-valued end points on a finite or semi-infinite interval.

ExtremePoints((x^4 - 4*x^3 - 4*x)/x);



ExtremePoints((x^4 - 4*x^3 - 4*x)/x, x=-3..3);



ExtremePoints(sin(x), x=-10..infinity);

Warning, the expression has an infinite number of extreme points, some examples of which are given



Points of Inflection


The InflectionPoints routine returns all points where the sign of the second derivative changes.

InflectionPoints((x^3 - 7*x^2 +9*x - 4)/x, -3..7);





InflectionPoints(csc(x), -10..10);


Preliminary Routines

Shortcomings of Sampling


The PointInterpolation routine shows the problems associated with plotting a function based on only sampling the function at a small number of points.  It samples the function at a fixed number of points, and then interpolates those points with a curve.

PointInterpolation(sin(x), x=0..14);

PointInterpolation((x^2 - x)/(2*x^2 - 1), x=-4..4);

Newton Quotients


Newton quotients approximate the slope of an expression at a point by sampling the expression at nearby points.  For a positive value h, the value fx+hfxh is the right Newton quotient at the point x.


The NewtonQuotient routine plots the secant line through the point on the graph of a function whose slope is the corresponding Newton quotient, or the value of the Newton quotient plotted with the expression and its derivative.

NewtonQuotient(ln(x), x=1..5, output=plot, h=1);

NewtonQuotient(sin(x)*ln(x), x=1.8, output=plot, h=.2, showderivative);

NewtonQuotient(sin(x)*ln(x), x=1..5, output=plot, h=1, showderivative);

Plotting an Inverse


The InversePlot routine plots the inverse of an expression fx on an interval a,b.  The routine attempts to find the smallest interval which contains both the expression on the given range and the inverse.  For example, in plotting the inverse of sinx on 2π,4π, the interval −1,4π is used.

InversePlot(sin(x), x=2*Pi..4*Pi);

InversePlot(2*x^2 - 1, x=-2..2);

InversePlot(tan(x), x=-3..3);


Plotting the Derivative


The DerivativePlot routine plots an expression with its first and higher order derivatives.

DerivativePlot(ln(x), x=1..5);

DerivativePlot(x^4 - 3*x^3 + 3*x + 1, x=0..2, order=1..4);

Plotting a Tangent


Given an expression fx and a point x=a, the Tangent routine returns the slope of the tangent, the equation of the tangent line, or the plot of the tangent line and the expression.

Tangent(sin(x), x=3, output=line);



Tangent(sin(x)+x, x=3, output=plot);

Function Charts


Given an expression, the FunctionChart routine displays a plot of the expression with extreme points and regions where the expression increases and decreases, inflection points and regions of positive and negative concavity, and optionally roots and regions where the expression is positive and negative.


These regions can be shown through coloring the expression, using filled regions, and arrows.

FunctionChart(sin(x), x=0..2*Pi);

FunctionChart((x^2 - 4*x + 2)/(x - 1), x=-3..3);

Taylor Approximation


Given an expression fx, a point x=a, and a degree N, the TaylorApproximation routine returns the Nth degree Taylor approximation of an expression, a plot showing the Nth degree Taylor approximation and the original expression, or an animation showing how the approximation changes with degree.

TaylorApproximation(sin(x), x=0, -5..5, degree=5);



TaylorApproximation(sin(x), x=-1, degree=1..10, output=animation, view=[-5..3, DEFAULT]);

Rolle's Theorem


Rolle's theorem states that given an expression fx continuous on a closed interval a&comma;b, differentiable on the open interval a&comma;b, and satisfying fa=fb, there exists a value c such that a<c<b and f&apos;c=0.


The RollesTheorem routine checks that the conditions of Rolle's theorem are satisfied, finds examples of points c, and then plots the result.

RollesTheorem(sin(x), x=1..3*Pi-1, output = points);



RollesTheorem(sin(x), x=1..3*Pi-1);

RollesTheorem(x^3 - 4*x + 1, x=-1..1/2 + sqrt(13)/2);

The Mean Value Theorem


The mean value theorem states that given an expression fx continuous on a closed interval a&comma;b and differentiable on the open interval a&comma;b, there exists a value c such that a<c<b and f&apos;c=fbfaba. The MeanValueTheorem routine returns the point(s) where the derivative equals the slope, or a plot showing the point(s) and the function.

MeanValueTheorem(cos(x), x=1..10, output = points);



MeanValueTheorem(cos(x) + x^2, x=1..10, numeric, output = points);



MeanValueTheorem(cos(x), x=1..10);

MeanValueTheorem(x^4 - 3*x^2 + 4*x + 1, x=-1..4);

MeanValueTheorem(cos(x), x=1..10);

Newton's Method


Newton's method approximates the root of an expression by sampling it at a point, and then finding the root of the tangent line at that point.  By repeating this process, it is possible, in general, to achieve a good approximation of a root. The NewtonsMethod routine performs iterations of Newton's method.

NewtonsMethod(sin(x), x=2);



NewtonsMethod(sin(x), x=2, iterations=7);



NewtonsMethod(x^3 - 2*x^2, x=1/2, output=plot);

NewtonsMethod(x^3 - 2*x^2, x=1/2, output=animation);


Approximating an Integral


The ApproximateInt routine approximates definite integrals using various techniques. The partitions, points selected for Riemann sums, and the method can be modified or specified by the user. Animations are used to show refinements of partitions, allowing each interval, the widest interval, or the largest rectangle to be subpartitioned.  For Newton-Cotes techniques, such as Simpson's rule, the interpolating polynomials are plotted.


By default, a uniform partition of 10 intervals is used with a midpoint Riemann sum.

ApproximateInt(sin(x), x=0..3*Pi);



ApproximateInt(sin(x), x=0..3*Pi, output=sum);



ApproximateInt(sin(x), x=0..3*Pi, output=plot);

ApproximateInt(sin(x), x=0..3*Pi, output=animation);

ApproximateInt(sin(x), x=0..3*Pi, output=animation, partition=random[1], subpartition=width, method=random);


The following example is an animation using a random partition with a maximum norm of 1, with randomly selected points at which the function is evaluated. For each iteration the widest interval is refined randomly.

ApproximateInt(sin(x), x=0..3*Pi, output=animation, partition=random[1], refinement=random, subpartition=width, method=random, iterations=40);

Plotting Antiderivatives


Given an expression fx, there is an arbitrary number of expressions with a derivative of fx.  The function fx&DifferentialD;x returns one of these antiderivatives.  The AntiderivativePlot routine displays the expression and the particular antiderivative returned by the int command.

AntiderivativePlot(x*sin(x), x=0..3);

AntiderivativePlot(x*sin(x), x=0..3, showclass);


Options can be specified to display a class of antiderivatives, or fix the value of the antiderivative returned by int at a given point.

AntiderivativePlot(x^2*sin(x), x=-3..3, value=<-3,0>);

AntiderivativePlot(x*cos(x), x=0..2*Pi, showclass);

Average Value of a Function


The average value of an expression fx over an interval a&comma;b is defined as

1/(b - a) * int(f(x), x=a..b);



The FunctionAverage routine returns the average value, an inert integral which can be used with the Calculus1 single-stepping routines, or a plot of fx and a constant function the value of which is the average value of fx.

Volume of Revolution


The volume of the shape created by rotating an expression fx around the x-axis can be determined by solving the integral

VolumeOfRevolution(f(x), x=a..b, output=integral);



Similarly, the volume above the x-axis and under the surface created by rotating a positive-valued expression fx (defined on a positive interval of the x-axis) around the y-axis can be determined by solving the integral

VolumeOfRevolution(f(x), x=a..b, axis=vertical, output=integral);



The VolumeOfRevolution routine returns the volume, an inert integral representing the volume, or a plot of the volume integrated.

VolumeOfRevolution(sqrt(x)*cos(x), x=0..4*Pi);



VolumeOfRevolution(sqrt(x)*cos(x), x=0..4*Pi, output=integral);



VolumeOfRevolution(sqrt(x)*cos(x), x=0..4*Pi, output=plot);

VolumeOfRevolution(sqrt(x)*cos(x), x=0..4*Pi, axis=vertical, output=plot);


Except for a small class of examples, most volume of revolution integrals cannot be easily solved in closed form.

Arc Length


The arc length of a curve is the length of that curve.  In the case that the curve is the graph of a differentiable function the arc length can be determined by solving the integral

ArcLength(f(x), x=a..b, output=integral);



The ArcLength routine returns the arc length; an inert integral which can be used with single-stepping functionality of the Calculus1 package; or a plot that contains the function, the integrand, and the cumulative arc length from the left end point.  The expression for the arclength can be entered in cartesian, polar, parametric-cartesian, or polar-cartesian coordinates.

ArcLength(x^(3/2), x=0..2);



ArcLength([sin(x), cos(x)], x=0..Pi);



ArcLength(exp(x), x=0..5, coordinates=polar);



ArcLength(x^(3/2), x=0..2, output=integral);



ArcLength(x^(3/2), x=0..2, output=plot);


Except for a small class of examples, most arc length integrals cannot be easily solved in closed form.

Surface of Revolution


The area of the surface created by rotating a positive valued expression fx around the x-axis can be determined by solving the integral

SurfaceOfRevolution(f(x), x=a..b, output=integral);



Similarly, the area of the surface created by rotating an expression fx (defined on a positive interval of the x-axis) around the y-axis can be determined by solving the integral

SurfaceOfRevolution(f(x), x=a..b, axis=vertical, output=integral);



The SurfaceOfRevolution routine returns the surface area, an inert integral representing the surface area, or a plot of the surface integrated.

SurfaceOfRevolution(x^(2/3), x=0..1);



SurfaceOfRevolution(x^(2/3), x=0..1, output=integral);



SurfaceOfRevolution(x^(2/3), x=0..1, output=plot);

SurfaceOfRevolution(x^(2/3), x=0..1, axis=vertical, output=plot);


Except for a small class of examples, most surface of revolution integrals cannot be easily solved in closed form.

Example Worksheet


For more introductory examples, see Calculus1 Visualization Example Worksheet.

List of Visualization Commands


The following is a list of the available Student:-Calculus1 visualization routines.






















The colors used for the various components of the plots produced by the visualization routines can be adjusted by calling the Student:-SetColors command.

See Also

Calculus1 Visualization Example Worksheet