Homework Help: Taylor polynomials

1. Dec 3, 2015

mr.tea

1. The problem statement, all variables and given/known data
In the attached file. (a,b)

2. Relevant equations
$$\cos(x)=\sum_{k=0}^{n}\frac{(-1)^kx^{2k}}{(2k)!}$$

Pn- Taylor expansion of order n

3. The attempt at a solution
I know that in this case, in order to get an error less than 1/100, I need 18 terms/order 18(according to Wolfram Alpha). But does it mean that if I take the integral of cos(x) so I can take the integral of Pn and solve part (a)?

I am not really sure regarding part (b). Am I supposed to compute the integral of Pn that I (hopefully) found in part (a) and express it in sigma notation?

Thank you,
Thomas

File size:
10.1 KB
Views:
86
2. Dec 3, 2015

RUber

For part a, it is only asking for the polynomial. Part b is asking you to integrate the polynomial (leaving it in sum form).
You can take the integral for the polynomial and evaluate it at your endpoints to get your integral value.
I get error under 1/100 with k = 9, i.e. order 18 polynomial as you pointed out.

3. Dec 3, 2015

Ray Vickson

Do NOT write $\cos(x) = \sum_{k=0}^n (-1)^k x^{2k}/(2k)!,$ because that is not true. You need to replace the "$=$' sign by an approximation sign such as "$\approx$" or "$\doteq$".

When I do it I need fewer than 10 terms---nowhere near the 18 that you claim.

As to your question: what do YOU think?

4. Dec 3, 2015

mr.tea

Well, it is 18 terms if you count the zeros. but it is 10 terms if you don't count them, but still, order 18.

Regarding the sign, I know that in order to have an equal sign, I need to add the error I make. But for some reason decided not to change the equal sign... I don't know why.

So if I understand correctly, the required polynomial is just the polynomial that approximate cos(x) up to the error?

Thank you,
Thomas

5. Dec 3, 2015

RUber

Yes. Part a says find P(x). Part b says find $\int_0^6 P(x) dx$ leaving it in sum form and check your error.

6. Dec 3, 2015

Ray Vickson

The series for $\cos(x)$ has infinitely many terms; when you integrate it, you obtain a new infinite series. When you truncate the $\cos$ series at terms of order $x^{2n}$ you have some error $e_n(x)$. The error in $\int \cos(x) \, dx$ is the integral of the error in $\cos(x)$. You want to choose $n$ so that the error in the integrated series is provably < 0.01. This is difficult to determine exactly, so you need to be satisfied with having an upper bound on the error < 0.01 for sure. Finding that is a lot easier.

7. Dec 3, 2015

geoffrey159

Due to the regularity of $\cos (x)$ on the interval $[0,6]$, you have :

$\forall x\in [0,6],\ \forall n\in\mathbb{N}: \ \cos(x) = \sum_{k = 0}^n \frac{ \cos^{(k)}(0) }{k!} x^k + \int_0^x \frac{(x-t)^n}{n!} \cos^{(n+1)}(t) \ dt$

So your job is to determine the smallest $n$ such that:

$|\int_0^6 \int_0^x \frac{(x-t)^n}{n!} \cos^{(n+1)}(t) \ dt dx | \le 0.01$

8. Dec 3, 2015

Ray Vickson

In a perfrect world, yes, that would be his problem. But in the real world there is a much simpler way, but which might give him a value of $n$ just a little bit too large.

9. Dec 3, 2015

geoffrey159

You could say the same thing using a sentence like ' I agree, but I think a computer program is more appropriate for this problem, as there is no specific restriction on the precision, etc ... '

10. Dec 3, 2015

Ray Vickson

But I had already said essentially the same thing myself in post #6 (without giving a formula for the error) and then dismissed the method as impractical. So, no, I could not have used a sentence similar to what you suggest, because I most definitely do not agree.