SME
Calculus II · Problem type
sin x and cos x by Taylor polynomials
Use this for “Estimate cos 0.8 with a fourth-degree Maclaurin polynomial and bound the error.”
Chart
f(1) ≈ 0.8415
Dashed: the degree-5 Taylor polynomial of sin x about x = 0
At x = 1: P = 0.8417, f = 0.8415, error |f − P| = 0.0001957
This is an example. Type your own values to start a new problem.
f(
x
)
≈
P
(
x
)
=
Pₙ(x)
f
Function
example
f(x)
True value
worked out (not typed)
E
Actual error |f(x) − Pₙ(x)|
worked out (not typed)
B
Error bound (Lagrange)
worked out (not typed)
Formulas
Pₙ(
x
)
=
x
−
x
3
3!
+
x
5
5!
−
…
up
to
degree
n
0.8417
=
1
−
1
3
3!
+
1
5
5!
−
…
up
to
degree
5
f
(
x
)
=
sin
x
or
cos
x
,
as
f
picks
0.8415
=
sin
1
or
cos
1,
as
sin
x
picks
E
=
|
f
(
x
)
−
Pₙ(
x
)|
0.0001957 = |0.8415 − 0.8417|
B
=
|
x
m
|
÷
m!:
m
is
the
first
degree
past
n
that
f
has
a
term
in
0.0001984
=
|
1
m
|
÷
m!:
m
is
the
first
degree
past
5
that
sin
x
has
a
term
in
Assumptions
•
x is in radians. sin x = x − x³/3! + x⁵/5! − … and cos x = 1 − x²/2! + x⁴/4! − ….
•
The derivatives at 0, dₖ = f⁽ᵏ⁾(0), cycle through 0, 1, 0, −1 (sin) or 1, 0, −1, 0 (cos), so every other term is 0.
•
So Pₙ is also Pₘ₋₁, m the next degree with a term. Every derivative is at most 1 in size, so Lagrange gives an error of at most |x|ᵐ ÷ m!.
Step-by-step
WE KNOW
f: sin x, x = 1, n = 5
FIND
polynomial estimate (Taylor) (Pₙ(x)), true value (f(x)), actual error |f(x) − Pₙ(x)| (E), error bound (Lagrange) (B)
Step 1 · Find polynomial estimate (Taylor): Pₙ(x)
Use Pₙ(x) = x − x³ ÷ 3! + x⁵ ÷ 5! − … up to degree n
Keep the odd powers up to the degree, each xᵏ divided by k!, the signs taking turns from +.
sin
x
chosen:
sin
x
Pₙ(
x
)
=
x
−
x
3
3!
+
x
5
5!
Pₙ(
x
)
=
1
−
1
3
3!
+
1
5
5!
Pₙ(
x
)
=
1
−
0.1667
+
0.008333
Pₙ(
x
)
=
0.841667
Step 2 · Find true value (f(x))
Use f(x) = sin x or cos x, as f picks
The
true
value,
with
x
in
radians,
to
compare
with
the
estimate.
f
(
x
)
=
sin(
x
)
f
(
x
)
=
sin(1)
f
(
x
)
=
0.841471
Step 3 · Find actual error |f(x) − Pₙ(x)| (E)
Use E = |f(x) − Pₙ(x)|
How far the estimate really is from the true value: the terms left out.
E
=
|0.841471
−
0.841667|
E
=
|−0.000196|
E
=
0.0001957
Step 4 · Find error bound (Lagrange): B
Use B = |xᵐ| ÷ m!: m is the first degree past n that f has a term in
The
next
term
with
a
nonzero
coefficient
has
degree
m
=
7,
so
Pₙ
=
Pₘ₋₁.
Lagrange
with
every
derivative
at
most
1:
the
error
is
at
most
|
x
|ᵐ
divided
by
m!.
B
=
|
x
|⁷
÷
5,040
B
=
|1|⁷
÷
5,040
B
=
1
7
5,040
B
=
1
5,040
B
=
0.0001984
Check
Put the numbers back in. Both sides should match.
0.8417
=
1
−
1
3
3!
+
1
5
5!
✓
0.8415 = sin(1) ✓
0.0001957 = |0.841471 − 0.841667| ✓
0.0001984 = |1|⁷ ÷ 5,040 ✓
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.
Related lessons
Taylor and power series
Main lesson
A Taylor polynomial from given derivatives
Use this for “g(2) = 5, g′(2) = 3, g″(2) = −2 and g‴(2) = 12. Use P₃ about x = 2 to estimate g(1.9).”
Radius and interval of convergence
Use this for “Find the interval of convergence of Σ (x − 1)ⁿ ÷ (4ⁿ√n)” (√n is n0.5).
Integrating a series term by term
Use this for “Estimate ∫ from 0 to 0.6 of e−x² dx with three terms of a series, to within how much?”