Calculus 1: Derivatives
The Student[Calculus1] package contains two routines that can be used to both work with and visualize the concepts of Newton quotients and derivatives. 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.
restart
withStudentCalculus1:
The following sections show how the routines work.
Newton Quotients
The slope of the line connecting the two points a,b and c,d is given by the formula d−bc−a. Given a function f⁡x, a point x0, and a value, the slope of the line between the points x0,f⁡x0 and x0+h,f⁡x0+h is thus f⁡x0+h−f⁡x0x0+h−x0, which simplifies to
NewtonQuotientfx,x=x0,h=h
f⁡x0+h−f⁡x0h
For a given sequence of values of h,
hl:=seq⁡12n,n=1..10
hl≔12,14,18,116,132,164,1128,1256,1512,11024
NewtonQuotient⁡sin⁡x,x=2.0,output=value,h=hl
−0.6216505654,−0.5248969196,−0.4718210960,−0.4442822560,−0.4302857216,−0.4232336448,−0.4196945280,−0.4179217408,−0.4170345472,−0.4165905408
In this case, the slope approaches the value of the derivative at the point 2.0:
ⅆⅆx⁢sin⁡xx=2.0|ⅆⅆx⁢sin⁡xx=2.0
−0.4161468365
This convergence to the derivative can be seen using the option output=animation.
NewtonQuotient⁡sin⁡x,x=2.0,output=animation,h=hl
You can also learn about Newton's Quotient using the TangentSecantTutor command.
TangentSecantTutor⁡
Plotting the Derivative
DerivativePlot⁡x⁢sin⁡x,x=−3..3
The option order can be used to plot higher order derivatives. In the next example, the first 4 derivatives of x4−4⁢x+3 are plotted, where the 1st and 4th derivatives are colored orange and green, respectively, and the colors of the intermediate derivatives are interpolated between orange and green. (The function is plotted in blue.)
DerivativePlot⁡x4−4⁢x+3,x=−3..3,order=1..4
DerivativePlot⁡x2−x⁢ⅇx,x=−5..1,order=1..10,view=DEFAULT,−2..10
You can also plot derivatives using the DerivativeTutor command.
DerivativeTutor⁡
See Also
Calculus1, diff
Main: Visualization
Previous: Tangents, Inverses, and Sampling
Next: Various Theorems about Derivatives
Download Help Document