\documentclass[12pt]{amsart}
\addtolength{\hoffset}{-2.25cm}
\addtolength{\textwidth}{4.5cm}
\addtolength{\voffset}{-2.5cm}
\addtolength{\textheight}{5cm}
\setlength{\parskip}{0pt}
\setlength{\parindent}{15pt}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[colorlinks = true, linkcolor = black, citecolor = black, final]{hyperref}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{ marvosym }
\usepackage{wasysym}
\newcommand{\ds}{\displaystyle}
\pagestyle{myheadings}
\setlength{\parindent}{0in}
\pagestyle{empty}
\begin{document}
\thispagestyle{empty}
{\scshape Math 2300} \hfill {\scshape \Large Project \#3} \hfill {\scshape Fall 2017}
\medskip
\hrule
\bigskip
\bigskip
Type your answers and solutions to the problems, including the appropriate graphs, and following the specifications for work. You can copy and paste the questions into your write-up or restate them. The reader should not need anything else besides your document to understand what's going on. You may work individually or in a group of 2 or 3 students. (If you are not working individually, let me know who is in your group as soon as possible so that I can adjust the assignment submission requirements to reflect that.)
\bigskip
{\large \bf Overview:}
\smallskip
An important question about any function $y = f(x)$ is ``For what $x$-value(s) is $f(x) = 0$?'' Your calculator, of course, has a command (usually the ``solve" command) that can be used to numerically estimate such values. In this assignment we investigate the workings of your calculator behind the scenes: in particular, you will learn how your calculator (and Geogebra) use calculus to quickly find highly accurate estimates of the roots of a function. Specifically, in what follows you will explore the use of a function's tangent line approximation to approximate the roots (or zeros) of the function, from which we develop a numerical algorithm called {\bf Newton's Method}.
\medskip
{\large \bf Set-Up:}
There are a couple of GeoGebra commands and ideas to keep in mind for this lab:
\begin{itemize}
\item Bring up the Spreadsheet by checking that option under the ``View" menu on the right.
\item GeoGebra remembers names of functions, and can evaluate and differentiate them,
\item To change the number of decimal places shown, use the Options menu, and go to Rounding and check the appropriate box.
\item To Rename an object, right click on that object and choose Rename.
\item To change the viewing window in the Graphics screen, choose the right-most button, select zoom in, and right click and select the portion of the graph you'd like to view.
\item To construct the intersection point, choose the Point menu (second from the left in the Graphics window) and select Intersection. Chose the two objects you want to intersect.
\item To construct a tangent line, choose the fourth button, choose tangent line, and choose the point of tangency and object to be tangent to.
\end{itemize}
\medskip
{\large \bf Problems:}
\begin{enumerate}
\item Consider the function $f(x) = e^{-x/2}(x^2-2) - 1$. We would like to develop an algorithm that will enable us to estimate the values of $x$ for which $f(x) = 0$. The basic idea behind our approach is that we will make an initial ``guess" at a value of $c_0$ for which we think that $f(c_0) \approx 0$. From there, we will use this guess to execute a computation that leads us -- hopefully -- to a better estimation of the value of $x$ which $f(x) = 0$. Complete all the following steps in GeoGebra. Export your graph, include it at the end of this problem, and answer the final question.
\medskip
\begin{enumerate}
\item Construct a graph of the function $f(x) = e^{-x/2}(x^2-2) - 1$ in Geogebra. By typing the function into the input bar on the left of the screen. Once you hit enter, you should see a graph of that function as well as a nicely formatted version of your function listed in the Algebra section on the left.
\medskip
\item Construct a point on the graph that has $x = 1$ for its $x$-coordinate. Type in the next input space ``A0=(1,f(1))"
\medskip
\item Construct the tangent line to the graph of $y = f(x)$ at the point $A0$.
\medskip
\item Use the intersection tool to construct the point where the tangent line from (c) and the $x$-axis meet. (Geogebra will likely call this point ``A". If it does not, then you already have a point called ``A'' hiding somewhere, and this may mess you up later. Try to fix it, and if you have trouble let me know and I'll come try to help.)
\medskip
\item Construct a new point, $A1$, using the following input: ``A1 = (x(A),f(x(A)))''. $A1$ should lie on the graph of $f$ and have the same $x$-coordinate as point $A$.
\medskip
\item Again, construct the tangent line to the graph of $y = f(x)$ at the point $A1$, and construct the intersection point of this line with the $x$-axis.
\medskip
At this point, you should have a graph of the original function, two tangent lines (at points $A0$ and $A1$), and have constructed the two points where the two tangent lines intersect the $x$-axis. Zoom in on your plot to get a window that includes $x$-values from 0 to 4 and a range of $y$-values that includes the key parts of the figure. Include this image in your project write-up.
\medskip
\item Now, write 1-2 sentences to respond to these questions: ``{\it What do you think would happen if you found one more tangent line based on the $x$-coordinate of the intersection point you found in part (f) above? How might this tangent line direct us to an even better approximation of the nearest location where $f(x)$ crosses the $x$-axis?}''
\end{enumerate}
\medskip
\noindent The above work is the graphical representation of Newton's Method. Now, we want to get an idea of what's going on {\it algebraically}.
\medskip
\medskip
\item The idea behind Newton's Method is that a function is very much like its tangent line (also called its {\it linearization}) at points close to the point of tangency. Carefully complete each of the small steps outlined below to derive the recursive algebraic process that we call Newton's Method.
\medskip
\begin{enumerate}
\item Write down the general formula for $L_a(x)$, the linear approximation for the function $f(x)$ at the point $(a, f(a))$.
\medskip
\item We know this tangent line is similar to $y = f(x)$ near $x = a$. Since we want to eventually find the roots of the function $f$, we start by finding the root of $L(x)$. Use the formula above, and solve for $x$ when $L(x) = 0$ to find the root. (Remember that we cannot divide by 0, so there is an important assumption we're making here.) We will refer to this resulting expression of the root of the tangent line later as $N(a)$.
\medskip
\end{enumerate}
We can view $x=a$ as an estimate of the root of $f(x)$. This is exactly the process you completed in Problem \#1 when you constructed point $A$. If we view $x = a$ as our first estimate of the root of $f(x)$, and thus call it $a_1$, then this root of $L(x)$ is our second estimate, and we can call it $a_2$.
\medskip
\begin{enumerate}
\setcounter{enumii}{2}
\item Write a formula for $a_2$ in terms of $f$, $f'$, and $a_1$.
\medskip
\item We can continue this process indefinitely. Write a formula for the next estimate, $a_3$, in terms of $a_2$.
\medskip
\item Write a general formula for the $n^\text{th}$ estimate of the root of $f(x)$, $a_{n}$, in terms of the previous estimate, $a_{n-1}$.
\end{enumerate}
\medskip
\noindent Your formula in Problem \#2(e) is the recursive formula we seek. It is called recursive because each use of the formula depends on the outcome of the previous iteration. We now want to put this formula to use numerically.
\newpage
\item Complete the following steps in the Spreadsheet of the same GeoGebra sheet as your graphing work, and answer the questions in the final parts.
\medskip
\begin{enumerate}
\item In the spreadsheet, enter the text headings ``a'' and ``N(a)" (with quotes) in cells B1 and C1 (we skip using column ``A'' because of how ``A'' is being used in the points in the graphical view). In cell B2, enter your initial guess. We used $a_1 = 1$ in our initial work in \#1 above, and we'll do so here. That is, simply enter ``1" in cell B2. Your spreadsheet should look like this:
\includegraphics[scale = .4]{Lab2Picture1}
\item Now, in cell C2, we want to apply the function $N$ to the entry in cell B2. Write the formula you'll use below, and type that formula into cell B2 (starting with an $=$) and hit enter. The variable in your formula should be B2. If you did the work correctly, your spreadsheet should look like this:
\includegraphics[scale = .4]{Lab2Picture1a}
\item Because of the recursive nature of Newton's Method, the output of the function $N$ becomes the next input for $N$. That is, $a_2 = N(a_1)$. Therefore, above we want to let cell B3 be equal to what is in C2. Hence, we enter ``=C2'' in cell B3. After doing that, you can highlight cell C2 and drag it down to C3 to evaluate $N$ at the next guess. Doing so, your spreadsheet should look like this:
\includegraphics[scale = .4]{Lab2Picture2}
\item Now you can highlight and drag row 3 (cells B3 and C3) downward to iterate the process of Newton's Method. Do so for 5 additional rows.
\includegraphics[scale = .4]{Lab2Picture3}
\item In cell D1 type ``Root Estimates" (with quotes). In cell D2 type ``=(B2,0)" and highlight and drag it down to produce points for all your estimates. These points should appear in your graph as well, and your spreadsheet should look like:
\includegraphics[scale = .4]{Lab2Picture4}
\item What is your approximation of a value $x$ for which the given function $f(x)$ is zero? How accurate is your estimate? How do you know?
\end{enumerate}
\medskip
\medskip
\item By modifying your starting value for $a$, (that is, changing ``1'' to something else in cell B2 of the spreadsheet), determine accurate estimates for the other two roots of the function $f(x) = e^{-x/2}(x^2 - 2) - 1$. For each, provide evidence of your initial guess and the results of the spreadsheet (you can highlight portions of your spreadsheet and copy and paste them, take screen shots and crop them, or export from GeoGebra). Write a few sentences to summarize your overall findings for the roots of the function $f$, including discussion of how these computations align with the graph of $f$. You should also provide a graph of $f$ (hopefully with the different estimates marked as points) here in support of your observations.
\medskip
\item What would be the {\bf worst} possible choice for your first guess, $a_1$, with the function $f$ that we've been considering? Why? How does this match up with the formula we use in Newton's Method?
\medskip
\item Consider the function $g(x) = x^3 - 3x + 1$. Use Newton's Method to find approximations accurate to 10 decimal places for each of the roots of the function $g$. Include in your work a picture of the graph of $g$, results from your spreadsheet computations, and an overall written summary of your conclusions.
\medskip
\item In your own words, write a careful paragraph that explains the big ideas behind how Newton's Method works.
\bigskip
\bigskip
\end{enumerate}
\end{document}