Function: math[curveplot] - plots tangent and/or normal lines of real-valued functions
Calling Sequence:
curveplot(f, x=a, x=m .. n, options);
Parameters:
f -
expression in x
x -
a name
a -
point (a numeric value)
m, n - plot boundaries
options - (optional) all plot options and various curveplot options
Description:
This function plots the graph of a real-valued function f in one indeterminate x together with either the tangent or normal line - or both - of that function at a point a.
The following special curveplot options are available:
'tangentline' (or 'tangent') - plots the tangent line in black color (default). Any valid Maple plot options can be passed as a list by specifying the equation 'tangentline' = [<plot options>] instead of the name 'tangentline'.
'normalline' (or 'normal') - plots the normal line in navy color (default). Any valid Maple plot options can be passed as a list by specifying the equation 'normalline' = [<plot options>] instead of the name 'normalline'.
'vertical' - draws a vertical line between the points (a, 0) and (a, f(a)) in grey color (default). Any valid Maple plot options can be passed as a list by specifying the equation vertical = [<plot options>] instead of the name 'vertical'.
'length' = <value> - length of the tangent and/or normal line(s) in <value> units. If not given, length is assigned infinity.
Note that with Version 2.0 of curveplot the syntax has been changed. Also, the options 'tangentcolor', 'normalcolor', and 'verticalcolor' have been removed.
You may set default colors for the three different lines by assigning any Maple color to the global variables curveplotNormalColor (color of the normal line), curveplotTangentColor (color of the tangent line), and curveplotVerticalColor (color of the vertical line).
This function is part of the math package, and so can be used only after performing the command with(math) or with(math, curveplot).
Examples:
> with(math, curveplot):
> curveplot(ln(x), x=0.5, x=0 .. 2, tangentline, vertical);
>
curveplot(exp(x), x=1, x=0 .. 2, y=0 .. 5,
normalline=[color=green],
scaling=constrained);
>
curveplot(x^3, x=1, x=-3 .. 3, y=-3 .. 3,
tangentline=[color=blue],
normalline=[color=black],
scaling=constrained, length=3);
>
curveplot(x^3, x=1,
x=0 .. 2, y=-1 .. 3,
tangentline=[color=black, thickness=2],
vertical=[color=darkcyan, linestyle=2],
scaling=constrained, length=3);
>
curveplot(x^3, x=1,
x=0 .. 2, y=-1 .. 3,
tangentline=[color=black, thickness=2],
normalline=[color=darkcyan, linestyle=2],
scaling=constrained, length=3);
> curveplot(ln(x), x=0.5, x=0 .. 4, vertical=[color=darkcyan]);
See Also:
plot , math/seqplot , math/gridplot .
Version History:
Version 1.0 as of December 01, 1997
Version 1.1 as of December 21, 1997
Version 2.0 as of February 23, 1998