Message Boards Message Boards

[?] Get table and List plot for different range of values?

Posted 6 years ago

I am numerically integrating a function x^2 from -5 to 5

NIntegrate[x^2, {x, -10, 10}, Method -> "LocalAdaptive"]

Between this -5 to 5, i want to find many integrand values from various ranges, say integrand value from -5 to -4.9, integrand value from -4.9 to -4.8, integrand value from -4.8 to -.4.7, ............. till integrand value from 4.9 to 5.

Is there a way i can represent it in a table, or array, or manipulate and then plot or list plot it?

POSTED BY: Mujtaba Mozumder
4 Replies
Table[{lb + 0.05, NIntegrate[x^2, {x, lb, lb + .1}]}, {lb, -10, 
  9.9, .1}]
POSTED BY: Frank Kampas

Worked perfectly. Thank you so much

POSTED BY: Mujtaba Mozumder
Table[NIntegrate[x^2, {x, lb, lb + .1}], {lb, -10, 9.9, .1}]
POSTED BY: Frank Kampas

Thank you. But when i try to plot it,it doesn't give me the desired axes. Is there a way i can plot it with the output integrand values in the y axis and the various ranges corresponding to those integrating values (-10 to -9.9, -9.9 to -9.8 ....) in the x axis?

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

Group Abstract Group Abstract