Calculus1 Derivatives - Maple Help

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.

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

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 $\frac{d-b}{c-a}$.  Given a function $f\left(x\right)$, a point ${x}_{0}$, and a value, the slope of the line between the points $⟨{x}_{0},f\left({x}_{0}\right)⟩$ and $⟨{x}_{0}+h,f\left({x}_{0}+h\right)⟩$ is thus $\frac{f\left({x}_{0}+h\right)-f\left({x}_{0}\right)}{{x}_{0}+h-{x}_{0}}$, which simplifies to

 > $\mathrm{NewtonQuotient}\left(f\left(x\right),x={x}_{0},h=h\right)$
 $\frac{{f}{}\left({{x}}_{{0}}{+}{h}\right){-}{f}{}\left({{x}}_{{0}}\right)}{{h}}$ (1.1)

For a given sequence of values of $h$,

 > $\mathrm{hl}:=\left[\mathrm{seq}\left(\frac{1}{{2}^{n}},n=1..10\right)\right]$
 ${\mathrm{hl}}{≔}\left[\frac{{1}}{{2}}{,}\frac{{1}}{{4}}{,}\frac{{1}}{{8}}{,}\frac{{1}}{{16}}{,}\frac{{1}}{{32}}{,}\frac{{1}}{{64}}{,}\frac{{1}}{{128}}{,}\frac{{1}}{{256}}{,}\frac{{1}}{{512}}{,}\frac{{1}}{{1024}}\right]$ (1.2)
 > $\mathrm{NewtonQuotient}\left(\mathrm{sin}\left(x\right),x=2.0,\mathrm{output}=\mathrm{value},h=\mathrm{hl}\right)$
 ${-0.6216505654}{,}{-0.5248969196}{,}{-0.4718210960}{,}{-0.4442822560}{,}{-0.4302857216}{,}{-0.4232336448}{,}{-0.4196945280}{,}{-0.4179217408}{,}{-0.4170345472}{,}{-0.4165905408}$ (1.3)

In this case, the slope approaches the value of the derivative at the point 2.0:

 > $\genfrac{}{}{0}{}{\frac{ⅆ}{ⅆx}\mathrm{sin}\left(x\right)}{\phantom{x=2.0}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}|\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{\frac{ⅆ}{ⅆx}\mathrm{sin}\left(x\right)}}{x=2.0}$
 ${-0.4161468365}$ (1.4)

This convergence to the derivative can be seen using the option $\mathrm{output}=\mathrm{animation}$.

 > $\mathrm{NewtonQuotient}\left(\mathrm{sin}\left(x\right),x=2.0,\mathrm{output}=\mathrm{animation},h=\mathrm{hl}\right)$

You can also learn about Newton's Quotient using the TangentSecantTutor command.

 > $\mathrm{TangentSecantTutor}\left(\right)$

Plotting the Derivative

 > $\mathrm{DerivativePlot}\left(x\mathrm{sin}\left(x\right),x=-3..3\right)$

The option order can be used to plot higher order derivatives.  In the next example, the first 4 derivatives of  ${x}^{4}-4x+3$ are plotted, where the 1st and 4th derivatives are colored blue and green, respectively, and the colors of the intermediate derivatives are interpolated between blue and green.  (The function is plotted in red.)

 > $\mathrm{DerivativePlot}\left({x}^{4}-4x+3,x=-3..3,\mathrm{order}=1..4\right)$
 > $\mathrm{DerivativePlot}\left(\left({x}^{2}-x\right){ⅇ}^{x},x=-5..1,\mathrm{order}=1..10,\mathrm{view}=\left[\mathrm{DEFAULT},-2..10\right]\right)$

You can also plot derivatives using the DerivativeTutor command.

 > $\mathrm{DerivativeTutor}\left(\right)$
 >