Skip to content

Commit

Permalink
added convergence table
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrell committed Oct 6, 2017
1 parent 84672a6 commit 1a1f059
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ME3255 HW2

#Problem 2

Part A
###Part A

```MatLab
function [root,fx,ea,iter]=bisect(func,xl,xu,es,maxit,varargin)
Expand Down Expand Up @@ -119,15 +119,15 @@ end
root = xr;
```

Part B
###Part B

| solver | initial guess(es) | ea | number of iterations|
| --- | --- | --- | --- |
|falsepos | 100,1000 | 9.6376e-06 | 202 |
|mod_secant | 100,1000 | 5.9066e-06 | 24 |
|bisect | 100,1000 | 4.1212e-06 | 8 |

Part C
###Part C

```MatLab
cat_cable = @(T) T/10.*cosh(10./T*30)+30-T/10-35;
Expand All @@ -152,7 +152,6 @@ print('figure01','-dpng')

#Problem 3

```
### Divergence of Newton-Raphson Method

| iteration | x_i | approx error |
Expand All @@ -163,4 +162,14 @@ print('figure01','-dpng')
| 3 | 3.7422 | 5.7348 |
| 4 | 3.9375 | 4.9605 |
| 5 | 4.1182 | 4.3873 |
```

### Convergence of Newton-Raphson Method

| iteration | x_i | approx error |
| --- | --- | --- |
| 0 | 1.2 | n/a |
| 1 | 0.9826 | 22.1239 |
| 2 | 1.0000 | 1.7402 |
| 3 | 1.0000 | 0.0011 |
| 4 | 1.0000 | 0.0000 |
| 5 | 1.0000 | 0.0000 |

0 comments on commit 1a1f059

Please sign in to comment.