summaryrefslogtreecommitdiff
path: root/260/CH13/EX13.1/13_1.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /260/CH13/EX13.1/13_1.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '260/CH13/EX13.1/13_1.sce')
-rw-r--r--260/CH13/EX13.1/13_1.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/260/CH13/EX13.1/13_1.sce b/260/CH13/EX13.1/13_1.sce
new file mode 100644
index 000000000..848a82c15
--- /dev/null
+++ b/260/CH13/EX13.1/13_1.sce
@@ -0,0 +1,20 @@
+//Eg-13.1
+//pg-522
+
+clear
+clc
+
+//Given equation dy/dx = x. Hence F'(x) = 1 and F''(x) = 0
+
+//In the taylor series expnsion, if we write y0 in place of y(x0), we have
+// y(1) = y1 = y(x0+h) = y0 + hx0 + h^2/2
+
+x0 = 0;
+y0 = 0; //Initial condition
+
+h = 1; //taking the value ourself
+
+y1 = y0 + h*x0 + h^2/2;
+
+printf('The value of y at x = 1 is %f\n',y1)
+printf(' This is the exact solution since the higher derivatives starting from second order derivative of F vanish\n') \ No newline at end of file