d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Taylors Theorem Subtracting Near Equal Numbers
Add Reply New Topic New Poll
Member
Posts: 38,211
Joined: Feb 16 2009
Gold: 7,823.69
Apr 10 2013 11:22pm
f(x) = e^x - sqrt(1+x) does evalutation of f(10^-20) lead to an accurate small relative error?

idk what is meant by this part the only relative error i know is | (xt-xa)/xt | and i cant use this


produce the degree 1 taylor polynomial p1 and remainder r1 of f (x)=e^x - sqrt(1+x) about a=0

i know what a taylor polynomial is and i have p1 but to find the remainder r1 would i just use f(10^-20) - p1(10^-20)?

use p1 to approximate f(10^-20)

~~~~got this

find an upper bound for r1 when x=10^-20

~~~can do this once i know what r1 is

what can you say about the relative error | (f(10^-20) - p1(10^-20))/f(10^-20)|

~~~got this


the questions are in bold and what i think/have is in italics id appreciate help or guidance
Member
Posts: 16,662
Joined: Nov 24 2007
Gold: 15,245.00
Trader: Trusted
Apr 11 2013 07:49am
http://en.wikipedia.org/wiki/Taylor%27s_theorem

Under some conditions that you can easily check true for f(x) = e^x - sqrt(1+x) :

f(x) = f(0) + (x-0)*f'(0) + R1(x)

where f(0) + (x-0)*f'(0) is your p1(x)

and R1(x) = Integral (0,x, f''(t)*(x-t).dt)

Once you know f''(t), you can have an upper bound for |R1(x)| :

|R1(x)| =< Integral (0,x, |f''(t)|*|x|.dt)

and a brutal majoration of |f''(t)| gives you a fairly good upper bound for R1(x).

Just to be sure, you already got p1(x) = x / 2 ... ?

For the relative error, consider the sign of all quantities to prove that f(x) > p1(x).

Now you can have an upper bound of the relative error :

|f(x) - p1(x)| / | f(x) | < | R1(x)| / | p1(x) |

and you should find :

|f(x) - p1(x)| / | f(x) | < x*e^x / 2
Member
Posts: 16,662
Joined: Nov 24 2007
Gold: 15,245.00
Trader: Trusted
Apr 11 2013 10:21am
Quote (feanur @ Apr 11 2013 02:49pm)
|f(x) - p1(x)| / | f(x) | < x*e^x / 2


:wacko:

Should be fixed here :

|f(x) - p1 | / |f(x)| < x * (2e^x + 1/2)

or with a more precise majoration :

|f(x) - p1 | / |f(x)| < x * (e^x + 1/4)

With x = 10^-20, the relative error is lower than ~ 2.5*10^-20 ( or ~ 1.25*10^-20 with the second majoration ).

This post was edited by feanur on Apr 11 2013 10:21am
Go Back To Homework Help Topic List
Add Reply New Topic New Poll