Question: Problem 4. (Module 8) Given two integrals 1. * 24e-2xdx, h = 0.2 Sot V1 + x2 dx, h = 0.3 2. 1) Compute the

Problem 4. (Module 8) Given two integrals 1. * 24e-2xdx, h = 0.2 Sot V1 + x2 dx, h = 0.3 2. 1) Compute the true integrals analytically using Matlab symbolic operations. 2) Evaluate the integrals using the self-developed Matlab programs that use a) Midpoint rule b) Trapezoidal rule 3) Find the percentage relative error in each case. Note: Matlab program Mod8_Example5.m can be used; however it is work only for Midpoint rule, and it needs to be adapted to the Trapezoidal rule described in Module 8 (do not use the embedded Matlab function "trap="). Put your answer in this field. Represent the result with 8 decimal places. 19 integral True numerical value of integral [_true = Midpoint rule: I= Error(%) = Trapezoidal rule Error(%) = 2nd integral True numerical value of integral I true = Midpoint rule: I= Error(%) = Trapezoidal rule I= Error(%) = 7 Paste your complete (working) Matlab program here (use 10pt font) $Hint: to display the result with required decimal places use disp('h I_true I trapt Error!) &fprintf('91.35 $1.8 1.BE $1.4f ',h, I_true, I_trap, Error)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
