Calculus 1: Applications of Differentiation
The Student[Calculus1] package contains three routines that can be used to both work with and visualize the concepts of Taylor approximations, charting a function, and using Newton's method. 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][FunctionChart], it is easier, and often clearer, to load the package, and then use the short form command names.
restart
with⁡StudentCalculus1:
The following sections show how the routines work.
Taylor Approximations
If at a point c, a function f has a power series expansion f⁡x=∑n=0∞an⁢x−cn the coefficients an are given by: an=f⁡n⁡cn!
where f⁡n⁡c is the nth derivative of f evaluated at the point c. Named after the English mathematician Brook Taylor, this infinite series is called the Taylor expansion of the function f at c.
The Taylor expansion of the exponential function ⅇx is: ⅇx=∑n=0∞xnn!
from which it follows that:
ⅇ=∑n=0∞1n!
Taylor approximations require both an expression and a point around which to expand.
TaylorApproximation⁡x7−5⁢x5+4⁢x4−7⁢x2+3,x=1,order=3
12−16⁢x−12⁢x−12+x−13
Thus, around the point x=1 the polynomial x7−5⁢x5+4⁢x4−7⁢x2+3 behaves like x3−15⁢x2+11⁢x−1.
TaylorApproximation⁡x7−5⁢x5+4⁢x4−7⁢x2+3,x=1,order=3,output=plot
TaylorApproximation⁡sinx,x=1,output=animation,order=1..16
The derivative of the arctan function has singularities at I and −I. Therefore, the radius of convergence of the Taylor approximation around the origin is 1.
TaylorApproximation⁡arctanx,x=0,output=animation,order=1..20
You can compute and visualize Taylor approximations using the TaylorApproximationTutor command.
TaylorApproximationTutor⁡
Function Chart
The FunctionChart routine plots a function and shows regions of positive and negative sign, increasing and decreasing, and positive and negative concavity. By default:
1. Roots are marked by circles. 2. Extreme points are marked by diamonds. 3. Inflection points are marked by crosses. 4. Regions of increase and decrease are marked by blue and orange lines, respectively. 5. Regions of positive and negative concavity are marked by purple and yellow fill, respectively, with arrows pointing in the direction of the concavity.
FunctionChart⁡x4+2⁢x3−9⁢x2−3⁢x+6,x=−5..4
FunctionChart⁡sin⁡x,x=0..2⁢π
FunctionChart⁡x3−2⁢x2−4⁢x+2x−4,x=−3..3
You can also perform curve analysis using the CurveAnalysisTutor command.
CurveAnalysisTutor⁡
Newton's Method
Given a point a and an expression f⁡x, the x-intercept of the tangent line through (a, f⁡a) can be used as an approximation to a root of the expression f⁡x. The equation of the tangent line is:
Tangent⁡f⁡x,x=a,output=line
x⁢ⅆⅆaf⁡a+f⁡a−ⅆⅆaf⁡a⁢a
collect⁡convert⁡,D,D⁡f⁡a
−a+x⁢D⁡f⁡a+f⁡a
Solving for zero:
solve⁡=0,x
−f⁡a−D⁡f⁡a⁢aD⁡f⁡a
expand⁡
−f⁡aD⁡f⁡a+a
As an example, consider the function F⁡x=x2−1 and an initial point x=2.0.
F:=x→x2−1
F≔x↦x2−1
aroot:=2.0−F⁡2.0D⁡F⁡2.0
aroot≔1.250000000
Repeating this another 9 times:
forito5doaroot:=aroot−F⁡arootD⁡F⁡arootend do
aroot≔1.025000000
aroot≔1.000304878
aroot≔1.000000046
aroot≔1.000000000
The routine NewtonsMethod performs the same process.
NewtonsMethod⁡F⁡x,x=2,output=sequence
2,1.250000000,1.025000000,1.000304878,1.000000046,1.000000000
NewtonsMethod⁡F⁡x,x=2,output=plot
NewtonsMethod⁡sin⁡xx,x=1,output=plot
The root to which a sequence of Newton iterations converges to depends on the initial point. For example,
NewtonsMethod⁡sin⁡xx,x=2,output=plot
In general, when the root is not a double root, Newton's method is very efficient. In the following example with Digits set to 30, Newton's method converges to the root after only 7 iterations.
Digits:=30
NewtonsMethod⁡x4−4⁢x3+4⁢x2−3⁢x+3,x=1,output=sequence,iterations=10
Digits:=10
Digits≔30
1,1.33333333333333333333333333333,1.28318584070796460176991150443,1.28231623816647766759714731909,1.28231595363411166690275078928,1.28231595363408116582940754743,1.28231595363408116582940754708
Digits≔10
You can also learn about Newton's method using the NewtonsMethodTutor command.
NewtonsMethodTutor⁡
Main: Visualization
Previous: Various Theorems about Derivatives
Next: Integration
Download Help Document