Numerical Analysis I

MATH 345 : Fall 2023

Department of Mathematics - SUNY Geneseo
⇐ Back

Homework 3 - Fixed Point Iteration

Due Date: October 1, 2023

Upload

Problems

  1. Write a Python function to implement Fixed-Point iteration. The heading of your function should be:
    def FixedPointIter(g, p0, eps, Nmax = 10000):
    
    where $g$ is the input function, $p_0$ is the initial condition of the sequence, eps is the tolerance, and $N_{\text{max}}$ is the maximum number of iterations. The syntax $N_{\text{max}} = 10000$ indicates that $N_{\text{max}}$ is an optional input and when an input value for $N_{\text{max}}$ is not given the default value of $10000$ is used. Hence, valid calls to FixedPointIter are
    >> FixedPointIter(g, p0, eps)
    >> FixedPointIter(g, p0, eps, 20000)
    >> FixedPointIter(g, p0, eps, 50)
    
    Include your Python code of your defined FixedPointIter.
  2. Apply the Fixed-Point Theorem to show that $g(x) = \frac{1}{2}e^{-x}$ has a unique fixed point on the interval $[0,1]$. Use your FixedPointIter function to find $N$ such that $|g(p_N)-p_N|<10^{-10}$ where $p_0=0.5$.
  3. An object in free-fall is subject to the force of gravity and the force due to air resistance. The height $h(t)$ of an object of mass $m$ dropped from an initial height of $h(0)=h_0$ is given by \[ h(t) = h_0 -\frac{mg}{k} t + \frac{m^2g}{k^2}\left(1-e^{-kt/m}\right) \] where $g=32.17$ ft/s$^2$ is the acceleration of an object due to gravity and $k$ is the coefficient of air resistance. Suppose that $h_0=300$, $m=0.25$, and $k=0.1$. Let $t^*$ be the time it takes for the object to hit the ground, that is, when $h(t^*) = 0$.
    1. Let $g(t) = \frac{kh_0}{mg} + \frac{m}{k}\left(1-e^{-kt/m}\right)$. Assuming that $h$ has a zero at $t^*$, show that $g$ has a fixed point at $t^*$.
    2. Prove that the Fixed-Point theorem is applicable to $g$ on the interval $[1,10]$, and thus conclude that $g$ has a unique fixed point $t^*$ in the interval $[1,10]$.
    3. Let $(t_n)$ be the sequence generated by fixed-point iteration using $g$ with initial condition $t_0=1$. Use the corollary to the Fixed-Point Iteration theorem to estimate the minimum $n$ that guarantees $|t_n - t^*|<\varepsilon$ with $\varepsilon = 10^{-12}$.
    4. Use your FixedPointIter function to find $t_n$ such that $|t_n - t^*|<10^{-12}$. What is the actual $n$?
  4. Perform four iterations of Newton's method by hand for $f(x) = 4x^3-2x^2+3$ with initial condition $p_0=-1$. Show all your work.
  5. In this problem, you will approximate the fixed point of $g(x)=\frac{1}{2}e^{-x}$ from question (2) using Newton's method applied to the function $f(x)=x-g(x)$. Clearly, a zero of $f$ is a fixed point of $g$. Apply Newton's method, with initial condition $p_0=0.5$, on the function $f(x)$ and determine the minimum iteration $N$ of Newton's method that returns an approximation $p_N$ to the zero of $f$ with error bounded by $|h(p_N)-p_N|<10^{-10}$ where $h(x)=x-f(x)/f'(x)$. Compare your results with those of Problem (2).