Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: taylor polynomial evaluation
Date: Sat, 15 Nov 2008 03:02:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 13
Message-ID: <gfle3a$30v$1@fred.mathworks.com>
References: <gfl7ue$un$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1226718122 3103 172.30.248.37 (15 Nov 2008 03:02:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 15 Nov 2008 03:02:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:500941


"rose lans" <byrusel42@yahoo.com> wrote in message <gfl7ue$un$1@fred.mathworks.com>...
> Hi, I am trying to evaluate log(x) by using  taylor polynomial with degree that will 
> ..... SNIP .....
> Rose

  In the range from x = 1 to x = 1.5 the terms in your series reverse sign at each term and each one is smaller in magnitude than the previous one.  Therefore the next unused term gives you an upper bound for the total error incurred.  For x = 1.5 the 10-th term would be about 1/10^4, representing overall accuracy better than the fourth decimal place.

  On the other hand x = 0.5 yields a series of terms all of the same negative sign.  This means the error made is the sum of a number of negative quantities beyond the end of the polynomial which combine their magnitudes, and that would explain the larger error that you are apparently experiencing.

  You will find that the Taylor expansion does not in general provide the best approximating polynomials for analytic functions for given intervals.  There exist much better polynomials than that, but it requires some optimization work to find them.  Short of that, you will have to use far more than nine polynomial terms to get good accuracy as far out from x = 1 as x = 0.5.

Roger Stafford