diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /964/CH6/EX6.4 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '964/CH6/EX6.4')
-rwxr-xr-x | 964/CH6/EX6.4/6_4.sce | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/964/CH6/EX6.4/6_4.sce b/964/CH6/EX6.4/6_4.sce new file mode 100755 index 000000000..8648c3167 --- /dev/null +++ b/964/CH6/EX6.4/6_4.sce @@ -0,0 +1,19 @@ +//clc()
+//f(x) = exp(-x) - x
+//f'(x) = -exp(-x) - 1
+//f"(x) = exp(-x)
+xr = 0.56714329;
+//E(ti+1) = -f"(x)* E(ti) / 2 * f'(x)
+Et0 = 0.56714329;
+Et1 = -exp(-xr)* ((Et0)^2) / (2 * (-exp(-xr) - 1));
+disp("which is close to the true error of 0.06714329",Et1,"Et1 = ")
+Et1true = 0.06714329;
+Et2 = -exp(-xr)* ((Et1true)^2) / (2 * (-exp(-xr) - 1));
+disp("which is close to the true error of 0.0008323",Et2,"Et2 = ")
+Et2true = 0.0008323;
+Et3 = -exp(-xr)* ((Et2true)^2) / (2 * (-exp(-xr) - 1));
+disp("which is close to the true error",Et3,"Et3 = ")
+Et4 = -exp(-xr)* ((Et3)^2) / (2 * (-exp(-xr) - 1));
+disp("which is close to the true error",Et4,"Et4 = ")
+disp("Thus it illustratres that the error of newton raphson method for this case is proportional(by a factor of 0.18095) to the square of the error of the previous iteration")
+
|