<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Melissa Cabral</title>
	<atom:link href="http://melissacabral.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://melissacabral.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Sun, 20 Dec 2009 20:04:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='melissacabral.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Melissa Cabral</title>
		<link>http://melissacabral.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://melissacabral.wordpress.com/osd.xml" title="Melissa Cabral" />
	<atom:link rel='hub' href='http://melissacabral.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Using Polynomial Interpolation to Evaluate Integrals</title>
		<link>http://melissacabral.wordpress.com/2009/12/09/using-polynomial-interpolation-to-evaluate-integrals/</link>
		<comments>http://melissacabral.wordpress.com/2009/12/09/using-polynomial-interpolation-to-evaluate-integrals/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 19:03:34 +0000</pubDate>
		<dc:creator>melissacabral</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://melissacabral.wordpress.com/?p=132</guid>
		<description><![CDATA[The first example I tried was a simple one just to test the method. I used the Lagrange method to interpolate a polynomial to fit the function e^(x). The resulting coefficients in MATLab were: 1, 1.2214, 1.4913, 1.8221, 2.2255, 2.7183. This gives a polynomial of the form: Integration yields: This yields an approximate error of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=132&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The first example I tried was a simple one just to test the method. I used the Lagrange method to interpolate a polynomial to fit the function e^(x). The resulting coefficients in MATLab were: 1, 1.2214, 1.4913, 1.8221, 2.2255, 2.7183. This gives a polynomial of the form:</p>
<p><a href="http://melissacabral.files.wordpress.com/2009/12/poly-eq.png"><img class="alignnone size-full wp-image-133" title="poly eq" src="http://melissacabral.files.wordpress.com/2009/12/poly-eq.png?w=500&#038;h=50" alt="" width="500" height="50" /></a></p>
<p>Integration yields:</p>
<p><a href="http://melissacabral.files.wordpress.com/2009/12/integrals.png"><img class="alignnone size-full wp-image-134" title="integrals" src="http://melissacabral.files.wordpress.com/2009/12/integrals.png?w=500" alt=""   /></a></p>
<p>This yields an approximate error of 4%.</p>
<p>I tried using my Newton&#8217;s Divided Differences excel spreadsheet to fit a polynomial to the same function and the results are below:</p>
<p>﻿<a href="http://melissacabral.files.wordpress.com/2009/12/excel.png"><img class="alignnone size-full wp-image-135" title="excel" src="http://melissacabral.files.wordpress.com/2009/12/excel.png?w=500&#038;h=266" alt="" width="500" height="266" /></a></p>
<p>Using the coefficients found above for the polynomial, I graphed the real function and the Newton&#8217;s Divided Difference Polynomial on http://www.coolmath.com and the results on the interval [0,1] are below:</p>
<p><a href="http://melissacabral.files.wordpress.com/2009/12/poly-integrate.png"><img class="alignnone size-full wp-image-136" title="poly integrate" src="http://melissacabral.files.wordpress.com/2009/12/poly-integrate.png?w=500" alt=""   /></a></p>
<p>Evaluating the integrals of these two functions on the interval  [0,0.75] yields results which produce approximately a 3% error. The error is less than the Lagrange method&#8217;s error over a smaller interval. This is just one particular example and there are many other functions that could be evaluated in a number of different ways. Each function is unique and there is no &#8220;one size fits all&#8221; method that will always produce the most accurate results.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/melissacabral.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/melissacabral.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/melissacabral.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/melissacabral.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/melissacabral.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/melissacabral.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/melissacabral.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/melissacabral.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/melissacabral.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/melissacabral.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/melissacabral.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/melissacabral.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/melissacabral.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/melissacabral.wordpress.com/132/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=132&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://melissacabral.wordpress.com/2009/12/09/using-polynomial-interpolation-to-evaluate-integrals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fb3db2dbb092a05bb3f8f1d9030815e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">melissacabral</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/12/poly-eq.png" medium="image">
			<media:title type="html">poly eq</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/12/integrals.png" medium="image">
			<media:title type="html">integrals</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/12/excel.png" medium="image">
			<media:title type="html">excel</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/12/poly-integrate.png" medium="image">
			<media:title type="html">poly integrate</media:title>
		</media:content>
	</item>
		<item>
		<title>Gauss Quadrature</title>
		<link>http://melissacabral.wordpress.com/2009/12/05/gauss-quadrature/</link>
		<comments>http://melissacabral.wordpress.com/2009/12/05/gauss-quadrature/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 04:00:05 +0000</pubDate>
		<dc:creator>melissacabral</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://melissacabral.wordpress.com/?p=116</guid>
		<description><![CDATA[Gauss Quadrature refers to a similar type of integral approximation. Instead of using equidistant points as the trapezoidal rule, it uses the gauss point distribution as we have seen in polynomial interpolation. It distributes the points in such a way that it provides a more accurate evaluation of the area under the curve. Wolfram&#8217;s Math [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=116&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Gauss Quadrature refers to a similar type of integral approximation. Instead of using equidistant points as the trapezoidal rule, it uses the gauss point distribution as we have seen in polynomial interpolation. It distributes the points in such a way that it provides a more accurate evaluation of the area under the curve. Wolfram&#8217;s Math World had a good graphical depiction:</p>
<p><a href="http://melissacabral.files.wordpress.com/2009/12/gaussian-quadrature.png"><img class="alignnone size-full wp-image-117" title="gaussian quadrature" src="http://melissacabral.files.wordpress.com/2009/12/gaussian-quadrature.png?w=500" alt=""   /></a></p>
<p><img class="tex" src="http://upload.wikimedia.org/math/1/b/a/1ba3e9e642523eb58f98f00539aafd60.png" alt="\int_{-1}^1 f(x)\,dx \approx \sum_{i=1}^n w_i f(x_i)." /></p>
<p>This provides us with a weighted sum of function values. We can note that this method fails to work when a function has a singularity. A singularity is a point where the function is not well defined or cannot be differentiated. For example, this method would not work for functions such as f(x) = 1/x or   f(x) =|x|.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/melissacabral.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/melissacabral.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/melissacabral.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/melissacabral.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/melissacabral.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/melissacabral.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/melissacabral.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/melissacabral.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/melissacabral.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/melissacabral.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/melissacabral.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/melissacabral.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/melissacabral.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/melissacabral.wordpress.com/116/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=116&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://melissacabral.wordpress.com/2009/12/05/gauss-quadrature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fb3db2dbb092a05bb3f8f1d9030815e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">melissacabral</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/12/gaussian-quadrature.png" medium="image">
			<media:title type="html">gaussian quadrature</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/math/1/b/a/1ba3e9e642523eb58f98f00539aafd60.png" medium="image">
			<media:title type="html">\int_{-1}^1 f(x)\,dx \approx \sum_{i=1}^n w_i f(x_i).</media:title>
		</media:content>
	</item>
		<item>
		<title>Trapezoidal Rule</title>
		<link>http://melissacabral.wordpress.com/2009/12/04/trapezoidal-rule/</link>
		<comments>http://melissacabral.wordpress.com/2009/12/04/trapezoidal-rule/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 03:52:15 +0000</pubDate>
		<dc:creator>melissacabral</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://melissacabral.wordpress.com/?p=114</guid>
		<description><![CDATA[The trapezoidal rule is simply a method of approximating an integral. A more basic version of this rule utilizes rectangles instead. Trapezoids have been found to provide a more accurate result. A visual representation of the method was found on Wikipedia and can be seen below: It utilizes the equation for the area of a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=114&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The trapezoidal rule is simply a method of approximating an integral. A more basic version of this rule utilizes rectangles instead. Trapezoids have been found to provide a more accurate result. A visual representation of the method was found on Wikipedia and can be seen below:</p>
<p><img src="http://upload.wikimedia.org/wikipedia/commons/a/a8/Calkowanie_numeryczne-metoda_trapezow.png" alt="" /></p>
<p>It utilizes the equation for the area of a trapezoid. A summation is done to provide total area under the function:</p>
<p><img class="tex" src="http://upload.wikimedia.org/math/0/0/7/0076feb6427275473d3e0674d68a73e2.png" alt="\int_a^b f(x)\,dx \approx (b-a) \, \frac{f(a) + f(b)}{2}." /></p>
<p>Will a polynomial fit give us an accurate evaluation of an integral?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/melissacabral.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/melissacabral.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/melissacabral.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/melissacabral.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/melissacabral.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/melissacabral.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/melissacabral.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/melissacabral.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/melissacabral.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/melissacabral.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/melissacabral.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/melissacabral.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/melissacabral.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/melissacabral.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=114&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://melissacabral.wordpress.com/2009/12/04/trapezoidal-rule/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fb3db2dbb092a05bb3f8f1d9030815e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">melissacabral</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/commons/a/a8/Calkowanie_numeryczne-metoda_trapezow.png" medium="image" />

		<media:content url="http://upload.wikimedia.org/math/0/0/7/0076feb6427275473d3e0674d68a73e2.png" medium="image">
			<media:title type="html">\int_a^b f(x)\,dx \approx (b-a) \, \frac{f(a) + f(b)}{2}.</media:title>
		</media:content>
	</item>
		<item>
		<title>Numerical Integration Introduction</title>
		<link>http://melissacabral.wordpress.com/2009/12/03/numerical-integration-introduction/</link>
		<comments>http://melissacabral.wordpress.com/2009/12/03/numerical-integration-introduction/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 03:36:23 +0000</pubDate>
		<dc:creator>melissacabral</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://melissacabral.wordpress.com/?p=112</guid>
		<description><![CDATA[Numerical Integration is a broad term for finding the area under a given function. It can be done in a number of ways. Some approximation methods to be discussed are: Trapezoidal Rule Gauss Quadrature Sometimes, depending on the function, integrating can be a difficult thing to do. When an integral becomes difficult and messy, it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=112&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Numerical Integration is a broad term for finding the area under a given function. It can be done in a number of ways. Some approximation methods to be discussed are:</p>
<ul>
<li>Trapezoidal Rule</li>
<li>Gauss Quadrature</li>
</ul>
<p>Sometimes, depending on the function, integrating can be a difficult thing to do. When an integral becomes difficult and messy, it may be easier to approximate a polynomial using any of the previously mentioned methods. Polynomials are easy to integrate and evaluate and therefore are preferred. Next, we will test the limits of polynomial interpolation to be used in solving difficult integrals.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/melissacabral.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/melissacabral.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/melissacabral.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/melissacabral.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/melissacabral.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/melissacabral.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/melissacabral.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/melissacabral.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/melissacabral.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/melissacabral.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/melissacabral.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/melissacabral.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/melissacabral.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/melissacabral.wordpress.com/112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=112&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://melissacabral.wordpress.com/2009/12/03/numerical-integration-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fb3db2dbb092a05bb3f8f1d9030815e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">melissacabral</media:title>
		</media:content>
	</item>
		<item>
		<title>Introduction to Cubic Splines</title>
		<link>http://melissacabral.wordpress.com/2009/12/01/introduction-to-cubic-splines/</link>
		<comments>http://melissacabral.wordpress.com/2009/12/01/introduction-to-cubic-splines/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 03:30:20 +0000</pubDate>
		<dc:creator>melissacabral</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://melissacabral.wordpress.com/2009/12/17/introduction-to-cubic-splines/</guid>
		<description><![CDATA[Up until this point we have been using n-1th order polynomials to interpolate n data points. As we have noticed, these methods are not perfect and can be sensitive to round-off error and oscillations between points. Yet another approach would be to use lower order polynomials in pieces to interpolate between smaller sections of data [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=104&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-family:Arial Narrow;font-size:12pt;">Up until this point we have been using n-1th order polynomials to interpolate n data points. As we have noticed, these methods are not perfect and can be sensitive to round-off error and oscillations between points. Yet another approach would be to use lower order polynomials in pieces to interpolate between smaller sections of data points. These &#8220;pieces&#8221; of polynomials are called splines. In our lectures, we evaluated cubic splines which use 3<sup>rd</sup> order polynomial curves. The splines can be connected in such a way that provides a smooth transition between pieces.<br />
</span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;">A cubic spline essentially derives a 3<sup>rd</sup> order polynomial for each interval between two data points and has the general equation:<br />
</span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;"><a href="http://melissacabral.files.wordpress.com/2009/12/spline-general.png"><img class="alignnone size-full wp-image-105" title="Spline general" src="http://melissacabral.files.wordpress.com/2009/12/spline-general.png?w=500" alt=""   /></a></span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;">In order to provide a smoother fit, the first and second derivatives at the interpolating points must be equal. Some conditions can be applied at the outermost points of a spline interpolating function. The derivatives at these points are set equal to zero so that they can extend as straight lines and provide a natural spline.<br />
</span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;">The actual derivation of the cubic spline can get complicated. It is difficult to satisfy iterative conditions because you never know where you are ending up. Since a spline interpolates on both ends, we need it to match the point to the left and to match the function to the right.<br />
</span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;">Iterative conditions:<br />
</span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;"><a href="http://melissacabral.files.wordpress.com/2009/12/iterative-conditions.png"><img class="alignnone size-full wp-image-106" title="iterative conditions" src="http://melissacabral.files.wordpress.com/2009/12/iterative-conditions.png?w=500" alt=""   /></a></span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;"><br />
</span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;">The coefficients can be solved for in a messy algebraic system. Some of the results yielded from this extensive derivation are:<br />
</span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;"><br />
</span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;"><a href="http://melissacabral.files.wordpress.com/2009/12/coefficients.png"><img class="alignnone size-full wp-image-107" title="coefficients" src="http://melissacabral.files.wordpress.com/2009/12/coefficients.png?w=500" alt=""   /></a></span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;"><br />
</span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;">We can note that although these conditions get us no further to solving the system, if they hold true then we can transfer this condition on coefficients. Since we have already solved a &amp; d, we just need to solve the system to get c. That can then be used to solve for b. Now that all the coefficients are known, the spline interpolation method is ready to be used.<br />
</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/melissacabral.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/melissacabral.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/melissacabral.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/melissacabral.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/melissacabral.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/melissacabral.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/melissacabral.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/melissacabral.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/melissacabral.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/melissacabral.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/melissacabral.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/melissacabral.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/melissacabral.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/melissacabral.wordpress.com/104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=104&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://melissacabral.wordpress.com/2009/12/01/introduction-to-cubic-splines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fb3db2dbb092a05bb3f8f1d9030815e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">melissacabral</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/12/spline-general.png" medium="image">
			<media:title type="html">Spline general</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/12/iterative-conditions.png" medium="image">
			<media:title type="html">iterative conditions</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/12/coefficients.png" medium="image">
			<media:title type="html">coefficients</media:title>
		</media:content>
	</item>
		<item>
		<title>Chebyshev Points</title>
		<link>http://melissacabral.wordpress.com/2009/11/30/chebyshev-points/</link>
		<comments>http://melissacabral.wordpress.com/2009/11/30/chebyshev-points/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 18:52:25 +0000</pubDate>
		<dc:creator>melissacabral</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://melissacabral.wordpress.com/?p=127</guid>
		<description><![CDATA[Since we have noticed that number and location of our points is important to the accuracy of the interpolation, we will take a look at Chebyshev points. Chebyshev points can provide a more accurate result than equidistant points in some cases. Below is a graphical depiction from the University of Wisconsin of the spacing of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=127&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Since we have noticed that number and location of our points is important to the accuracy of the interpolation, we will take a look at Chebyshev points. Chebyshev points can provide a more accurate result than equidistant points in some cases. Below is a graphical depiction from the University of Wisconsin of the spacing of Chebyshev points with an explanation of how they are chosen.</p>
<p><a href="http://melissacabral.files.wordpress.com/2009/12/chebyshev-points.png"><img class="alignnone size-full wp-image-128" title="chebyshev points" src="http://melissacabral.files.wordpress.com/2009/12/chebyshev-points.png?w=500&#038;h=271" alt="" width="500" height="271" /></a></p>
<p>1. To select N+1 points, split the semi-circle into N arcs of equal length</p>
<p>2. Project the arcs onto the x-axis, giving the following formula for each Chebyshev point xj:</p>
<p><a href="http://melissacabral.files.wordpress.com/2009/12/eqn.png"><img class="alignnone size-full wp-image-129" title="eqn" src="http://melissacabral.files.wordpress.com/2009/12/eqn.png?w=500&#038;h=72" alt="" width="500" height="72" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/melissacabral.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/melissacabral.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/melissacabral.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/melissacabral.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/melissacabral.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/melissacabral.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/melissacabral.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/melissacabral.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/melissacabral.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/melissacabral.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/melissacabral.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/melissacabral.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/melissacabral.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/melissacabral.wordpress.com/127/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=127&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://melissacabral.wordpress.com/2009/11/30/chebyshev-points/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fb3db2dbb092a05bb3f8f1d9030815e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">melissacabral</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/12/chebyshev-points.png" medium="image">
			<media:title type="html">chebyshev points</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/12/eqn.png" medium="image">
			<media:title type="html">eqn</media:title>
		</media:content>
	</item>
		<item>
		<title>Lagrange Method Code</title>
		<link>http://melissacabral.wordpress.com/2009/11/29/lagrange-method-code/</link>
		<comments>http://melissacabral.wordpress.com/2009/11/29/lagrange-method-code/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 02:09:22 +0000</pubDate>
		<dc:creator>melissacabral</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://melissacabral.wordpress.com/?p=97</guid>
		<description><![CDATA[%Lagrange Interpolation clear %Melissa Cabral, Peter Gagnon, Andrew Rodriguez N=5; xp=linspace(0,1,N+1); % equidistant points x=xp; %this should be changed M=N+1; f = exp(xp); %function value for k=1:M %Lagrange Interpolation for j=1:N+1 L(j,k)=1; for i=1:N+1 if i~=j L(j,k)=L(j,k).*(x(k)-xp(i))/(xp(j)-xp(i)); end end end %now build the interpolating polynomial P(k)=0; for j=1:N+1 P(k)=L(j,k).*f(j) end end<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=97&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#99cc00;">%Lagrange Interpolation</span></p>
<p>clear</p>
<p><span style="color:#99cc00;">%Melissa Cabral, Peter Gagnon, Andrew Rodriguez</span></p>
<p>N=5;</p>
<p>xp=linspace(0,1,N+1); <span style="color:#99cc00;">% equidistant points</span></p>
<p>x=xp; <span style="color:#99cc00;">%this should be changed</span></p>
<p>M=N+1;</p>
<p>f = exp(xp); <span style="color:#99cc00;">%function value</span></p>
<p><span style="color:#0000ff;">for</span> k=1:M</p>
<p><span style="color:#99cc00;">%Lagrange Interpolation</span></p>
<p><span style="color:#0000ff;">for</span> j=1:N+1</p>
<p>L(j,k)=1;</p>
<p><span style="color:#0000ff;">for</span> i=1:N+1</p>
<p><span style="color:#0000ff;">if </span>i~=j</p>
<p>L(j,k)=L(j,k).*(x(k)-xp(i))/(xp(j)-xp(i));</p>
<p><span style="color:#0000ff;">end</span></p>
<p><span style="color:#0000ff;">end</span></p>
<p><span style="color:#0000ff;">end</span></p>
<p><span style="color:#99cc00;">%now build the interpolating polynomial</span></p>
<p>P(k)=0;</p>
<p><span style="color:#0000ff;">for</span> j=1:N+1</p>
<p>P(k)=L(j,k).*f(j)</p>
<p><span style="color:#0000ff;">end</span></p>
<p><span style="color:#0000ff;">end</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/melissacabral.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/melissacabral.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/melissacabral.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/melissacabral.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/melissacabral.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/melissacabral.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/melissacabral.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/melissacabral.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/melissacabral.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/melissacabral.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/melissacabral.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/melissacabral.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/melissacabral.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/melissacabral.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=97&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://melissacabral.wordpress.com/2009/11/29/lagrange-method-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fb3db2dbb092a05bb3f8f1d9030815e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">melissacabral</media:title>
		</media:content>
	</item>
		<item>
		<title>Lagrange Interpolating Polynomial</title>
		<link>http://melissacabral.wordpress.com/2009/11/29/lagrange-interpolating-polynomial-2/</link>
		<comments>http://melissacabral.wordpress.com/2009/11/29/lagrange-interpolating-polynomial-2/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 01:53:35 +0000</pubDate>
		<dc:creator>melissacabral</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://melissacabral.wordpress.com/2009/12/17/lagrange-interpolating-polynomial-2/</guid>
		<description><![CDATA[The Lagrange method of polynomial interpolation is essentially providing us with a weighted average of the two values we are interpolating between. If you would like to fit a parabola between three points, you would use three parabolas. Each parabola would pass through its respective point and equal zero at the other two points. When [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=87&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#333333;font-family:Arial Narrow;font-size:12pt;">The Lagrange method of polynomial interpolation is essentially providing us with a weighted average of the two values we are interpolating between. If you would like to fit a parabola between three points, you would use three parabolas. Each parabola would pass through its respective point and equal zero at the other two points. When these parabolas are added together, they represent a unique parabola that connects the three points. This weighted average Lagrange interpolating second degree polynomial can be written as:</span></p>
<p><span style="color:#333333;font-family:Arial Narrow;font-size:12pt;"><a href="http://melissacabral.files.wordpress.com/2009/12/lagrange-general.png"><img class="alignnone size-full wp-image-90" title="Lagrange General" src="http://melissacabral.files.wordpress.com/2009/12/lagrange-general.png?w=500&#038;h=48" alt="" width="500" height="48" /></a></span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;"><span style="color:#333333;">You can verify just by looking at the function that the first term will be equal to <em>f</em></span><span style="color:black;">(</span><span style="color:blue;">x1</span><span style="color:black;">)</span><span style="color:#333333;"> at </span><span style="color:blue;">x1</span><span style="color:#333333;"> and equal to zero at </span><span style="color:blue;">x2</span><span style="color:#333333;"> and </span><span style="color:blue;">x3</span><span style="color:#333333;">. The second and third terms will have this same characteristic.<br />
</span></span></p>
<p><span style="color:#333333;font-family:Arial Narrow;font-size:12pt;">Second degree polynomials as well as higher order degree polynomials can be represented as the summation:<br />
</span></p>
<p><span style="color:#333333;font-family:Arial Narrow;font-size:12pt;"><a href="http://melissacabral.files.wordpress.com/2009/12/lagrange-summation.png"><img class="alignnone size-full wp-image-91" title="Lagrange summation" src="http://melissacabral.files.wordpress.com/2009/12/lagrange-summation.png?w=500" alt=""   /></a></span></p>
<p><span style="font-family:Arial Narrow;"><span style="font-size:12pt;"><span style="color:#333333;">From this equation, you can see that the weighted average at each function value has been simplified and represented as Li(</span><span style="color:blue;">x</span></span><span style="color:#333333;">) as seen below:<br />
</span></span></p>
<p><span style="color:#333333;font-family:Arial Narrow;font-size:12pt;"> </span></p>
<p style="margin-bottom:.0001pt;line-height:19.2pt;"><span style="font-family:Calibri, sans-serif;font-size:medium;"><span style="line-height:17px;"><a href="http://melissacabral.files.wordpress.com/2009/12/product-lagrange.png"><img class="alignnone size-full wp-image-92" title="Product Lagrange" src="http://melissacabral.files.wordpress.com/2009/12/product-lagrange.png?w=500" alt=""   /></a></span></span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;">In this equation, n represents the number of data points you are interpolating.<br />
</span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;">The Lagrange Polynomial is definitely a more elegant interpolating method. However, elegant ≠ efficient. A drawback to this method is that if you need to change an interpolation point, you need to re-evaluate the entire polynomial. It does not build upon itself like the Newton&#8217;s Divided Difference Method. Newton&#8217;s Divided Differences seems like it is the more practical method for computational purposes.<br />
</span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;">Another drawback to this method and any method using equally spaced points is that the interpolating polynomial will tend to oscillate between the data points. As the order of the polynomial gets higher, and the number of data points increases, this oscillation can worsen.</span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;">An example of these effects can be seen below: (Graphs taken from Holistic Numerical Methods Institute)</span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;"><a href="http://melissacabral.files.wordpress.com/2009/11/12th-order-oscillations.png"><img class="alignnone size-full wp-image-101" title="12th order oscillations" src="http://melissacabral.files.wordpress.com/2009/11/12th-order-oscillations.png?w=500&#038;h=270" alt="" width="500" height="270" /></a></span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;">If you choose equidistant points to interpolate your polynomial, you can get results that oscillate between points as seen in the figure above. However, if you choose points that are spaced further apart in the regions where the fit is good and choose points that are closer together in the regions where the oscillation is occurring you will notice a higher degree of accuracy. </span></p>
<p><span style="font-family:Arial Narrow;font-size:12pt;"><a href="http://melissacabral.files.wordpress.com/2009/11/spaced-points.png"><img class="alignnone size-full wp-image-102" title="spaced points" src="http://melissacabral.files.wordpress.com/2009/11/spaced-points.png?w=500" alt=""   /></a></span></p>
<p><span style="font-family:'Arial Narrow';font-size:16px;">This brings us to our next sub-topic: Chebshev points and Gauss-Lobatto points.</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/melissacabral.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/melissacabral.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/melissacabral.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/melissacabral.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/melissacabral.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/melissacabral.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/melissacabral.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/melissacabral.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/melissacabral.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/melissacabral.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/melissacabral.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/melissacabral.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/melissacabral.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/melissacabral.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=87&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://melissacabral.wordpress.com/2009/11/29/lagrange-interpolating-polynomial-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fb3db2dbb092a05bb3f8f1d9030815e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">melissacabral</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/12/lagrange-general.png" medium="image">
			<media:title type="html">Lagrange General</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/12/lagrange-summation.png" medium="image">
			<media:title type="html">Lagrange summation</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/12/product-lagrange.png" medium="image">
			<media:title type="html">Product Lagrange</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/11/12th-order-oscillations.png" medium="image">
			<media:title type="html">12th order oscillations</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/11/spaced-points.png" medium="image">
			<media:title type="html">spaced points</media:title>
		</media:content>
	</item>
		<item>
		<title>Newton&#8217;s Divided Difference Code</title>
		<link>http://melissacabral.wordpress.com/2009/11/24/newtons-divided-difference-code/</link>
		<comments>http://melissacabral.wordpress.com/2009/11/24/newtons-divided-difference-code/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 02:15:52 +0000</pubDate>
		<dc:creator>melissacabral</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://melissacabral.wordpress.com/?p=99</guid>
		<description><![CDATA[clear %Melissa Cabral, Peter Gagnon, Andrew Rodriguez %interpolation point info N=32; %xp=linspace(-1,1,N+1); %equidistant points %for j=1:N+1 %xp(j)=-cos(pi*(j-1)/N); %Chebyshev Gauss Lobatto points %end for j=1:N+1 xp(j)=-cos(pi*(2*j-1)/(2*N+2)); %Chebyshev Gauss points end f=exp(xp); %function value %evaluate polynomial at these points M=50; x=linspace(-5.0,5.0,M); ff=exp(x); %Newton Divided Differences for j=1:N D(1,j)=(f(j+1)-f(j))/(xp(j+1)-xp(j+1)-xp(j)); end for k=1:N-1 for j=1:N-k D(k+1,j)=(D(k,j+1)-D(k,j))/(xp(j+k+1)-xp(j)); end end %build the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=99&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>clear</p>
<p><span style="color:#99cc00;">%Melissa Cabral, Peter Gagnon, Andrew Rodriguez</span></p>
<p><span style="color:#99cc00;">%interpolation point info</span></p>
<p>N=32;</p>
<p><span style="color:#99cc00;">%xp=linspace(-1,1,N+1); %equidistant points</span></p>
<p><span style="color:#99cc00;">%for j=1:N+1</span></p>
<p><span style="color:#99cc00;">%xp(j)=-cos(pi*(j-1)/N); %Chebyshev Gauss Lobatto points</span></p>
<p><span style="color:#99cc00;">%end</span></p>
<p><span style="color:#0000ff;">for</span> j=1:N+1</p>
<p>xp(j)=-cos(pi*(2*j-1)/(2*N+2)); <span style="color:#99cc00;">%Chebyshev Gauss points</span></p>
<p><span style="color:#0000ff;">end</span></p>
<p>f=exp(xp);<span style="color:#99cc00;"> %function value</span></p>
<p><span style="color:#99cc00;">%evaluate polynomial at these points</span></p>
<p>M=50;</p>
<p>x=linspace(-5.0,5.0,M);</p>
<p>ff=exp(x);</p>
<p><span style="color:#99cc00;">%Newton Divided Differences</span></p>
<p><span style="color:#0000ff;">for</span> j=1:N</p>
<p>D(1,j)=(f(j+1)-f(j))/(xp(j+1)-xp(j+1)-xp(j));</p>
<p><span style="color:#0000ff;">end</span></p>
<p><span style="color:#0000ff;">for</span> k=1:N-1</p>
<p><span style="color:#0000ff;">for</span> j=1:N-k</p>
<p>D(k+1,j)=(D(k,j+1)-D(k,j))/(xp(j+k+1)-xp(j));</p>
<p><span style="color:#0000ff;">end</span></p>
<p><span style="color:#0000ff;">end</span></p>
<p><span style="color:#99cc00;">%build the basis polynomials</span></p>
<p>Pol(:,1)=(x(:)-xp(1))</p>
<p><span style="color:#0000ff;">for</span> j=1:N-1</p>
<p>Pol(:,j+1)=Pol(:,j).*(x(:)-xp(j+1))</p>
<p><span style="color:#0000ff;">end</span></p>
<p><span style="color:#99cc00;">%Build the polynomial</span></p>
<p>P=f(1)+0.0*x;</p>
<p><span style="color:#0000ff;">for</span> j=1:N</p>
<p>P(:)=P(:)+D(j,1).*Pol(:,j)</p>
<p><span style="color:#0000ff;">end</span></p>
<p><span style="color:#99cc00;">%plotting stuff</span></p>
<p>plot(x,P)</p>
<p>hold <span style="color:#800080;">on</span></p>
<p>plot(x,ff,<span style="color:#800080;">&#8216;r&#8217;</span>)</p>
<p>plot(xp,f,<span style="color:#800080;">&#8216;gp&#8217;</span>)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/melissacabral.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/melissacabral.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/melissacabral.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/melissacabral.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/melissacabral.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/melissacabral.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/melissacabral.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/melissacabral.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/melissacabral.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/melissacabral.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/melissacabral.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/melissacabral.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/melissacabral.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/melissacabral.wordpress.com/99/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=99&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://melissacabral.wordpress.com/2009/11/24/newtons-divided-difference-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fb3db2dbb092a05bb3f8f1d9030815e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">melissacabral</media:title>
		</media:content>
	</item>
		<item>
		<title>Newton’s Divided Differences</title>
		<link>http://melissacabral.wordpress.com/2009/11/17/newton%e2%80%99s-divided-differences/</link>
		<comments>http://melissacabral.wordpress.com/2009/11/17/newton%e2%80%99s-divided-differences/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 00:12:57 +0000</pubDate>
		<dc:creator>melissacabral</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://melissacabral.wordpress.com/2009/12/17/newton%e2%80%99s-divided-differences/</guid>
		<description><![CDATA[Newton&#8217;s divided-difference interpolating polynomial is among the most useful. Newton&#8217;s divided-difference essentially represents the slope of a line or curve connecting the points you wish to interpolate between. It is a finite divided-difference approximation of the derivatives. We can note that the smaller the interval between the points is, the better our approximation of a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=70&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="background:white;"><span style="color:black;font-family:Georgia;font-size:10pt;">Newton&#8217;s divided-difference interpolating polynomial is among the most useful. Newton&#8217;s divided-difference essentially represents the slope of a line or curve connecting the points you wish to interpolate between. It is a finite divided-difference approximation of the derivatives. We can note that the smaller the interval between the points is, the better our approximation of a continuous function will be.<br />
</span></p>
<p style="background:white;"><span style="color:black;font-family:Georgia;font-size:10pt;">In general, if we have n data points, the (n-1)<sup>th</sup> order polynomial is:</span></p>
<p style="background:white;"><a href="http://melissacabral.files.wordpress.com/2009/12/general-formula3.png"><img class="alignnone size-full wp-image-74" title="General formula" src="http://melissacabral.files.wordpress.com/2009/12/general-formula3.png?w=500" alt=""   /></a></p>
<p style="background:white;">(Click on equation for a better view)</p>
<p style="background:white;"><span style="font-family:Georgia;">This equation comes from intense algebraic manipulations that help us build this table of coefficients. It is often seen as an efficient method even though it may seem cumbersome. The divided differences build upon one another; therefore you only have to do the work once. Once the coefficients have been calculated, you can add additional points without having to re-calculate the previous points. It is not necessarily the most elegant method, however elegance is not the top priority when defining accuracy of an interpolation.</span></p>
<p style="background:white;"><span style="color:black;font-family:Georgia;font-size:10pt;">An example of Newton&#8217;s Divided Differences:<br />
</span></p>
<p style="background:white;"><span style="color:black;font-family:Georgia;font-size:10pt;"> will be interpolated by a 3<sup>rd</sup> order polynomial using the points:<br />
</span></p>
<p style="background:white;"><a href="http://melissacabral.files.wordpress.com/2009/11/data-points.png"><img class="alignnone size-full wp-image-78" title="Data Points" src="http://melissacabral.files.wordpress.com/2009/11/data-points.png?w=500" alt=""   /></a></p>
<p style="background:white;"><span style="color:black;font-family:Georgia;font-size:10pt;">To do repetitive calculations of this nature, I like to set up excel spreadsheets. The following table represents the divided differences:<br />
</span></p>
<div style="margin-left:4pt;">
<table style="border-collapse:collapse;" border="0">
<col></col>
<col></col>
<col></col>
<col></col>
<col></col>
<tbody>
<tr style="height:25px;">
<td style="padding-left:7px;padding-right:7px;border:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;"><strong>x<sub>i</sub></strong></span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:solid 1pt;border-left:none;border-bottom:solid 1pt;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;"><strong>f(x<sub>i</sub>)</strong></span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:solid 1pt;border-left:none;border-bottom:solid 1pt;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;"><strong>First </strong></span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:solid 1pt;border-left:none;border-bottom:solid 1pt;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;"><strong>Second</strong></span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:solid 1pt;border-left:none;border-bottom:solid 1pt;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;"><strong>Third</strong></span></p>
</td>
</tr>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:solid 1pt;border-bottom:none;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;">1</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:none;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;">0</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:none;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;">0.46209812</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:none;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;">-0.051873113</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:none;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;">0.007865529</span></p>
</td>
</tr>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:solid 1pt;border-bottom:none;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;">4</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:none;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;">1.386294361</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:none;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;">0.202732554</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:none;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;">-0.020410997</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:none;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;"> </span></p>
</td>
</tr>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:solid 1pt;border-bottom:none;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;">6</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:none;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;">1.791759469</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:none;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;">0.182321557</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:none;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;"> </span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:none;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;"> </span></p>
</td>
</tr>
<tr style="height:23px;">
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:solid 1pt;border-bottom:solid 1pt;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;">5</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid 1pt;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;">1.609437912</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid 1pt;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;"> </span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid 1pt;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;"> </span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid 1pt;border-right:solid 1pt;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;"> </span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p style="background:white;"><span style="color:black;font-family:Georgia;font-size:10pt;">Please note:<br />
</span></p>
<p style="background:white;"><span style="color:black;font-family:Georgia;font-size:10pt;">This excel file that I created can be used to calculate the divided differences of any function just by changing the input values. I will attach the table so that you may see the formulas and try plugging in some formulas of your own!<br />
</span></p>
<p style="background:white;"><span style="color:black;font-family:Georgia;font-size:10pt;">I also set it up so that it can evaluate both the original function and the interpolating polynomial at specific points. This is useful because by evaluating these two functions at specific points and comparing them, a relative error can be calculated. The relative error on my spreadsheet is set to calculate automatically once the input data is changed!<br />
</span></p>
<p style="background:white;"><span style="color:black;font-family:Georgia;font-size:10pt;">This gives us an interpolating polynomial of the form:<br />
</span></p>
<p style="background:white;"><span style="color:black;font-family:Georgia;font-size:10pt;"><a href="http://melissacabral.files.wordpress.com/2009/11/interpolating-polynomial.png"><img class="alignnone size-full wp-image-79" title="Interpolating Polynomial" src="http://melissacabral.files.wordpress.com/2009/11/interpolating-polynomial.png?w=500" alt=""   /></a></span></p>
<p style="background:white;">(Click on equation for a better view)</p>
<p style="background:white;"><span style="font-family:Georgia;font-size:10pt;"><span style="color:black;">I used graphing software on <a></a></span><a>http://www.coolmath.com<span style="color:black;"> to create a graphical depiction of our interpolating polynomial versus the actual function ln(x).  Below are the results:<br />
</span></a></span><a></a></p>
<p><a> </a></p>
<p><a></a></p>
<p><a></a></p>
<p><a></a></p>
<p><a></a></p>
<p><a> </a></p>
<p><a></a></p>
<p><a></a></p>
<p><a></a></p>
<p><a></a></p>
<p><a></a></p>
<p><a></a></p>
<p><a></p>
<p style="background:white;"><img src="http://melissacabral.files.wordpress.com/2009/12/121709_0012_newtonsdivi1.jpg?w=500" alt="" /><span style="color:black;font-family:Georgia;font-size:10pt;"><br />
</span></p>
<p style="background:white;"><span style="color:black;font-family:Georgia;font-size:10pt;">As you can see from the graph, Newton&#8217;s divided differences can be a very effective and efficient way to interpolate a polynomial to a given set of data points for a known function. Using my spreadsheet to evaluate the error for this function gives us:<br />
</span></p>
<p></a></p>
<table style="border-collapse:collapse;" border="0">
<col></col>
<col></col>
<col></col>
<tbody>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;"><strong>Evaluate at this point </strong></span></p>
</td>
<td style="background:#7f7f7f;padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;">2</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
</tr>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
</tr>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">ln(x) =</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">0.693147181</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
</tr>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">Pn(x) =</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">0.628768579</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
</tr>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">Relative Error =</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">9.287868934</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"><span style="color:black;font-family:Arial Narrow;"> % </span></td>
</tr>
</tbody>
</table>
<table style="border-collapse:collapse;" border="0">
<col></col>
<col></col>
<col></col>
<tbody>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;"><strong>Evaluate at this point </strong></span></p>
</td>
<td style="background:#7f7f7f;padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;">3</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
</tr>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
</tr>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">ln(x) =</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">1.098612289</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
</tr>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">Pn(x) =</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">1.075135641</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
</tr>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">Relative Error =</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">2.136936536</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"><span style="color:black;font-family:Arial Narrow;">% </span></td>
</tr>
</tbody>
</table>
<table style="border-collapse:collapse;" border="0">
<col></col>
<col></col>
<col></col>
<tbody>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;"><strong>Evaluate at this point </strong></span></p>
</td>
<td style="background:#7f7f7f;padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:center;"><span style="color:black;font-family:Arial Narrow;">4</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
</tr>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
</tr>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">ln(x) =</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">1.386294361</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
</tr>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">Pn(x) =</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">1.386294361</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"></td>
</tr>
<tr style="height:22px;">
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">Relative Error =</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom">
<p style="text-align:right;"><span style="color:black;font-family:Arial Narrow;">0</span></p>
</td>
<td style="padding-left:7px;padding-right:7px;border:none;" valign="bottom"><span style="color:black;font-family:Arial Narrow;">% </span></td>
</tr>
</tbody>
</table>
<p><a></a></p>
<p><a></a></p>
<p><a> </a></p>
<p><a></a></p>
<p><a></a></p>
<p><a></a></p>
<p><a></a></p>
<p><a></a></p>
<p><a></a></p>
<p><a></p>
<p style="background:white;">
<p style="background:white;"><span style="color:black;font-family:Georgia;font-size:10pt;">As you can see, the error when evaluated at f(2) is approximately 9%. It drops down to 2% when evaluated at 3. The function when evaluated at points 1,4,5,6 gives us an exact value with 0% error. This is because those are our interpolation points. The function will exactly match the interpolating polynomial at those points. The message to take away is that once again the spacing and number of points plays a big role in the accuracy of a polynomial interpolation! </span></p>
<p></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/melissacabral.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/melissacabral.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/melissacabral.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/melissacabral.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/melissacabral.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/melissacabral.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/melissacabral.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/melissacabral.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/melissacabral.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/melissacabral.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/melissacabral.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/melissacabral.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/melissacabral.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/melissacabral.wordpress.com/70/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=melissacabral.wordpress.com&amp;blog=9384659&amp;post=70&amp;subd=melissacabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://melissacabral.wordpress.com/2009/11/17/newton%e2%80%99s-divided-differences/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fb3db2dbb092a05bb3f8f1d9030815e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">melissacabral</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/12/general-formula3.png" medium="image">
			<media:title type="html">General formula</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/11/data-points.png" medium="image">
			<media:title type="html">Data Points</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/11/interpolating-polynomial.png" medium="image">
			<media:title type="html">Interpolating Polynomial</media:title>
		</media:content>

		<media:content url="http://melissacabral.files.wordpress.com/2009/12/121709_0012_newtonsdivi1.jpg" medium="image" />
	</item>
	</channel>
</rss>
