diff options
Diffstat (limited to '1332/CH15/EX15.9/15_9.sce')
-rwxr-xr-x | 1332/CH15/EX15.9/15_9.sce | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/1332/CH15/EX15.9/15_9.sce b/1332/CH15/EX15.9/15_9.sce new file mode 100755 index 000000000..ec1387d75 --- /dev/null +++ b/1332/CH15/EX15.9/15_9.sce @@ -0,0 +1,14 @@ +//Example 15.9
+//Trapezium Method
+//Page no. 516
+clc;clear;close;
+deff('y=f(x,y)','y=x*y^2')
+y=1;
+h=0.2;
+y2=poly(0,'y2')
+for i=1:2
+ x=(i-1)*h;
+ x1=x+h
+ y1=roots(-y2+y+h*(f(x,y)+f(x1,y2))/2)
+ printf('\n Y(%i) = %g or %g\n',i,y1(1),y1(2))
+end
\ No newline at end of file |