Question #5581

use Matlab for solving the following integral:
integral(-1 to 4)((1+5e^(-25x^2)/(1+x^2/25))dx.

Expert's answer

> use Matlab for solving the following integral:

> integral(-1 to 4)((1+5e^(-25x^2)/(1+x^2/25))dx.

Run the following MATLAB code:

f=@(x)(1+5*exp(-25*x.^2)./(1+x.^2/25));

quad(f,-1,4)

This will give the output:

ans =

6.7710

> integral(-1 to 4)((1+5e^(-25x^2)/(1+x^2/25))dx.

Run the following MATLAB code:

f=@(x)(1+5*exp(-25*x.^2)./(1+x.^2/25));

quad(f,-1,4)

This will give the output:

ans =

6.7710

## Comments

## Leave a comment