diff options
Diffstat (limited to '3588/CH6/EX6.8/EX6_8.sce')
-rw-r--r-- | 3588/CH6/EX6.8/EX6_8.sce | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/3588/CH6/EX6.8/EX6_8.sce b/3588/CH6/EX6.8/EX6_8.sce new file mode 100644 index 000000000..d5473fc71 --- /dev/null +++ b/3588/CH6/EX6.8/EX6_8.sce @@ -0,0 +1,23 @@ +//Clearing console +clc +clear + +//Intializing variables +r(1) = sqrt(3)/3 +r(2) = -sqrt(3)/3 +s(1) = sqrt(3)/3 +s(2) = -sqrt(3)/3 + +W(1) = 1 +W(2) = 1 +I = 0 + +//Gaussian quadrature Integration +for j =1:2 + for i =1:2 + I = I + W(i)*W(j)*((r(i))^3 -1)*(s(j)-1)^2 + end +end + +printf('\nResults') +printf('\nIntegration of given function I =%f',-I) |