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 2. SOLUTIONS OF EQUATIONS: ROOT-FINDING 83<br />

In [1]: function fixedpt(g::Function,pzero,eps,N)<br />

n=1<br />

while nx-(x^2-2)/4,2,10^(-5),15)<br />

p is 1.414214788550556 and the iteration number is 10<br />

Let’s try p 0 = −5. Note that this is not only outside the <strong>in</strong>terval of convergence I,<br />

but g ′ (−5) = 3.5 > 1, so we do not expect convergence.

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

Saved successfully!

Ooh no, something went wrong!