Message Boards Message Boards

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

GROUPS:

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
Answer
6 months ago
Table[NIntegrate[x^2, {x, lb, lb + .1}], {lb, -10, 9.9, .1}]
POSTED BY: Frank Kampas
Answer
6 months ago

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
Answer
6 months ago
Table[{lb + 0.05, NIntegrate[x^2, {x, lb, lb + .1}]}, {lb, -10, 
  9.9, .1}]
POSTED BY: Frank Kampas
Answer
6 months ago

Worked perfectly. Thank you so much

POSTED BY: Mujtaba Mozumder
Answer
6 months ago

Group Abstract Group Abstract