∫ sin^3(x) dx evaluated from 1 to 6
I'm pretty what I have is correct, but I got the answer by guessing that the bounds split at 3.
Is there a formula to calculate where the bounds break?
The Attempt at a Solution
function I = simpson13(func, a, b, n)
function I = simpson38(func, a, b, n)
% func= name of function to be integrated
% a,b = integration limits
% n = number of segments (default = 100)
% I = integral estimate
A = @(x) sin(x)^3
% simpsons rule n = 5
% from 1 to 6