diff options
Diffstat (limited to '3588/CH5/EX5.1/EX5_1.sce')
-rw-r--r-- | 3588/CH5/EX5.1/EX5_1.sce | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/3588/CH5/EX5.1/EX5_1.sce b/3588/CH5/EX5.1/EX5_1.sce new file mode 100644 index 000000000..3a39983bf --- /dev/null +++ b/3588/CH5/EX5.1/EX5_1.sce @@ -0,0 +1,27 @@ +//Clearing console +clc +clear + +x = poly(0,"x") +//Intializing variables +x0 = 0 +x1 = 1 + +//Calculating constants in solution (Y = c*X) X-trial function +c = integrate('x*(x-1)*(10*x^2+5)','x',x0,x1)/integrate('x*(x-1)*2','x',x0,x1) + +//Calculating solution for given differntial equation +for t =1:11 + F(1,t) = c*(t-1)*(t-11)/100 +end +S = c*x*(x-1) +//Constructing x matrix +t = 0:0.1:1; + +//plotting solution +plot(t,F); +xtitle('solution','x','y(x)') + +printf('\nResults\n') +printf('\nSolution of the Differential Equation y(x) =') +disp(S) |