\documentclass[12pt, letterpaper]{article}

\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{geometry}
\usepackage{setspace}

\title{Homework 1}
\author{Menyoung Lee}
\geometry{margin=1in}
%\doublespacing

\begin{document}
\maketitle
%p.30 ex. 1.1 P 2, 4, 5, 6

\subsection*{P2}
\paragraph*{a}
$x^5 + x = 1$. Therefore $f(x) = x^5 + x - 1 = 0$.\\
$f(0) = 0^5 + 0 - 1 = -1 < 0$ and $f(1) = 1^5 + 1 - 1 = 1 > 0$.\\
By the Intermediate Value Theoream, root $r \in [0,1]$

\paragraph*{b}
$\sin{x} = 6x + 5$. Therefore $f(x) = 5 + 6x - \sin{x} = 0$.\\
$f(-1) = 5 + 6\times(-1) - \sin(-1) = -1 - \sin(-1) = \sin(1) - 1 < 0$ because $\sin(1) < 1$.\\
$f(0) = 5 + 6\times0 - \sin{0} = 5 > 0$.\\
By the Intermediate Value Theoream, root $r \in [-1,0]$

\paragraph*{c}
$\ln{x} + x^2 = 3$. Therefore $f(x) = \ln{x} + x^2 - 3 = 0$.\\
$f(1) = \ln(1) + 1^2 - 3 = 0 + 1 - 3 = -2 < 0$.\\
$f(2) = \ln(2) + 2^2 - 3 = \ln(2) + 1 > 0$ because $\ln(2) > 0$.\\
By the Intermediate Value Theoream, root $r \in [1,2]$

\subsection*{P4}
\paragraph*{a}
Start with $a_1 = 0$ and $b_1 = 1$.
\subparagraph*{Iteration 1}
$c_1 = \frac{a_1+b_1}{2} = \frac{1}{2}$.
$f(a_1)f(c_1) = f(0)f(\frac{1}{2}) = (-1)((\frac{1}{2})^5 + \frac{1}{2} - 1) = \frac{15}{32} > 0$.
So $a_2 = c_1 = \frac{1}{2}$ and $b_2 = b_1 = 1$.
\subparagraph*{Iteration 2}
$c_2 = \frac{a_2+b_2}{2} = \frac{3}{4}$.
$f(a_2)f(c_2) = f(\frac{1}{2})f(\frac{3}{4}) = (-\frac{15}{32})((\frac{3}{4})^5 + \frac{3}{4} - 1) > 0$.
So $a_3 = c_2 = \frac{3}{4}$ and $b_3 = b_2 = 1$.\\
And so root $r \in [\frac{3}{4}, 1]$, i.e. $r = \frac{7}{8} \pm \frac{1}{8}$.

\paragraph*{b}
Start with $a_1 = -1$ and $b_1 = 0$.
\subparagraph*{Iteration 1}
$c_1 = \frac{a_1+b_1}{2} = -\frac{1}{2}$.
$f(c_1) = 5 + 6\times(-\frac{1}{2}) -\sin(-\frac{1}{2}) = 2 + \sin(\frac{1}{2}) > 0$ so $f(a_1)f(c_1) < 0$.
Therefore let $a_2 = a_1 = -1$ and $b_2 = c_1 = -\frac{1}{2}$.
\subparagraph*{Iteration 2}
$c_2 = \frac{a_2+b_2}{2} = -\frac{3}{4}$.
$f(c_2) = 5 + 6\times(-\frac{3}{4}) - \sin(-\frac{3}{4}) = \frac{1}{2} + \sin(\frac{3}{4}) > 0$ so $f(a_2)(c_2) < 0$.
Therefore let $a_3 = a_2 = -1$ and $b_3 = c_2 = -\frac{3}{4}$.\\
And so root $r \in [-1, -\frac{3}{4}]$, i.e. $r = -\frac{7}{8} \pm \frac{1}{8}$.

\paragraph*{c}
Start with $a_1 = 1$ and $b_1 = 2$.
\subparagraph*{Iteration 1}
$c_1 = \frac{a_1+b_1}{2} = \frac{3}{2}$.
$f(c_1) = \ln(\frac{3}{2}) + (\frac{3}{2})^2 - 3 < 0$ so $f(a_1)f(c_1) > 0$.
Therefore let $a_2 = c_1 = \frac{3}{2}$ and $b_2 = b_1 = 2$.
\subparagraph*{Iteration 2}
$c_2 = \frac{a_2+b_2}{2} = \frac{7}{4}$.
$f(c_2) = \ln(\frac{7}{4}) + (\frac{7}{4})^2 - 3 > 0$ so  $f(a_2)(c_2) < 0$.
Therefore let $a_3 = a_2 = \frac{3}{2}$ and $b_3 = c_2 = \frac{7}{4}$.
And so root $r \in [\frac{3}{2}, \frac{7}{4}]$, i.e. $r = \frac{13}{8} \pm \frac{1}{8}$.

\subsection*{P5}
$x^4 = x^3 + 10$. Therefore let $f(x) = x^4 - x^3 - 10 = 0$.
\paragraph*{a}
$f(2) = 16 - 8 - 10 = -2 < 0$.\\
$f(3) = 81 - 27 - 10 = 44 > 0$.\\
Therefore root $r \in [2,3]$.
\paragraph*{b}
Let $\epsilon_n$ be error after $n$ steps.\\
$\epsilon_0 = \frac{1}{2}$ and $\epsilon_n = \frac{\epsilon_{n-1}}{2}$.\\
Therefore $\epsilon_n = \frac{\epsilon_0}{2^n} = \frac{1}{2^{n+1}}\\
\Rightarrow \epsilon_n \leq 10^{-10}\\
\Rightarrow 2^{n+1} \geq 10^{10}\\
\Rightarrow n+1 \geq \log_2{10^{10}} = 33.2\\
\Rightarrow n \geq 33$.

\subsection*{P6}
$c_1 = \frac{-2+1}{2} = -\frac{1}{2}\\
c_2 = \frac{-\frac{1}{2}+1}{2} = \frac{1}{4}\\
c_3 = \frac{-\frac{1}{2}+\frac{1}{4}}{2} = -\frac{1}{8}\\
\cdots\\
c_n = \frac{(-1)^{n}}{2^n}$.\\
It converges to 0, but it is \emph{not} the root.
$f(x)$ is not continuous on the interval so the Intermediate Value Theorem clearly dose not apply.

\end{document}


