Skip to content

Creating PS 5 on Taylor's Theorem #497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
361 changes: 361 additions & 0 deletions source/calculus/source/09-PS/05.ptx
Original file line number Diff line number Diff line change
@@ -0,0 +1,361 @@
<?xml version='1.0' encoding='utf-8'?>

<section xml:id="PS5" xmlns:xi="http://www.w3.org/2001/XInclude" tbil-slides="build">
<title>Taylor's Theorem (PS5)</title>
<objectives>
<ul>
<li>
<xi:include href="outcomes/05.ptx"/>
</li>
</ul>
</objectives>
<subsection>
<title>Activities</title>

<activity>
<introduction>
<p>
Recall that we can use a Taylor series for a function
to approximate that function by using an <m>k</m>th degree Taylor
polynomial.
</p>
</introduction>
<task>
<statement>
<p>
Which of the following is the 3rd degree Taylor polynomial for <m>f(x)=\sin x</m>
centered at 0.
</p>
<ol marker="A.">
<li><m>1-\dfrac{x^2}{2}</m></li>
<li><m>x-\dfrac{x^3}{3!}</m></li>
<li><m>x+\dfrac{x^3}{3!}</m></li>
<li><m>x-\dfrac{x^3}{3!}+\dfrac{x^5}{5!}-\dfrac{x^7}{7!}</m></li>
</ol>
</statement>
</task>

<task>
<statement>
<p>
Use the 3rd degree Taylor polynomial for <m>f(x)=\sin x</m>
to approximate <m>\sin(1)</m>.
</p>
</statement>
</task>

<task>
<statement>
<p>
Use technology to approximate <m>\sin(1)</m>.
</p>
</statement>
</task>
</activity>

<definition xml:id="taylor-remainder">
<statement>
<p>
Given a infinitely differentiable function <me>f(x)=\displaystyle\sum_{n=0}^\infty \dfrac{f^{(n)}(c)}{n!}(x-c)^n</me>, we define
the <term> remainder</term>, denoted <m>R_k(x)</m>, to be the difference between the function <m>f(x)</m>
and its <m>k</m>th degree Taylor polynomial <m>T_k(x)</m>. That is,
<me>
R_k(x)=f(x)-T_k(x).
</me>
</p>
<p>
The <term>error</term> in the approximation <m>f(x)\approx T_k(x)</m> is given by <m>|R_k(x)|</m>.
</p>
</statement>
</definition>

<activity>
<introduction>
<p>
We saw in <xref ref="fact-maclaurin-series-common"/>, the Maclaurin series for
<m>f(x)=e^x</m> is
<me>
e^x=\displaystyle\sum_{n=0}^\infty \dfrac{1}{n!}x^n.
</me>

</p>
</introduction>
<task>
<statement>
<p>
Compute <m>R_2(4)</m> using technology.
</p>
</statement>
</task>
<task>
<statement>
<p>
Compute <m>R_3(4)</m> using technology.
</p>
</statement>
</task>
<task>
<statement>
<p>
What do you expect from <m>R_4(4)</m>?
</p>
<ol marker="A.">
<li>
<p>
There is not enough information.
</p>
</li>
<li>
<p>
It will be greater than both <m>R_2(4)</m> and <m>R_3(4)</m>.
</p>
</li>
<li>
<p>
It will be between <m>R_2(4)</m> and <m>R_3(4)</m>.
</p>
</li>
<li>
<p>
It will be less than both <m>R_2(4)</m> and <m>R_3(4)</m>.
</p>
</li>
</ol>
</statement>
</task>
</activity>

<fact xml:id="fact-remainder-goes-to-zero">
<statement>
<p>
Let <m>f(x)</m> be a function represented by a power series centered at <m>x=c</m>
<me>
f(x)=\displaystyle\sum_{n=0}^\infty a_n(x-c)^n
</me>
with an interval of convergence <m>I</m>. Then for all <m>x</m> in <m>I</m>,
<me>
\lim_{k\rightarrow\infty} R_k(x)=0.
</me>

</p>
</statement>
</fact>

<theorem xml:id="thm-taylors-theorem">
<title>Taylor's Theorem</title>

<statement>
<p>
Let <m>f(x)</m> be an <m>(k+1)</m> times differentiable function on an interval <m>I</m> of <m>c</m>, and let <m>T_k(x)</m>
be its <m>k</m>th degree Taylor polynomial centered at <m>x=c</m>. Then for any <m>x</m> in the interval <m>I</m>,
there exists <m>p</m> between <m>c</m> and <m>x</m> such that
<me>
R_k(x)=\dfrac{f^{(k+1)}(p)}{(k+1)!}(x-c)^{k+1}.
</me>
If there exists <m>M_k</m> such that <m>|f^{(k+1)}(x)|\leq M_k</m> for all <m>x</m> in <m>I</m>, then the error in
the approximation <m>f(x)\approx T_k(x)</m> has an upper bound:
<me>
|R_k(x)|\leq \dfrac{M_k}{(k+1)!}|x-c|^{k+1}.
</me>

</p>
</statement>
</theorem>

<remark>
<title>Using Taylor's Theorem</title>
<p>
The trickiest part to using Taylor's Theorem is calculating <m>M_k</m> to get a bound for the error
<m>|R_k(x)|</m> for the approximation <m>f(x)\approx T_k(x)</m>.
</p>
</remark>

