Homework 4¶
Problem 1¶
(Analytical) In Homework 3 Problem 4 you were asked to use Newton’s Method to get an iterative method for finding the square root of a number $a$. Apply the tools we have from the theory of fixed point iterations directly to this formula to show that the method is exactly quadratically convergent. Present your work in a Markdown cell.
In [ ]:
Problem 2¶
(Julia) Use Newton’s Method to find the two distinct roots of $f(x) = x^3 + x^2$, the double root at $x=0$ and the simple root at $x = -1$, by choosing appropriate initial values $x_0$ (other than 0 or -1). Print out your iterates to observe the convergence. For the double root, modify the problem so that you get quadratic convergence. You may use a for-loop with 12 iterations to observe the convergence.
In [ ]:
Problem 3¶
(Julia) Use the $\texttt{False Position}$ method in the $\texttt{Roots.jl}$ package in Julia to find the roots of
1. $f(x) = x \cos(x)$
2. $f(x) = x^2 \ln(x)$
3. $f(x) = (x-1)^2$
Plot each curve to make sure your results are reasonable. If the $\texttt{False Position}$ method fails, try another option. Give some thought to the accuracy.
In [ ]:
Problem 4¶
(Analytical) Find by hand the quadratic interpolating polynomial to $\ln(x)$ through $x=1,2,3$. Typeset your results in a Markdown cell.
In [ ]: