Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
roots_and_optimization/README.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
51 lines (39 sloc)
1.44 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Homework #4 | |
a. File collar_potential_energy.m solves for the total potential energy of the collar on the rod given a position and angle. | |
b. Solved using HW4_part_b_script.m | |
c. Solved using HW4_part_c_script.m - image sent via email | |
# Homework #3 | |
i. Compare the number of iterations that each function needed to reach an | |
accuracy of 0.00001%. Include a table in your README.md with: | |
``` | |
| solver | initial guess(es) | ea | number of iterations| | |
| --- | --- | --- | --- | | |
|falsepos | | | | | |
|bisect | | | | | |
|newtraph | | | | | |
|mod_secant | | | | | |
``` | |
ii. Compare the convergence of the 4 methods. Plot the approximate error vs the | |
number of iterations that the solver has calculated. Save the plot as | |
`convergence.png` and display the plot in your `README.md` with: | |
`![Plot of convergence for four numerical solvers.](convergence.png)` | |
iii. In the `README.md` provide a description of the files used to create the | |
table and the convergence plot. | |
### divergence of Newton-Raphson method | |
| iteration | x_i | approx error | | |
| --- | --- | --- | | |
| 0 | 2 | n/a | | |
| 1 | 2.1429 | .0667 | | |
| 2 | 2.2651 | .0539 | | |
| 3 | 2.3730 | .0455 | | |
| 4 | 2.4705 | .0395 | | |
| 5 | 2.5597 | .0349 | | |
### convergence of Newton-Raphson method | |
| iteration | x_i | approx error | | |
| --- | --- | --- | | |
| 0 | .2 | n/a | | |
| 1 | -0.8870 | 1.2255 | | |
| 2 | .8671 | 2.0349 | | |
| 3 | 2.9885 | 0.7132 | | |
| 4 | 3.0479 | 0.0195 | | |
| 5 | 3.1047 | 0.0183 | |