Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!o8g2000yqo.googlegroups.com!not-for-mail From: TideMan <mulgor@gmail.com> Newsgroups: comp.soft-sys.matlab Subject: Re: Problem Date: Thu, 6 May 2010 01:24:21 -0700 (PDT) Organization: http://groups.google.com Lines: 33 Message-ID: <c29d4c47-5dad-44ea-879c-f3e5c682148d@o8g2000yqo.googlegroups.com> References: <hrqe77$jcs$1@fred.mathworks.com> <1317322228.78895.1273096933766.JavaMail.root@gallium.mathforum.org> <hrt7e0$drs$1@fred.mathworks.com> <hrttqi$ftj$1@fred.mathworks.com> NNTP-Posting-Host: 202.78.152.105 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1273134261 30678 127.0.0.1 (6 May 2010 08:24:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 6 May 2010 08:24:21 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o8g2000yqo.googlegroups.com; posting-host=202.78.152.105; posting-account=qPexFwkAAABOl8VUndE6Jm-9Z5z_fSpR User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3,gzip(gfe) Xref: news.mathworks.com comp.soft-sys.matlab:633056 On May 6, 8:15 pm, "Roger Stafford" <ellieandrogerxy...@mindspring.com.invalid> wrote: > "Roger Stafford" <ellieandrogerxy...@mindspring.com.invalid> wrote in message <hrt7e0$dr...@fred.mathworks.com>... > > Prepare yourself for a long-winded explanation. ....... > > - - - - - - - - - > Please add this onto the previous discussion I gave. > > If y = f(x) is some continuous function with its first three derivatives also continuous over the interval xa < xb < xc, then by an extension of the famous Rolle's theorem of elementary calculus, there is a value xi (Greek letter) such that the difference between the expression above for an approximation of the derivative at xb and the actual derivative, f'(xb) is equal to > > 1/6*f'''(xi)*(xc-xb)*(xb-xa) > > where xi lies in xa < xi < xc and f'''(xi) is the third derivative value of f(x) there. A remarkable fact! > > What this signifies is that if the function whose derivative you are attempting to approximate with the formula I gave you has a third derivative which remains very small - in other words is reasonably smooth - then you are guaranteed a close approximation. > > Roger Stafford But Roger, doesn't your fancy algorithm reduce to central finite differences if the x are equispaced: dydx(2:end-1)=(y(3:end) - y(1:end-2))/(2*dx); without the pretty stuff at the ends of course.