Results 1 to 2 of 2

Thread: simpson's 1/3rd rule

  1. #1
    Mar 2010

    simpson's 1/3rd rule

    Hello everyone, I am trying to write a program on simpson's 1/3rd rule.
    But I am stuck with a problem which even a high school student should know.I am trying to write the program for the integration of the integrand which is
    y=(log (sin x))^2
    from 4 to 5.2
    Now the problem is I cant use the value 4 or whatever, in place of x in the equation since x should be in degrees.So I am converting 4 to degrees by multiplying 4 with 180/3.14 i.e.,

    4 * 180/3.14 =229.18 degrees
    Now I am confused if this is the right way or not.
    Can anyone help me out at the earliest.
    THANKS in advance.....
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member
    Jan 2010
    If whatever programming language you are using expects the input to be a value in degrees, then yes, you're doing it correctly. However both Java and C expect it in radians, so you should check to be certain what the programming language expects.

    Also, I'd suggest using more digits of pi because there's no reason to round to 2 decimal places when a computer is doing the calculations.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Simpson's rule, did I do it right?
    Posted in the Calculus Forum
    Replies: 6
    Last Post: Jun 21st 2010, 03:34 PM
  2. Replies: 0
    Last Post: Oct 20th 2008, 07:12 PM
  3. simpson's rule
    Posted in the Calculus Forum
    Replies: 2
    Last Post: May 17th 2008, 09:18 AM
  4. Trapezoid Rule/Simpson's Rule
    Posted in the Calculus Forum
    Replies: 1
    Last Post: May 16th 2007, 06:52 PM
  5. Replies: 3
    Last Post: Aug 31st 2006, 09:08 AM

Search Tags

/mathhelpforum @mathhelpforum