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.6/15_6.pdf | Bin 0 -> 6619 bytes 1332/CH15/EX15.6/15_6.sce | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100755 1332/CH15/EX15.6/15_6.pdf create mode 100755 1332/CH15/EX15.6/15_6.sce (limited to '1332/CH15/EX15.6') diff --git a/1332/CH15/EX15.6/15_6.pdf b/1332/CH15/EX15.6/15_6.pdf new file mode 100755 index 000000000..73991c137 Binary files /dev/null and b/1332/CH15/EX15.6/15_6.pdf differ diff --git a/1332/CH15/EX15.6/15_6.sce b/1332/CH15/EX15.6/15_6.sce new file mode 100755 index 000000000..48a656600 --- /dev/null +++ b/1332/CH15/EX15.6/15_6.sce @@ -0,0 +1,32 @@ +//Example 15.6 +//Taylor Method +//Page no. 510 +clc;clear;close; + +deff('y=f1(x,y)','y=x^2+y^2') +deff('y=f2(x,y)','y=2*x+2*y*f1(x,y)') +deff('y=f3(x,y)','y=2+2*f1(x,y)^2+2*y*f2(x,y)') +deff('y=f4(x,y)','y=6*f1(x,y)*f2(x,y)+2*y*f3(x,y)') +h=0.2; +for l=1:2 + a=0;y=0;x=0; + printf('\n---------------\nh = %g\n---------------\n',h) + for i=1:4 + x=a+(i-1)*h + k=0; + for j=1:4 + if j==1 then + k=k+(h^j)*f1(x,y)/factorial(j) + elseif j==2 + k=k+(h^j)*f2(x,y)/factorial(j) + elseif j==3 + k=k+(h^j)*f3(x,y)/factorial(j) + else + k=k+(h^j)*f4(x,y)/factorial(j) + end +end +y=y+k; +printf('\nx = %g\n\ny(%g) = %g\n\n',x,x+0.2,y) +end +h=h+0.2; +end -- cgit