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

In summary, the conversation discusses the use of Taylor polynomials and estimation of the remainder to approximate the value of a function at a given point. It is determined that the third term of the Taylor polynomial at $0$ is needed to obtain an error less than $\frac{1}{400}$ when approximating the value of $f\left(\frac{1}{2}\right)$. The use of the Taylor expansion is also discussed and it is noted that it can be used to approximate values regardless of the point where it is calculated, but this is not always the case.
  • #1
mathmari
Gold Member
MHB
5,049
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
  • #2
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. 🤔
 
  • #3
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:
 
  • #4
I think so yes. (Nod)
 
  • #5
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:
 
  • #6
We can use (a).
Each subsequent term in (a) is an approximation of the remainder. 🤔
 
  • #7
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:
 
  • #8
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:
  • #9
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$. 🤔
 

1. What is the value of f(1/2)?

The value of f(1/2) is the output of the function f when the input is 1/2. This value can be calculated using estimation for the remainder.

2. How is estimation for the remainder used to calculate f(1/2)?

Estimation for the remainder is a method used to approximate the value of a function at a specific input when the function cannot be evaluated directly. It involves using known values of the function at nearby inputs to estimate the value at the desired input.

3. Why is f(1/2) important in scientific research?

In scientific research, f(1/2) is often used to represent a midpoint or average value. It can also be used to interpolate or extrapolate data, which can provide valuable insights and predictions.

4. Can f(1/2) be calculated exactly?

In some cases, the function f may be simple enough to be evaluated exactly at 1/2. However, in many cases, f(1/2) cannot be calculated exactly and must be approximated using estimation for the remainder.

5. How can I improve the accuracy of my estimation for f(1/2)?

To improve the accuracy of your estimation for f(1/2), you can use more data points or a more precise method of estimation. It is also important to consider the limitations of your data and the assumptions made in the estimation process.

Similar threads

  • Topology and Analysis
Replies
6
Views
1K
  • Topology and Analysis
Replies
2
Views
646
Replies
11
Views
905
  • Topology and Analysis
Replies
9
Views
1K
  • Topology and Analysis
Replies
4
Views
281
  • Topology and Analysis
Replies
16
Views
1K
Replies
21
Views
1K
  • Topology and Analysis
Replies
10
Views
2K
  • Topology and Analysis
Replies
2
Views
1K
  • Topology and Analysis
Replies
21
Views
1K
Back
Top