Results 1 to 10 of 10

Math Help - Software to calculate integrals numerically

  1. #1
    Newbie
    Joined
    Nov 2008
    Posts
    9

    Software to calculate integrals numerically

    I need to confirm my own numerical calculation of the following integral with another package - possibly one that calculates to more decimal places. If someone can point me to such software or confirm the result I'd be grateful.

    4\;\int\limits_{ - r}^{ + r} {\left( {R + x} \right)} \sqrt {r^2  - x^2 } \cos ^{ - 1} \left( {\frac{{R - r}}<br />
{{R + x}}} \right)\;dx

    Integral=2553.871 when r=5 & R=27 (angles in radians)

    I've derived some possible equations for the integral but they are all giving results that are less than 1% from the numerical results, so I can't tell if the equations are wrong or the numerical answers are wrong.

    For example, one equation generates an answer of 2551.2952, another 2553.5994.

    If someone could plug in other values of r & R and supply the results, that would also be great.
    Last edited by Monkfish; January 6th 2009 at 01:32 PM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    10
    I used my computer program to get 3131.5686.

    EDIT: I programmed the wrong function, the poster had the correct answer.
    Last edited by ThePerfectHacker; January 6th 2009 at 02:21 PM.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Nov 2008
    Posts
    9
    That seems a little bit out. I forgot to mention that angles are in radians (in case you used degrees). Can you double check please. I'm quite sure the result is around 2550 (just by measuring the volume the integral generates). Please don't forget that the trig function is ARCCOS.

    Your result seems multiplied by 1-r/R or possibly ARCCOS((R-r)/(R+r)).
    Last edited by Monkfish; January 6th 2009 at 01:48 PM.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,922
    Thanks
    1762
    Awards
    1
    According to MathCad the value is 2553.873.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Nov 2008
    Posts
    9
    That's great Plato! Could you please plug in the following values...

    r=15 R=81
    r=1 R=1.1
    r=5 R=10
    r=5 R=1,000
    r=5 R=1,000,000

    This will help me confirm the full range.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,922
    Thanks
    1762
    Awards
    1
    \begin{array}{rclcr}<br />
   r &\vline &  R &\vline &  { {\int {} }}  \\\hline<br />
   {15} &\vline &  {81} &\vline &  {68954.576}  \\<br />
   1 &\vline &  {1.1} &\vline &  {10.225}  \\<br />
   5 &\vline &  {10} &\vline &  {1629.010}  \\<br />
   5 &\vline &  {10^3 } &\vline &  {15097.521}  \\<br />
   5 &\vline &  {10^6 } &\vline &  {477028.661}  \\ \end{array}
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Nov 2008
    Posts
    9
    Thanks very much Plato. These tie up nicely with the results from my own program.

    68954.5169
    10.224921
    1629.00924
    15097.509
    477028.233
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Member
    Joined
    May 2006
    Posts
    244
    Quote Originally Posted by Monkfish View Post
    I need to confirm my own numerical calculation of the following integral with another package - possibly one that calculates to more decimal places. If someone can point me to such software or confirm the result I'd be grateful.

    4\;\int\limits_{ - r}^{ + r} {\left( {R + x} \right)} \sqrt {r^2 - x^2 } \cos ^{ - 1} \left( {\frac{{R - r}}<br />
{{R + x}}} \right)\;dx

    Integral=2553.871 when r=5 & R=27 (angles in radians)

    I've derived some possible equations for the integral but they are all giving results that are less than 1% from the numerical results, so I can't tell if the equations are wrong or the numerical answers are wrong.

    For example, one equation generates an answer of 2551.2952, another 2553.5994.

    If someone could plug in other values of r & R and supply the results, that would also be great.
    Midpoint rule with h=0.0001 gives integral ~= 2553.8710

    .
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Member
    Joined
    May 2006
    Posts
    244
    Quote Originally Posted by Plato View Post
    \begin{array}{rclcr}<br />
r &\vline & R &\vline & { {\int {} }} \\\hline<br />
{15} &\vline & {81} &\vline & {68954.576} \\<br />
1 &\vline & {1.1} &\vline & {10.225} \\<br />
5 &\vline & {10} &\vline & {1629.010} \\<br />
5 &\vline & {10^3 } &\vline & {15097.521} \\<br />
5 &\vline & {10^6 } &\vline & {477028.661} \\ \end{array}
    What are the settings used for the numerical integrator? Do we know what error limit the integrator is using? It looks like these values are good for six significant digits.
    .
    Last edited by Constatine11; January 8th 2009 at 05:48 AM.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Newbie
    Joined
    Nov 2008
    Posts
    9
    What are the settings used for the numerical integrator? Do we know what error limit the integrator is using? It looks like these values are good for six significant digits.
    The program I wrote divided the interval into 10,000,000 slices, but 1,000,000 gave the same result to 7 significant figures. I don't know how many significant figures the programming language I used works with, but it might be 20. I just read the manual and it states double-precision floating point accuracy.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. My hardware and software fails to calculate this.
    Posted in the Math Software Forum
    Replies: 11
    Last Post: January 17th 2012, 06:57 AM
  2. Numerically Equivalent Sets
    Posted in the Discrete Math Forum
    Replies: 13
    Last Post: May 12th 2010, 05:58 PM
  3. Numerically integrating a non-linear DE
    Posted in the Differential Equations Forum
    Replies: 0
    Last Post: May 3rd 2010, 03:23 AM
  4. evaluating limits numerically.
    Posted in the Calculus Forum
    Replies: 5
    Last Post: May 15th 2009, 06:55 PM
  5. Limits...numerically
    Posted in the Calculus Forum
    Replies: 7
    Last Post: September 6th 2007, 04:49 PM

Search Tags


/mathhelpforum @mathhelpforum