Taylor series and Lagrange Remainde..very confused

NYC

New member
Joined
Oct 20, 2005
Messages
30
Hi, I've been asked to find the third degree Taylor polynomial for cos (x) at a=pi/4, and to then find the Lagrange form of the remainder. I've written out the derivatives of cos (x), evaluating each of them for pi/4. The values are -1/sqrt 2, -1/sqrt 2, 1/sqrt 2, 1/ sqrt 2, -1/sqrt 2 .....and the pattern goes on. I'm stumped as to how to rewrite this relationship, and I'm not sure if I can. I'd have to generate two negatives, two positives, and continue. I would really appreciate any help as to how to do this problem.
Also, in terms of the Lagrange remainder, I could also use an explanation of error approximation, because I am not sure of how to use a Lagrange remainder. For example, if I can generate the Taylor series for cos (x) centered at pi/4, then use the third degree Taylor polynomial to approximate 47 degrees, or 47pi/180 radians, would I need to use 46pi/180 radians to evaluate the Lagrange remainder (since the value used is to be between x and a)? Any help would be greatly appreciated.
 
Ah Nevermind

This question turned out to be much simpler than expected; I think I figured it out, so please disregard the previous post. Thanks.
 
The Taylor series for cos(x) about \(\displaystyle \frac{\pi}{4}\) is:

\(\displaystyle \L\\cos(\frac{{\pi}}{4})-sin(\frac{{\pi}}{4})(x-\frac{{\pi}}{4})-\frac{cos(\frac{{\pi}}{4})}{2!}(x-\frac{{\pi}}{4})^{2}+\frac{sin(\frac{{\pi}}{4})}{3!}(x-\frac{{\pi}}{4})^{3}+........\)

\(\displaystyle \L\\=\frac{1}{\sqrt{2}}-\frac{1}{\sqrt{2}}(x-\frac{{\pi}}{4})-\frac{\sqrt{2}}{4}(x-\frac{{\pi}}{4})^{2}+\frac{\sqrt{2}}{12}(x-\frac{{\pi}}{4})^{3}+.........\)

This series will converge to cos(x) if \(\displaystyle R_{n}(x)\) approaches 0 as n approaches 0.

Since \(\displaystyle f^{n+1}(x)\) is either \(\displaystyle \pm\sin(x)\) or \(\displaystyle \pm\cos(x)\), then \(\displaystyle R_{n}(x)\) approaches 0 as n approaches infinity for all x.

So, we have the limit:

\(\displaystyle \L\\\lim_{n\to\infty}\frac{|x-a|}{(n+1)!}=0\), so \(\displaystyle R_{n}(x)\) approaches 0 for all x.

What Taylor does is give us a polynomial that approximates f(x) for all x very near a. The closer x is to a, the better the approximation.

If x=a, in your case (pi/4), then you arrive at \(\displaystyle \frac{1}{\sqrt{2}\)

which equals \(\displaystyle cos(\frac{\pi}{4})\)

Let x equal, say, \(\displaystyle \frac{23\pi}{90}\)(46 degrees).

\(\displaystyle \L\\cos(\frac{\pi}{4})-sin(\frac{\pi}{4})(\frac{\pi}{180})-\frac{cos({\frac{\pi}{4}})}{2!}(\frac{\pi}{180})^{2}+\frac{sin(\frac{\pi}{4})}{3!}(\frac{\pi}{180})^{3}+......\)

If you perform the computations you get .694658367735.

The further you go with the series, the better it'll become.

\(\displaystyle \frac{1}{\sqrt{2}}=.707106781187\)

Subtracting, we find the error is .012448413452.

Try x=\(\displaystyle \frac{451{\pi}}{1800}\)(45.1 degrees) and you'll see it gets even better.

I hope this helps.

Edit: Alas, I reckon this was all in vain then :cry:
Oh well, as along as you get it.
 
Thanks!

Hm, that puts it in better perspective, thank you very much galactus, I do however have one more question which I'll post in the main forum. I do appreciate your having taken the time to do this one, although I came up with different answers. While I agree with you on the Taylor series of cos (x) centered at pi/4, using the first four terms generated an answer for cos (47pi/180) of .6819983166. To determine the error, I used the next term in the series: (x-pi/4)^4 all over sqrt 2 times 4 factorial. This gave an error estimate of 4.374 times 10 to the minus 8. Please let me know if I've made a mistake. Again, thank you.
 
Ack

My apologies, I misread your explanation. You evaluted 23pi/90, which I did not pick up on.
 
Yes, I arrived at the same thing you did for \(\displaystyle \frac{47{\pi}}{180}\)

I was just trying to explain the concept. I hope it wasn't befuddling.

I was trying to show how it gets better as a and x get close to one another.

You are correct as far as I can tell.

The Remainder is given by:

\(\displaystyle \L\\R_{n}(x)=\frac{f^{n+1}}{(n+1)!}(x-a)^{n+1}\)

=\(\displaystyle \L\\\frac{cos(\frac{\pi}{4})}{4!}(\frac{\pi}{90})^{4}=\frac{{\pi}^{4}\sqrt{2}}{3149280000}=4.37424610193\cdot{10^{-8}}\)
 
Top