I would like an answer checked that I have found for the following problem.

\[ y = 5 \int^1_0 \frac{1}{1+x^2} dx \]

using

\[ \int^1_0 f(x) dx = (b-a)[\frac{f(a)+f(b)}{2}] \]

\[ 5*((1-0)*[\frac{{\frac{1}{1+0^2}+\frac{1}{1+1^2}}}{2}])\]

\[5*0.75 = 3.75\]

Have I solved this correctly?

I have tried to chack this in matlab with the code below but I am not getting this answer which now I am not sure which is incorrect.

X = 0:0.5:1;

Y = 5*(1./X.^2)

Z = trapz(X,Y)

Thanks for your time