From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1332/CH15/EX15.9/15_9.sce | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 1332/CH15/EX15.9/15_9.sce (limited to '1332/CH15/EX15.9/15_9.sce') 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 -- cgit