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/CH4/EX4.6/ex_4_6.sce | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 50/CH4/EX4.6/ex_4_6.sce (limited to '50/CH4/EX4.6/ex_4_6.sce') diff --git a/50/CH4/EX4.6/ex_4_6.sce b/50/CH4/EX4.6/ex_4_6.sce new file mode 100755 index 000000000..869b1f772 --- /dev/null +++ b/50/CH4/EX4.6/ex_4_6.sce @@ -0,0 +1,18 @@ +// example :4.6 +// caption : obtain the legrange linear interpolating polinomial + + +// 1) obtain the legrange linear interpolating polinomial in the interval [1,3] and obtain approximate value of f(1.5),f(2.5); +x0=1;x1=2;x2=3;f0=.8415;f1=.9093;f2=.1411; + +P13=legrangeinterpol (x0,x2,f0,f2) //in the range [1 ,3] + + +P12=legrangeinterpol (x0,x1,f0,f1) // in the range [1,2] + +P23=legrangeinterpol (x1,x2,f1,f2) // inthe range [2,3] + +// from P23 we find that ; where as exact value is sin(2.5)=0.5985; +disp('P(1.5)=0.8754'); +disp('exact value of sin(1.5)=.9975') +disp('P(2.5)=0.5252'); \ No newline at end of file -- cgit