Compute the integral integral25 e3xx5 pi x3dx using Matlabs

Compute the integral: integral-2^5 e^3x/(x^5 - pi x^3)dx using Matlab\'s quad & quadl commands. Make sure you get as many significant digits as possible for both computations

Solution




% MATLAB script starts here

clc;
clear all;


f = @(x) exp(3*x)./(x.^5- pi*x.^3);

Q = quad(f,2,5);

Q_l = quadl(f,2,5);


format long ;

sprintf(\' integration result using quad is\')
disp(Q);

sprintf(\' integration result using quadl is\')
disp(Q_l);


% MATLAB script ends here

And the output in the command prompt looks like this


ans =

integration result using quad is

    6.867946254721177e+002


ans =

integration result using quadl is

    6.867946254162334e+002

 Compute the integral: integral-2^5 e^3x/(x^5 - pi x^3)dx using Matlab\'s quad & quadl commands. Make sure you get as many significant digits as possible fo

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site