<activity>
<introduction>
<p>
Consider the function <m>f(x)=1/x</m> defined on the interval <m>I=[1,2]</m>.
</p>
</introduction>
<task>
<statement>
<p>
Calculate the derivatives <m>f'(x)</m>, <m>f''(x)</m>, <m>f'''(x)</m>, and <m>f^{(4)}(x)</m>.
</p>
<answer>
<p>
<m>f'(x)=-1/x^2</m>, <m>f''(x)=2/x^3</m>, <m>f'''(x)=-6/x^4</m>, <m>f^{(4)}(x)=24/x^5</m>
</p>
</answer>
</statement>
</task>
<task>
<statement>
<p>
Which of the following can we say above the values of <m>|f^{(k)}(x)|</m> on <m>I</m> for <m>k=1,2,3,4</m>?
</p>
<ol marker="A.">
<li>
<p>
<m>|f'(x)|</m> and <m>|f'''(x)|</m> are increasing, while <m>|f''(x)|</m> and <m>|f^{(4)}(x)|</m> are decreasing.
</p>
</li>
<li>
<p>
All are decreasing.
</p>
</li>
<li>
<p>
All are increasing.
</p>
</li>
<li>
<p>
<m>|f'(x)|</m> and <m>|f'''(x)|</m> are decreasing, while <m>|f''(x)|</m> and <m>|f^{(4)}(x)|</m> are decreasing.
</p>
</li>
</ol>
<answer>
<p>
B.
</p>
</answer>
</statement>
</task>

<task>
<statement>
<p>
Calculate <m>M_k</m> for each <m>k=1,2,3,4</m> using your results from part (b).
</p>
<answer>
<p>
<m>M_1=1, M_2=2, M_3=6, M_4=24</m>
</p>
</answer>
</statement>
</task>

<task>
<statement>
<p>
Use Taylor's Theorem to calculate <m>|R_k(1.5)|</m> for each <m>k=1,2,3,4</m>
to 3 decimal places. Use <m>a=1</m> as the center of the approximation.
</p>
<answer>
<p>
<m>0.125, 0.042, 0.016, 0.006</m>
</p>
</answer>
</statement>
</task>

<task>
<statement>
<p>
Are the errors decreasing? Explain why or why not.
</p>
</statement>
</task>
</activity>

<!-- Would like a flexible extension here for calculating M maybe. -->

<activity>
<introduction>
<p>
Let <m>f(x)=e^x</m>. Your goal is to approximate <m>f(1)=e</m>.
</p>
</introduction>
<task>
<statement>
<p>
Explain and demonstrate how to determine the upper bound <m>M_k</m> from Taylor's
Theorem for <m>f(x)=e^x</m>.
</p>
</statement>
</task>
<task>
<statement>
<p>
Use your value for <m>M_k</m> in part (a) to find an upper bound for the error
<m>|R_4(1)|</m>.
</p>
</statement>
</task>
<task>
<statement>
<p>
Use your value for <m>M_k</m> in part (a) to find an upper bound for the error
<m>|R_8(1)|</m>.
</p>
</statement>
</task>
</activity>

<!-- <activity> This one is a bit hard since the derivatives blow up and are not nice.
<introduction>
<p>
In <xref ref="activity-PS3arctan"/>, you found the Maclaurin series
for <m>\arctan(x)</m>:
<me>
\arctan(x)=\displaystyle\sum_{n=0}^\infty (-1)^n\dfrac{x^{2n+1}}{2n+1}
</me>
along with its interval of convergence <m>-1 \leq x\leq 1</m>.
</p>
</introduction>
</activity> -->

<!-- I want an activity that has more work for M without being ridiculous, I'm thinking ln(x+1) with derivs
given -->

</subsection>

<subsection>
<title>Sample Problem</title>
<introduction>
<p>
Here you are tasked with approximating the value of <m>\cos(1)</m>.
</p>
</introduction>
<task>
<statement>
<p>
Calculate the 4th degree Taylor polynomial for <m>f(x)=\cos x</m> centered at <m>\pi</m>,
then use it to approximate the value of <m>\cos(1)</m> to three decimal places.
</p>
</statement>
</task>

<task>
<statement>
<p>
Apply Taylor's Theorem to find an upper bound for the error in this approximation.
</p>
</statement>
</task>

<task>
<statement>
<p>
Use technology to calculate <m>|R_4(1)|</m>. Is the error within the upper bound found
in part (b)?
</p>
</statement>
</task>

<task>
<statement>
<p>
Explain whether the approximation error <m>|R_{k}(1)|</m> increases or decreases as
<m>k\rightarrow\infty</m>.
</p>
</statement>
</task>


</subsection>



</section>
1 change: 1 addition & 0 deletions source/calculus/source/09-PS/main.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
<xi:include href="./02.ptx"/>
<xi:include href="./03.ptx"/>
<xi:include href="./04.ptx"/>
<xi:include href="./05.ptx"/>

</chapter>
4 changes: 4 additions & 0 deletions source/calculus/source/09-PS/outcomes/05.ptx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version='1.0' encoding='UTF-8'?>
<p>
Determine an upper bound for the error in an approximation of a function via a Taylor polynomial.
</p>
3 changes: 3 additions & 0 deletions source/calculus/source/09-PS/outcomes/main.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ By the end of this chapter, you should be able to...
<li>
<xi:include href="./04.ptx"/>
</li>
<li>
<xi:include href="./05.ptx"/>
</li>

</ol>
</objectives>
Loading