summaryrefslogtreecommitdiff
path: root/50/CH7/EX7.3
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /50/CH7/EX7.3
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '50/CH7/EX7.3')
-rwxr-xr-x50/CH7/EX7.3/ex_7_3.sce29
1 files changed, 29 insertions, 0 deletions
diff --git a/50/CH7/EX7.3/ex_7_3.sce b/50/CH7/EX7.3/ex_7_3.sce
new file mode 100755
index 000000000..6c8f5c1c5
--- /dev/null
+++ b/50/CH7/EX7.3/ex_7_3.sce
@@ -0,0 +1,29 @@
+// example 7.3
+// solve by shooting method;
+
+// u''=2*u*u';
+// u(0)=0.5; u(1)=1;
+
+// let -> U1(x)=du/dx;
+// U2(x)=d2u/dx2;
+
+// U(x)=[U1(x);U2(x)]
+
+// hence ;
+// dU/dx=f(x,U);
+
+h=.25;
+
+ub=[.5,1];
+
+up=[0:.1:1];
+
+x=0:h:1;
+
+deff('[w]=f(x,U)','w=[U(2); 2*U(1)*U(2)]')
+
+
+
+[U] = shooting(ub,up,x,f);
+
+// the solution obtained would show the values of u in the first collumn and their corresponding derivatives in the second collumn ; \ No newline at end of file