06.09.2021 Views

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 5. APPROXIMATION THEORY 198<br />

Name Number of Occurrences<br />

Smith 2,376,206<br />

Johnson 1,857,160<br />

Williams 1,534,042<br />

Brown 1,380,145<br />

Jones 1,362,755<br />

Miller 1,127,803<br />

Davis 1,072,335<br />

Garcia 858,289<br />

Rodriguez 804,240<br />

Wilson 783,051<br />

5.2 Cont<strong>in</strong>uous least squares<br />

In discrete least squares, our start<strong>in</strong>g po<strong>in</strong>t was a set of data po<strong>in</strong>ts. Here we will start <strong>with</strong><br />

a cont<strong>in</strong>uous function f on [a, b] and answer the follow<strong>in</strong>g question: how can we f<strong>in</strong>d the<br />

"best" polynomial P n (x) = ∑ n<br />

j=0 a jx j of degree at most n, that approximates f on [a, b]? As<br />

before, "best" polynomial will mean the polynomial that m<strong>in</strong>imizes the least squares error:<br />

E =<br />

∫ b<br />

a<br />

(<br />

f(x) −<br />

Compare this expression <strong>with</strong> that of the discrete least squares:<br />

E =<br />

To m<strong>in</strong>imize E <strong>in</strong> (5.10) weset ∂E<br />

∂a k<br />

∂E<br />

∂a k<br />

=<br />

⎛<br />

∂ ⎝<br />

∂a k<br />

= −2<br />

∫ b<br />

a<br />

∫ b<br />

(<br />

m∑<br />

y i −<br />

i=1<br />

) 2 n∑<br />

a j x j dx. (5.10)<br />

j=0<br />

) 2 n∑<br />

a j x j i .<br />

j=0<br />

=0, for k =0, 1, ..., n, and observe<br />

∫ (<br />

b<br />

n∑<br />

)<br />

f 2 (x)dx − 2 f(x) a j x j dx +<br />

a<br />

a<br />

j=0<br />

n∑<br />

∫ b<br />

f(x)x k dx +2 a j x j+k dx =0,<br />

j=0<br />

a<br />

∫ b<br />

a<br />

( n∑<br />

j=0<br />

⎞<br />

) 2<br />

a j x j dx⎠

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!