summaryrefslogtreecommitdiff
path: root/50/CH4/EX4.31
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /50/CH4/EX4.31
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '50/CH4/EX4.31')
-rwxr-xr-x50/CH4/EX4.31/ex_4_31.sce23
1 files changed, 23 insertions, 0 deletions
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