Value of f(1/2) using estimation for the remainder

Click For Summary

Discussion Overview

The discussion revolves around estimating the value of the function \( f(x) = e^{-x} \sin(x) \) at \( x = \frac{1}{2} \) using Taylor series expansion. Participants explore the calculation of the Taylor polynomial of order 4 at 0 and how to use it to estimate \( f\left(\frac{1}{2}\right) \) with a specified error bound.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Homework-related
  • Conceptual clarification

Main Points Raised

  • Some participants calculate the Taylor polynomial of order 4 for \( f(x) \) at 0, yielding \( T_{0,4}(x) = x - x^2 + \frac{x^3}{3} \).
  • There is a discussion about how to estimate the remainder \( R_n\left(\frac{1}{2}\right) \) and whether it is necessary to check multiple orders until the error is less than \( \frac{1}{400} \).
  • Some participants suggest that the estimation of the remainder can be approximated by subsequent terms of the Taylor series.
  • There is uncertainty about whether the Taylor polynomial calculated at 0 can be used to estimate \( f\left(\frac{1}{2}\right) \) and how the remainder behaves at different points.
  • Participants discuss the relationship between the Taylor series centered at 0 and its convergence at points away from 0, questioning the independence of the point of expansion from the point of evaluation.

Areas of Agreement / Disagreement

Participants generally agree that the Taylor polynomial can be used for estimation, but there is no consensus on the necessity of additional terms for the approximation or the independence of the expansion point from the evaluation point.

Contextual Notes

Participants note that the remainder \( R_n(x) \) can be approximated using derivatives at 0, but the exact behavior of the remainder and its dependence on the choice of \( x \) remains a point of discussion.

mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :giggle:

Let $f(x)=e^{-x}\sin (x)$, $x\in \mathbb{R}$.

a) Calculate the Taylor polynomial of order $4$ at $0$.

b) Calculate the value of $f \left (\frac{1}{2}\right )$ using estimation for the remainder with an error not more than $\frac{1}{400}$.I have done question a) :
\begin{align*}T_{0,4}(x)&=\sum_{k=0}^4\frac{f^{(k)}(0)(x-0)^k}{k!}=\frac{f^{(0)}(0)x^0}{0!}+\frac{f^{(1)}(0)x^1}{1!}+\frac{f^{(2)}(0)x^2}{2!}+\frac{f^{(3)}(0)x^3}{3!}+\frac{f^{(4)}(0)x^4}{4!} \\ & =\frac{0\cdot x^0}{0!}+\frac{1\cdot x^1}{1!}+\frac{(-2)\cdot x^2}{2!}+\frac{2\cdot x^3}{3!}+\frac{0\cdot x^4}{4!}=x+\frac{(-2)\cdot x^2}{2}+\frac{2\cdot x^3}{6}\\ & =x- x^2+\frac{ x^3}{3}\end{align*} As for question b) :

Do we have to check for which order the error is less or equal to $\frac{1}{400}$ ?
After having found the order we have that $\left |R_n \left (\frac{1}{2}\right )\right |\leq \frac{1}{400}$ and that $R_n\left (\frac{1}{2}\right )=f\left (\frac{1}{2}\right )-T_n\left (\frac{1}{2}\right )$ and from that inequality we get value of $f \left (\frac{1}{2}\right )$ ?

Or could we use part a) ? But there we have the point $0$ and now the point $\frac{1}{2}$

:unsure:
 
Physics news on Phys.org
Hey mathmari!

The estimation of the remainder is each subsequent term.
If we approximate $f(\frac 12)$ with $f(x)\approx x$ then the estimation of the remainder is $R_1(x)\approx|-x^2|=|-(\frac 12)^2|=\frac 14$.
That is not small enough so we need at least one more term. 🤔
 
Klaas van Aarsen said:
The estimation of the remainder is each subsequent term.
If we approximate $f(\frac 12)$ with $f(x)\approx x$ then the estimation of the remainder is $R_1(x)\approx|-x^2|=|-(\frac 12)^2|=\frac 14$.
That is not small enough so we need at least one more term. 🤔

So do we have to calculate $R_1\left (\frac{1}{2}\right )$, $R_2\left (\frac{1}{2}\right )$, $R_3\left (\frac{1}{2}\right )$, ... till it is smaller or equal to $\frac{1}{400}$ ? :unsure:
 
I think so yes. (Nod)
 
Klaas van Aarsen said:
I think so yes. (Nod)

So question b) is independent from question a), isn't it? I mean we cannot use a) for b), right? :unsure:
 
We can use (a).
Each subsequent term in (a) is an approximation of the remainder. 🤔
 
Klaas van Aarsen said:
We can use (a).
Each subsequent term in (a) is an approximation of the remainder. 🤔

Does this hold although at (a) we had the point $0$ and at (b) we have the point $\frac{1}{2}$ ? :unsure:
 
