# Plotting multivariable integration

If I have a multivariable integration like

NIntegrate[x^2 + y^2, {x, 1, 5}, {y, 6, 10}]


But I need to plot its result in terms of x . Then how to do it ?

-
The result of the integration is a constant independent of x,y ? –  b.gatessucks Aug 26 '12 at 17:25
What you have there is a constant... –  Ｊ. Ｍ. Aug 26 '12 at 17:25
Do you mean something like With[{int = Integrate[x^2 + y^2, {y, 6, 10}, {x, 0, t}]}, Plot[int, {t, 0, 10}]]? –  rm -rf Aug 26 '12 at 17:27
Exactly !!! Thanks man! Trying that @R.M –  Mush Aug 26 '12 at 18:11

Data = Integrate[x^2 + y^2, {x, 0, t}, {y, 6, 10}]; Plot[Data, {t, 0, 6}]

and this would be your Graphic :

-

DSaad's answer above is correct. You can use symbolic integration to get the formula. The solution when using numeric integration (NIntegrate instead of Integrate) is more complicated. You must use ?NumericQ to delay the evaluation of the numeric integral:

myFunction[t_?NumericQ]:= NIntegrate[x^2 + y^2, {x, 0, t}, {y, 6, 10}];
Plot[myFunction[t], {t, 0, 6}]


To see why ?NumericQ is needed here, please see this.

-
I assume you meant NIntegrate, not Integrate in the definition of myFunction? –  rcollyer Jun 6 '13 at 18:47
yes. Sorry about that. –  Searke Jun 7 '13 at 19:12