Lab Exam Preview

MAT 229, Spring 2025

Review

The (n^th) degree Taylor polynomial of f(x) centered at a is the partial sum of the Taylor series that goes up to and includes the (n^th) power of (x-a). If the Taylor series for f(x) centered at a converges to f(x) for a given value x, then the (n^th) Taylor polynomial of f(x) centered at a provides a polynomial approximation to f(x).

The (n^th) Taylor remainder of g(x) centered at a is

(Subscript[R, n])(x)=g(x)-(Underoverscript[Σ, (k=0), n])(((g^((k)))(a))/(k!))(((x-a))^k)

In other words the error in using the (n^th) degree Taylor polynomial to approximate the function is error=|(Subscript[R, n])(x)|

Analyzing error

The Taylor series error estimate: If |(f^((n+1)))(x)|≤M for all values of x of interest, then

|(Subscript[R, n])(x)|≤(M/((n+1)!))|x-a((|)^(n+1)).

You can think of this roughly as the error on the interval is smaller than the largest “first neglected term” on the interval.

Absolute convergence test

If (Underoverscript[Σ, k, ∞])|(Subscript[b, k])| converges then  (Underoverscript[Σ, k, ∞])(Subscript[b, k]) converges.

Root and Ratio tests:

Given any series (Underoverscript[Σ, k, ∞])(Subscript[b, k]): evaluate the limit of either/or

the ratio of successive terms (ratio test), ignoring any signs:

L = (lim_(k->∞))|((Subscript[b, k+1])/(Subscript[b, k]))|

the (k^th) root, ignoring any signs (root test), of the (k^th) term:

L = (lim_(k->∞))((|(Subscript[b, k])|)^(1/k)) .

Then

If L<1, then (Underoverscript[Σ, k, ∞])(Subscript[b, k]) converges.

If  L>1, then (Underoverscript[Σ, k, ∞])(Subscript[b, k]) diverges.

If L =1, then you must use another convergence test. The series doesn’t compare to a geometric series.

Some Useful Mathematica Commands

Series (and Normal, to convert the result of Series to a polynomial)
Sum
Limit
Solve
NSolve
Table
Plot
ListPlot
Show

Instructions

For the exam, you will do your work on this notebook, and submit it to me. Make sure to show your work. For this review, you do not need to submit anything to me, however. 

You may use any of the Mathematica commands we have used (or others you know about): you should use the software to work as efficiently as possible. You may also use your labs, and your own notes and/or files. Please do not use ChatGPT or the like, Google searches, etc. 

You can type answers in a text box, and that’s my preference. And of course your code will hopefully speak for itself. But if you have any difficulties, you’re free to also submit a handwritten paper copy of notes.

Questions

Let g(x)=sin(x).

What is the Taylor series centered at zero for g(x)?

Based on the sizes of all of the derivatives of sine, what is a simple value to choose for M in the Taylor series error estimate for this function? (|(g^((n+1)))(x)|≤M)

Using your simple bound M, what degree Taylor polynomial for g(x) will approximate it with error less than 0.01 for |x|<(π/2)? (Remember that we were able to use symmetry and periodicity to discover that we only need to approximate sine on the interval [0,(π/2)] to approximate it everywhere.)

Plot that Taylor polynomial and the sine function on the interval  [0,(π/2)]. Then plot the difference of the two on the same interval -- hopefully the difference is less than 0.01 in size everywhere on the interval!:)

What degree Taylor polynomial for g(x) will approximate it with error less than (10^(-8)) on the same interval? That’s a more realistically acceptable error....

Consider the alternating harmonic series: (((Underoverscript[Σ, (k=1), ∞])(-1))^(k+1))(1/k),

Plot the first 20 terms of the series.

Plot the first 20 partial sums.

Have Mathematica calculate the infinite series.

Plot the first partial sums with a red dashed line representing the actual value of the series, like this:

Cosine is given by an alternating series:  cos(x)=(((Underoverscript[Σ, (k=0), ∞])(-1))^k)((x^(2k))/((2k)!))

Use the alternating series error bound to determine N in the partial sum (((Underoverscript[Σ, (k=0), N])(-1))^k)((x^(2k))/((2k)!)) to approximate cos(1) with error less than 0.0001.

Compute that partial sum and compare it to Mathematica’s decimal value for cos(1). What is the actual error?