diff --git a/HW3/README.html b/HW3/README.html new file mode 100644 index 0000000..950e6d3 --- /dev/null +++ b/HW3/README.html @@ -0,0 +1,60 @@ + + +
+ + + +Create a new github repository called ‘roots_and_optimization’.
+Add rcc02007 and pez16103 as collaborators.
Clone the repository to your computer.
Copy your projectile.m
function into the ‘roots_and_optimization’ folder. Disable the plotting routine for the solvers
Use the four solvers falsepos.m
, incsearch.m
, newtraph.m
and mod_secant.m
to solve for the angle needed to reach h=1.72, with an initial speed of 1.5 m/s.
The newtraph.m
function needs a derivative, calculate the derivative of your function with respect to theta, dprojectile_dtheta.m
. This function should output d(h)/d(theta).
In your README.md
file, you will document the following under the heading # Homework #3
:
| solver | initial guess(es) | ea | number of iterations|
+| --- | --- | --- | --- |
+|falsepos | | | |
+|incsearch | | | |
+|newtraph | | | |
+|mod_secant | | | |
+convergence.png
and display the plot in your README.md
with:
README.md
provide a description of the files used to create the table and the convergence plot.The Newton-Raphson method and the modified secant method do not always converge to a solution. One simple example is the function f(x) = x*exp(-x^2). The root is at 0, but using the numerical solvers, newtraph.m
and mod_secant.m
, there are certain initial guesses that do not converge.
Calculate the first 5 iterations for the Newton-Raphson method with an initial guess of x_i=2.
Add the results to a table in the README.md
with:
### divergence of Newton-Raphson method
+
+| iteration | x_i | approx error |
+| --- | --- | --- |
+| 0 | 2 | n/a |
+| 1 | | |
+| 2 | | |
+| 3 | | |
+| 4 | | |
+| 5 | | |
+Commit your changes to your repository. Sync your local repository with github. Then copy and paste the “clone URL” into the following Google Form Homework #3