1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Problem with Combining Simpson's 1/3 and 3/8 Rule(Matlab)

  1. Jun 25, 2016 #1
    1. The problem statement, all variables and given/known data
    ∫ 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?

    2. Relevant equations

    3. The attempt at a solution
    function I = simpson13(func, a, b, n)
    function I = simpson38(func, a, b, n)
    % input:
    % func= name of function to be integrated
    % a,b = integration limits
    % n = number of segments (default = 100)
    % Output:
    % I = integral estimate

    A = @(x) sin(x)^3
    % simpsons rule n = 5
    % from 1 to 6
  2. jcsd
  3. Jun 25, 2016 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    Yeah, it's called knowing the cardinal values of the sine function.

    BTW, x = 3 is only an approximation. What is sine (π)?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted