I wish to use closed Newton-Cotes with n=2, also known as Simpson's Rule to numerically integrate an improper integral.

If it matters the integrand is (cos(2x))/(x^1/3), integrating between x=0..1

I've tried a few different (but similar) code but to no avail. Here is some stuff I've tried:

1.

with(Student[NumericalAnalysis]):

with(Student[Calculus 1]):

Simp1 := ApproximateInt(cos(2*x)/x^(1/3), x = 0 .. 1, method = newtoncotes[2]);

This gives me an output message that says "Float(infinity)".

2.

with(Student[NumericalAnalysis]):

with(Student[Calculus 1]):

Simp2 := int(exp(-x)/sqrt(1-x), x = 0 .. 1);

This doesn't have Simpson's rule as an option.

I think I'm on the right track with my first try, since I guess it wasn't tecnically an error message, but I'm not sure how to alter the code accordingly to get a numerical value instead. Thanks for any help.