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.31/ex_4_31.sce | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 50/CH4/EX4.31/ex_4_31.sce (limited to '50/CH4/EX4.31') diff --git a/50/CH4/EX4.31/ex_4_31.sce b/50/CH4/EX4.31/ex_4_31.sce new file mode 100755 index 000000000..117c4dfb9 --- /dev/null +++ b/50/CH4/EX4.31/ex_4_31.sce @@ -0,0 +1,23 @@ +// example 4.31 +// obtain the linear polinomial approximation to the function f(x)=x^3 + +// let P(x)=a0*x+a1 + +// hence I(a0,a1)= integral (x^3-(a0*x+a1))^2 in the interval [0,1] + +printf('I=1/7-2*(a0/5+a1/4)+a0^2/3+a0*a1+a1^2') +printf('dI/da0 = -2/5+2/3*a0+a1=0') + +printf('dI/da1 = -1/2+a0+2*a1=0') + +// hence + +printf('[2/3 1;1 2]*[a0 ;a1]=[2/5; 1/2]') + +// solving for a0 and a1; + +a0=9/10; +a1=-1/5; +// hence considering the polinomial with intercept P1(x)=(9*x-2)/10; + +// considering the polinomial approximation through origin P2(x)=3*x/5; \ No newline at end of file -- cgit