Student[Calculus1] - Maple Programming Help

Home : Support : Online Help : Education : Student Packages : Calculus 1 : Visualization : Student/Calculus1/DerivativePlot

Student[Calculus1]

 DerivativePlot
 plot an expression and its derivative

 Calling Sequence DerivativePlot(f(x), x, opts) DerivativePlot(f(x), x = a..b, opts) DerivativePlot(f(x), a..b, opts)

Parameters

 f(x) - algebraic expression in variable 'x' x - name; specify the independent variable a, b - algebraic expressions; specify the plot range opts - equation(s) of the form option=value where option is one of alllegends, derivativecolors, derivativeoptions, derivativeoptions[i], functionoptions, order, showderivative, showfunction, or Student plot options; specify options for the plot

Description

 • The DerivativePlot(f(x), x=a..b) command plots the expression and its derivative or derivatives.
 • If the independent variable can be uniquely determined from the expression, the parameter x need not be included in the calling sequence.
 • The opts argument can contain any of the Student plot options or any of the following equations that set plot options.
 alllegends = true or false
 Whether the legend for every derivative curve is displayed.  If false, then only the legends for the first and last derivatives are displayed.  By default, the value is false.
 derivativecolors = color..color, color, list(color), or procedure
 Color(s) of the derivative(s) of f(x) in the plot. It can be specified as:
 – A range of colors that indicate the color of the lowest and highest derivatives. The colors of intermediate derivatives are interpolated. By default, a range of colors is used.
 – A single color for all derivatives.
 – A list of colors where the list has at least as many colors as there are degrees.
 – A procedure that takes as an argument a positive integer (the degree of the derivative) and returns the color of the derivative plot. For more information on plot colors, see plot/color.
 derivativeoptions = list
 A list of options for the plot of every derivative of the expression $f\left(x\right)$. The options for the plot of specific derivatives will be replaced if the corresponding derivativeoptions[i] has set options for that derivative. For more information on plot options, see plot/options.
 derivativeoptions[i] = list
 A list of options for the plot of the ith derivative of the expression $f\left(x\right)$. These plot options will replace those set by derivativeoptions. i must be one of the derivatives specified in order. For more information on plot options, see plot/options.
 functionoptions = list
 A list of options for the plot of the expression $f\left(x\right)$.  By default, the expression is plotted as a solid red line. For more information on plot options, see plot/options.
 order = posint, posint..posint, set(posint), or list(posint)
 Which derivatives are plotted.  The first and higher derivatives can be plotted. By default, only the first derivative is plotted.
 showderivative = true or false
 Whether the derivative(s) of $f\left(x\right)$ is (are) plotted.  By default, the value is true.
 showfunction = true or false
 Whether the expression $f\left(x\right)$ is plotted.  By default, the value is true.
 caption = anything
 A caption for the plot.
 The default caption is constructed from the parameters and the command options. caption = "" disables the default caption. For more information about specifying a caption, see plot/typesetting.

Examples

 > $\mathrm{with}\left(\mathrm{Student}\left[\mathrm{Calculus1}\right]\right):$
 > $f≔x↦3\cdot {x}^{2}-x$
 ${f}{≔}{x}{↦}{3}{\cdot }{{x}}^{{2}}{-}{x}$ (1)
 > $\mathrm{diff}\left(f\left(x\right),x\right)$
 ${6}{}{x}{-}{1}$ (2)
 > $\mathrm{DerivativePlot}\left(f\left(x\right),x=-1..1\right)$
 > $\mathrm{DerivativePlot}\left(\mathrm{exp}\left(x\right)+\mathrm{exp}\left(-x\right),-1..1\right)$
 > $\mathrm{DerivativePlot}\left(\mathrm{sin}\left(x\right)+x,\mathrm{functionoptions}=\left[\mathrm{thickness}=2\right],\mathrm{derivativeoptions}=\left[\mathrm{color}=\mathrm{green}\right],\mathrm{derivativeoptions}\left[1\right]=\left[\mathrm{legend}="Slope"\right]\right)$
 > $\mathrm{DerivativePlot}\left(\mathrm{sin}\left(0.98x\right),x=0..10,\mathrm{order}=1..20,\mathrm{derivativecolors}=\mathrm{blue}..\mathrm{magenta}\right)$
 > f := proc() evalf(sqrt( rand()/10^12 )) end proc:
 > colors := proc() COLOR(RGB, f(), f(), f()) end proc:
 > $\mathrm{DerivativePlot}\left(\mathrm{sin}\left(0.98x\right),x=0..10,\mathrm{order}=1..20,\mathrm{derivativecolors}=\mathrm{colors}\right)$

The command to create the plot from the Plotting Guide is

 > $\mathrm{DerivativePlot}\left(\mathrm{sin}\left(x\right)+x,\mathrm{order}=\left[1,2\right]\right)$