summaryrefslogtreecommitdiff
path: root/75/CH5/EX5.5/ex_5.sce
diff options
context:
space:
mode:
Diffstat (limited to '75/CH5/EX5.5/ex_5.sce')
-rwxr-xr-x75/CH5/EX5.5/ex_5.sce10
1 files changed, 5 insertions, 5 deletions
diff --git a/75/CH5/EX5.5/ex_5.sce b/75/CH5/EX5.5/ex_5.sce
index 541b7d0a3..cf8514ce0 100755
--- a/75/CH5/EX5.5/ex_5.sce
+++ b/75/CH5/EX5.5/ex_5.sce
@@ -1,4 +1,4 @@
- // PG (261)
+// PG (261)
// Example 1
@@ -9,11 +9,11 @@ deff('[y]=fppp(x)','y=(105*sqrt(x))/8')
deff('[y]=fpppp(x)','y=(105*x^(-0.5))/16')
x0=0;
-x1=1;
-x=x0:x1;
+xn=1;
+x=x0:xn;
// True value
-I = integrate('x^(7/2)','x',x0,x1)
+I = integrate('x^(7/2)','x',x0,xn)
// Using Trapezoidal rule
@@ -43,4 +43,4 @@ x2=x0+2*h;
x3=x0+3*h;
x4=x0+4*h;
I2 = h*(f(x0)+4*f(x1)+2*f(x2)+4*f(x3)+f(x4))/3
- E2 = -h^4*(xn-x0)*fpppp(0.5)/180
+ E2 = -h^4*(xn-x0)*fpppp(0.5)/180 \ No newline at end of file