Results 1 to 14 of 14

Math Help - Maximum error Taylor Series

  1. #1
    Member
    Joined
    Jan 2010
    Posts
    144

    Question Maximum error Taylor Series

    To calculate a planet's space coordinates, we have to solve the function

    f(x) = x - 1 -0.5sinx

    Let the base point be a=xi=pi/2 on the interval [0, pi]. Determine the highest-order Taylor series expansion resulting in a maximum error of 0.015 on the specified interval. The error is equal to the absolute value of the difference between the given function and the specific Taylor series expansion. (Hint: Solve graphically)

    I have no clue how to solve this so I don't have much direction in my work, I've just been trying a few things and seeing what happens.

    Here's what I've got so far. (See figure attached)

    Can someone get me going in the right direction or show me how to do these types of questions?

    Thanks again!
    Attached Thumbnails Attached Thumbnails Maximum error Taylor Series-q4.18.jpg  
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Oct 2009
    Posts
    5,545
    Thanks
    780
    Since x - 1 can be calculated precisely, we need to approximate (\sin x)/2 on [0,\pi] up to 0.015. We have \sin x=S_n(x)+R_n(x) where S_n(x) is a partial sum of the Taylor series that goes up to (x-a)^n (here a=\pi/2) and R_n(x)=\sin(x)-S_n(x). Then (\sin x)/2=S_n(x)/2+R_n(x)/2, and we need to ensure that \sup_{x\in[0,\pi]}|R_n(x)/2|\le 0.015, i.e., \sup_{x\in[0,\pi]}|R_n(x)|\le0.03.

    The Lagrange form of the remainder is \displaystyle R_n(x) = \frac{f^{(n+1)}(\xi)}{(n+1)!} (x-a)^{n+1} where \xi is some point between a and x. Since |\sin^{(n)}x|\le 1 for all n and x, we have \displaystyle |R_n(x)|\le \frac{(\pi/2)^{n+1}}{(n+1)!}. According to my calculations, the least n such that \displaystyle\frac{(\pi/2)^{n+1}}{(n+1)!}\le0.03 is 5. However, since \sin^{(5)}(\pi/2)=0, it is enough to approximate \sin(x) by S_4(x), which has only three terms.

    I did this check: S_4(\pi)=0.019968958<0.03.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Jan 2010
    Posts
    144
    Quote Originally Posted by emakarov View Post
    Since x - 1 can be calculated precisely, we need to approximate (\sin x)/2 on [0,\pi] up to 0.015. We have \sin x=S_n(x)+R_n(x) where S_n(x) is a partial sum of the Taylor series that goes up to (x-a)^n (here a=\pi/2) and R_n(x)=\sin(x)-S_n(x). Then (\sin x)/2=S_n(x)/2+R_n(x)/2, and we need to ensure that \sup_{x\in[0,\pi]}|R_n(x)/2|\le 0.015, i.e., \sup_{x\in[0,\pi]}|R_n(x)|\le0.03.

    The Lagrange form of the remainder is \displaystyle R_n(x) = \frac{f^{(n+1)}(\xi)}{(n+1)!} (x-a)^{n+1} where \xi is some point between a and x. Since |\sin^{(n)}x|\le 1 for all n and x, we have \displaystyle |R_n(x)|\le \frac{(\pi/2)^{n+1}}{(n+1)!}. According to my calculations, the least n such that \displaystyle\frac{(\pi/2)^{n+1}}{(n+1)!}\le0.03 is 5. However, since \sin^{(5)}(\pi/2)=0, it is enough to approximate \sin(x) by S_4(x), which has only three terms.

    I did this check: S_4(\pi)=0.019968958<0.03.
    Everything makes sense until you start talking about the lagrange form of the remainder, that's where you lose me.

    the remainder is \displaystyle R_n(x) = \frac{f^{(n+1)}(\xi)}{(n+1)!} (x-a)^{n+1} where \xi is some point between a and x. Since |\sin^{(n)}x|\le 1 for all n and x, we have \displaystyle |R_n(x)|\le \frac{(\pi/2)^{n+1}}{(n+1)!}.
    Isn't the f^{(n+1)} representing the derivative? I don't see how we would get higher powers of sin in our Taylor Series if that's what your trying to say.

    How does this allow you to conclude,

    \displaystyle |R_n(x)|\le \frac{(\pi/2)^{n+1}}{(n+1)!}.

    Could you clarify some more? I'm still very confused.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Joined
    Oct 2009
    Posts
    5,545
    Thanks
    780
    I am not talking about powers of \sin x. By \sin^{(n)}x (as opposed to \sin^n x) I denoted the nth derivative of \sin x, which is either \pm\sin x or \pm\cos x; in both cases \lvert\sin^{(n)}x\rvert\le1.

    Since x\in[0,\pi], we have \lvert x-\pi/2\rvert\le\pi/2. Altogether, \displaystyle\left\lvert\frac{\sin^{(n+1)}\xi}{(n+  1)!}(x-\pi/2)^{n+1}\right\rvert\le\frac{(\pi/2)^{n+1}}{(n+1)!}.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Member
    Joined
    Jan 2010
    Posts
    144
    Thanks that greatly clarified things. One last question.

    How did you conclude the following?

    According to my calculations, the least n such that \displaystyle\frac{(\pi/2)^{n+1}}{(n+1)!}\le0.03 is 5.
    Thanks again!
    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor
    Joined
    Oct 2009
    Posts
    5,545
    Thanks
    780
    I used a calculator to find the values of this expression for n = 2, 3, 4, 5.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Member
    Joined
    Jan 2010
    Posts
    144
    Quote Originally Posted by emakarov View Post
    I used a calculator to find the values of this expression for n = 2, 3, 4, 5.
    Okay so our whole goal in this question was to ensure that the error is less than 0.015.

    They give the error as,

    \text{error }= | \text{Actual Function} - \text{Taylor series expansion of function}|

    Did we use this at all?

    I'm just confused as to what we're dealing with the remainder for.

    How does the remainder term relate to the error?
    Follow Math Help Forum on Facebook and Google+

  8. #8
    MHF Contributor
    Joined
    Oct 2009
    Posts
    5,545
    Thanks
    780
    Quote Originally Posted by emakarov View Post
    We have \sin x=S_n(x)+R_n(x) where S_n(x) is a partial sum of the Taylor series that goes up to (x-a)^n (here a=\pi/2) and R_n(x)=\sin(x)-S_n(x).
    We determined that n = 5. So we throw R_5(x) away and approximate f(x)=x-1-(S_5(x)+R_5(x))/2 by g(x)=x-1-S_5(x)/2. You should be able to find an upper bound on \lvert f(x)-g(x)\rvert knowing the upper bound on R_5(x) on the segment in question.
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Member
    Joined
    Jan 2010
    Posts
    144
    Quote Originally Posted by emakarov View Post
    We determined that n = 5. So we throw R_5(x) away and approximate f(x)=x-1-(S_5(x)+R_5(x))/2 by g(x)=x-1-S_5(x)/2. You should be able to find an upper bound on \lvert f(x)-g(x)\rvert knowing the upper bound on R_5(x) on the segment in question.
    What do you mean by upper bound?
    Follow Math Help Forum on Facebook and Google+

  10. #10
    MHF Contributor
    Joined
    Oct 2009
    Posts
    5,545
    Thanks
    780
    Quote Originally Posted by jegues View Post
    What do you mean by upper bound?
    See Upper bound in Wikipedia, especially the Examples section.

    I also have a question for you.
    \text{error }= | \text{Actual Function} - \text{Taylor series expansion of function}|
    Is error a number or a function? Because if you subtract the Taylor series from f(x), both of which are functions, you get a function, which returns a potentially different result for each x\in[0,\pi]. So how exactly fo you define error?
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Member
    Joined
    Jan 2010
    Posts
    144
    Quote Originally Posted by emakarov View Post
    See Upper bound in Wikipedia, especially the Examples section.

    I also have a question for you.Is error a number or a function? Because if you subtract the Taylor series from f(x), both of which are functions, you get a function, which returns a potentially different result for each x\in[0,\pi]. So how exactly fo you define error?
    I'm not sure to be honest.

    Even if it was a function, as long as the maximum error produced was 0,015 everything should still hold correct?
    Follow Math Help Forum on Facebook and Google+

  12. #12
    MHF Contributor
    Joined
    Oct 2009
    Posts
    5,545
    Thanks
    780
    The error is \sup\limits_{x\in[0,\pi]}\lvert f(x)-g(x)\rvert, i.e., the supremum of the set \{\lvert f(x)-g(x)\rvert:x\in[0,\pi]\}. (To remind, f(x)=x-1-(S_5(x)+R_5(x))/2 and g(x)=x-1-S_5(x)/2.) The supremum is the least upper bound. It is one of the very first concepts in calculus and comes before limits, derivatives and Taylor series. In this case, the supremum is also the maximum \max\limits_{x\in[0,\pi]}\lvert f(x)-g(x)\rvert. However, the maximum would not exist if we considered an open interval (0,\pi) instead of [0,\pi]. In contrast, the least upper bound always exists as long as there is some upper bound.

    Quote Originally Posted by emakarov
    You should be able to find an upper bound on \lvert f(x)-g(x)\rvert knowing the upper bound on R_5(x) on the segment in question.
    By this I meant that you can limit \lvert f(x)-g(x)\rvert from above, i.e., find a number greater than \lvert f(x)-g(x)\rvert for all x\in[0,\pi]. That would be some upper bound; the error, being the least upper bound, will not exceed that number.
    Follow Math Help Forum on Facebook and Google+

  13. #13
    Super Member
    Joined
    Mar 2008
    Posts
    934
    Thanks
    33
    Awards
    1
    Guys,

    Pardon me for interjecting, but the hint in the problem statement ("Hint: solve graphically") seems to indicate that what is wanted is for the student to graph f(x) - g(x) for successively better approximations g(x) until one is found which is less than 0.015 in absolute value in the range 0 to pi. Easy enough if you have a graphing calculator.
    Follow Math Help Forum on Facebook and Google+

  14. #14
    MHF Contributor
    Joined
    Oct 2009
    Posts
    5,545
    Thanks
    780
    Good point. See the graphs of f(x), g(x) as well as of f(x) - g(x) in WolframAlpha.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. [SOLVED] Taylor Series Error Estimation
    Posted in the Calculus Forum
    Replies: 2
    Last Post: November 13th 2011, 04:44 PM
  2. Taylor series approximation and error
    Posted in the Trigonometry Forum
    Replies: 1
    Last Post: February 13th 2011, 09:13 AM
  3. taylor series and error
    Posted in the Calculus Forum
    Replies: 0
    Last Post: March 16th 2009, 04:06 PM
  4. Taylor series and error approximations
    Posted in the Pre-Calculus Forum
    Replies: 2
    Last Post: February 18th 2009, 07:21 AM
  5. error factor of Taylor Series
    Posted in the Calculus Forum
    Replies: 2
    Last Post: April 12th 2008, 10:02 AM

Search Tags


/mathhelpforum @mathhelpforum