Taylor Polynomials Homework: Solving (a,b) w/ Error <1/100

In summary: 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 recommend using that method. It is going about it the hard way. The correct way is to use the Taylor series, truncate it, and then bound the error. That's how it's done.In summary, the conversation was about finding the polynomial approximation of cos(x) and its integral with a maximum error of 1/100. The polynomial Pn, with an order of 18, was found to approximate cos(x) with an error less than 1/
  • #1
mr.tea
102
12

Homework Statement


In the attached file. (a,b)

Homework Equations


[tex]\cos(x)=\sum_{k=0}^{n}\frac{(-1)^kx^{2k}}{(2k)!}[/tex]

Pn- Taylor expansion of order n

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
 

Attachments

  • Screenshot.png
    Screenshot.png
    7.9 KB · Views: 386
Physics news on Phys.org
  • #2
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
mr.tea said:

Homework Statement


In the attached file. (a,b)

Homework Equations


[tex]\cos(x)=\sum_{k=0}^{n}\frac{(-1)^kx^{2k}}{(2k)!}[/tex]

Pn- Taylor expansion of order n

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

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
Ray Vickson said:
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?

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.

RUber said:
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.

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

Thank you,
Thomas
 
  • #5
mr.tea said:
So if I understand correctly, the required polynomial is just the polynomial that approximate cos(x) up to the error?
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.
 
  • Like
Likes mr.tea
  • #6
mr.tea said:
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

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.
 
  • Like
Likes mr.tea
  • #7
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
geoffrey159 said:
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 ##

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
Ray Vickson said:
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.

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 ... ' :smile:
 
  • #10
geoffrey159 said:
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 ... ' :smile:

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.
 

FAQ: Taylor Polynomials Homework: Solving (a,b) w/ Error <1/100

What are Taylor polynomials?

Taylor polynomials are mathematical expressions used to approximate a function at a certain point by using the function's derivatives. They are often used in calculus to simplify complex functions and calculate values that are difficult to find using traditional methods.

What is the purpose of solving (a,b) with error <1/100?

The purpose of solving (a,b) with error <1/100 is to find a more accurate approximation of a function at a certain point. By setting a limit for the error, we can ensure that the calculated value is within a small range of the actual value, making it a more precise estimation.

How do you solve for (a,b) with error <1/100 using Taylor polynomials?

To solve for (a,b) with error <1/100 using Taylor polynomials, you need to first determine the desired degree of the polynomial, which will depend on the given function and the level of accuracy required. Then, you can use the Taylor polynomial formula to calculate the coefficients and plug them into the polynomial expression. Finally, you can evaluate the polynomial at the desired point and compare it to the actual value to determine the error.

What are some common applications of Taylor polynomials?

Taylor polynomials have many practical applications in various fields, including physics, engineering, and finance. They are used to approximate complex functions in mathematical models, calculate derivatives and integrals, and optimize solutions for real-world problems.

What are the limitations of using Taylor polynomials?

While Taylor polynomials can provide accurate approximations for a wide range of functions, they are limited by their degree of accuracy and the region of convergence. As the degree of the polynomial increases, so does the accuracy, but this can also result in a more complex expression. Additionally, Taylor polynomials may not converge for all values of x, so they may not be applicable in some cases.

Back
Top