Group Abstract Group Abstract

Message Boards Message Boards

[?]  Plot for numerical integration?

Posted 8 years ago

How can I plot a graph and interval table for the following function?

 NIntegrate[0.00159155/(x^2 + 0.000025^2), {x, -10, 10, 0.2}, Method ->
 {"MultiPanelRule", Method -> {"TrapezoidalRule", "Points" -> 2, "RombergQuadrature" -> False}, 
 "Panels" -> 50}, MaxRecursion -> 0] // Quiet
Attachments:
POSTED BY: Mujtaba Mozumder
8 Replies
POSTED BY: Michael Rogers

An additional guess:

{int, {evals}} = 
  Reap[NIntegrate[
     0.00159155/(x^2 + 0.0000001 x + 0.000025^2), {x, -10, 10, 0.2}, 
     Method -> {"TrapezoidalRule", "Points" -> 51, 
       "RombergQuadrature" -> False}, 
     EvaluationMonitor :> 
      Sow[{x, 0.00159155/(x^2 + 0.0000001 x + 0.000025^2)}, "EVAL"], 
     MaxRecursion -> 0] // Quiet, {"EVAL"}];

ListPlot@evals

enter image description here

Just what i was looking for!

POSTED BY: Mujtaba Mozumder

My pleasure!

How can I do Reap NIntegrate and list plot for the same function 0.00159155/(x^2 + 0.0000001 x + 0.000025^2) using simpson's rule or boole's rule? The one before was trapezoidal rule.

Attachments:
POSTED BY: Mujtaba Mozumder

Thank you

POSTED BY: Mujtaba Mozumder

Want a table of intervals NIntegrate used

POSTED BY: Mujtaba Mozumder

By graph, I assume you mean the graph of the integrand 0.00159155/(x^2 + 0.000025^2) from x == -10 to x == 10:

Plot[0.00159155/(x^2 + 0.000025^2), {x, -10,10}]

I'm not sure what it means to "plot a...interval table." Do you just want a table of intervals NIntegrate used, or do you want to mark the intervals on on the plot in some way?

The 0.2 in {x, -10, 10, 0.2} will be interpreted by NIntegrate as a point to be treated as a singularity in the integrand. Did you mean it in the same way it is used in Table, to indicate the difference between successive steps?

POSTED BY: Michael Rogers
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard