From 1a1f0597e107cf1042511eb853f14524777a847e Mon Sep 17 00:00:00 2001 From: Terrell Date: Thu, 5 Oct 2017 20:03:55 -0400 Subject: [PATCH] added convergence table --- README.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5ac3b87..8e06c99 100644 --- a/README.md +++ b/README.md @@ -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) @@ -119,7 +119,7 @@ end root = xr; ``` -Part B +###Part B | solver | initial guess(es) | ea | number of iterations| | --- | --- | --- | --- | @@ -127,7 +127,7 @@ Part B |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; @@ -152,7 +152,6 @@ print('figure01','-dpng') #Problem 3 -``` ### Divergence of Newton-Raphson Method | iteration | x_i | approx error | @@ -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 |