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 --- 50/CH5/EX5.30/ex_5_30.sce | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 50/CH5/EX5.30/ex_5_30.sce (limited to '50/CH5/EX5.30') diff --git a/50/CH5/EX5.30/ex_5_30.sce b/50/CH5/EX5.30/ex_5_30.sce new file mode 100755 index 000000000..17f88a29d --- /dev/null +++ b/50/CH5/EX5.30/ex_5_30.sce @@ -0,0 +1,18 @@ +// example 5.30 +// evaluate the given double integral using the simpsons rule; + +// I= double integral f(x)=1/(x+y) in the range x=[1,2],y=[1,2]; +// 1) +h=.5; +k=.5; +deff('[w]=f(x,y)','w=1/(x+y)') + +I=(1/16)*[{f(1,1)+f(2,1)+f(1,2)+f(2,2)}+2*{f(1.5,1)+f(1,1.5)+f(2,1.5)+f(1.5,2)}+4*f(1.5,1.5)] + +// 2) +h=.25; +k=.25; +deff('[w]=f(x,y)','w=1/(x+y)') + +I=(1/64)*[{f(1,1)+f(2,1)+f(1,2)+f(2,2)}+2*{f(5/4,1)+f(3/2,1)+f(7/4,1)+f(1,5/4)+f(1,3/2)+f(1,7/4)+f(2,5/4)+f(2,3/4)+f(2,7/4)+f(5/4,2)+f(3/2,2)+f(7/4,2)}+4*{f(5/4,5/4)+f(5/4,3/2)+f(5/4,7/4)+f(3/2,5/4)+f(3/2,3/2)+f(3/2,7/4)+f(7/4,5/4)+f(7/4,3/2)+f(7/4,7/4)}] + -- cgit