mathmari said:
Does this hold although at (a) we had the point $0$ and at (b) we have the point $\frac{1}{2}$ ?
Yes.
Strictly speaking we have $R_n(x) = \frac{f^{(n+1)}(\xi)\,x^{n+1}}{(n+1)!}$ for some $\xi$ between $0$ and $x$.
We can approximate it with $R_n(x) \approx \frac{f^{(n+1)}(0)\,x^{n+1}}{(n+1)!}$. 🤔
 
Last edited:
Klaas van Aarsen said:
Yes.
Strictly speaking we have $R_n(x) = \frac{f^{(n+1)}(\xi)\,x^{n+1}}{(n+1)!}$ for some $\xi$ between $0$ and $x$.
We can approximate it with $R_n(x) \approx \frac{f^{(n+1)}(0)\,x^{n+1}}{(n+1)!}$. 🤔

We have that $$R_1\left (\frac{1}{2}\right ) \approx \frac{f^{(1+1)}(0)\,\left (\frac{1}{2}\right )^{1+1}}{(1+1)!}=\frac{1}{4} \\ R_2\left (\frac{1}{2}\right ) \approx \frac{f^{(2+1)}(0)\,\left (\frac{1}{2}\right )^{2+1}}{(2+1)!} =\frac{1}{1536}<\frac{1}{400} $$

So we have that $
R_2\left (\frac{1}{2}\right )=f\left (\frac{1}{2}\right )-T_2\left (\frac{1}{2}\right )
$, right?

But is $T_2$ the polynomial we calculated at (a) or do we have to calculate the polynomial again around $\frac{1}{2}$ ?

:unsure:
 
  • #10
We had in (a) that $f(x)=x-x^2+\frac {x^3}3 +\ldots$.
It follows that $R_0(x)\approx x,\, R_1(x)\approx -x^2,\, R_2(x)\approx\frac {x^3}3$.
Since $|R_2(\frac 12)| <\frac{1}{400}$, we get that the corresponding approximation for $x=\frac 12$ is $f(x)\approx x-x^2$ with an error of less than $\frac 1{400}$.
Since we have already calculated the third term, we can throw that one in as well and make it $f(x)\approx x-x^2+\frac {x^3}3$, which will have an even smaller error. 🤔
 
  • #11
Klaas van Aarsen said:
We had in (a) that $f(x)=x-x^2+\frac {x^3}3 +\ldots$.
It follows that $R_0(x)\approx x,\, R_1(x)\approx -x^2,\, R_2(x)\approx\frac {x^3}3$.
Since $|R_2(\frac 12)| <\frac{1}{400}$, we get that the corresponding approximation for $x=\frac 12$ is $f(x)\approx x-x^2$ with an error of less than $\frac 1{400}$.
Since we have already calculated the third term, we can throw that one in as well and make it $f(x)\approx x-x^2+\frac {x^3}3$, which will have an even smaller error. 🤔

Why do we need also the third term? Isn't it enough that $f(x)\approx x-x^2$ ? :unsure:
 
  • #12
mathmari said:
Why do we need also the third term? Isn't it enough that $f(x)\approx x-x^2$ ?
Yes, that is enough. (Nod)
 
  • #13
Klaas van Aarsen said:
Yes, that is enough. (Nod)

So we get that $f\left (\frac{1}{2}\right )\approx \frac{1}{2}-\frac{1}{4}=\frac{1}{4}$, right?

But why can we use here the Taylor polynomial at point $0$ here with $x=\frac{1}{2}$ ? Or are the point around the one we calculate the polynomial and the value of $x$ independent?

:unsure:
 
  • #14
mathmari said:
But why can we use here the Taylor polynomial at point $0$ here with $x=\frac{1}{2}$ ? Or are the point around the one we calculate the polynomial and the value of $x$ independent

The reason to use of a Taylor expansion is usually, that one can approximate the value of function at point $x_0 + h$ based on information of the function at point $x_0$.

Reasoning is that if the remainder is small enough (as it's in this case), or in other words: if the taylor expansion will converge at point $x_0+h$, then one can evaluate the $f(x_0+h)$ using the expansion around the point $x_0$. In this example, the Taylor series of the function in question will converge regardless of the point where it is calculated, and for what value one wants to use the series. But this is not always true. For example for $\arctan x$ around $x_0=0$ one can't use the Taylor expansion to evaluate $\arctan 1.1$.
 
  • #15
mathmari said:
But why can we use here the Taylor polynomial at point $0$ here with $x=\frac{1}{2}$ ? Or are the point around the one we calculate the polynomial and the value of $x$ independent?
Yep.
What do you mean?
We use the Taylor polynomial approximation around 0 at a distance of $\frac 12$.
Some Taylor formulas write $f(a+h)=f(a)+f'(a)h+\ldots$. We then have $a=0$ and $h=x$. 🤔
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
Replies
11
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
21
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K