Skip to main content
Tweeted twitter.com/StackMma/status/1234584530687799299
edited tags
Link
bbgodfrey
  • 62.1k
  • 18
  • 92
  • 160
edited tags
Link
bbgodfrey
  • 62.1k
  • 18
  • 92
  • 160
typo
Source Link

I have an integral which doesn't give a closed definite expression. The command

Integrate[x DiracDelta[r x - y] Exp[1/g^2 {Cos[x2 - x] + Cos[x2] + Cos[y+x2]}], {x, 0, 2 Pi}, {y, 0, 2 Pi}, {x2, -Pi, Pi}]

returns the expression itself. Therefore I evaluate this numerically using NIntegrate in order to understand the behaviour of the integral with $r$ and $g^2$.

In this situation my preferred way is to to obtain plots of the integral with respect to $g^2$ for a fixed $r$, and also with $r$ for a fixed $g^2$. How do I combine PlotPlot and NIntegrateNIntegrate together and get a plot for the same over some values for $r$ and $g^2$? In other words, I would need to iterate the NIntegrateNIntegrate, and construct a list of points so as to plot on the graph. How do I achieve that?

I have an integral which doesn't give a closed definite expression. The command

Integrate[x DiracDelta[r x - y] Exp[1/g^2 {Cos[x2 - x] + Cos[x2] + Cos[y+x2]}], {x, 0, 2 Pi}, {y, 0, 2 Pi}, {x2, -Pi, Pi}]

returns the expression itself. Therefore I evaluate this numerically using NIntegrate in order to understand the behaviour of the integral with $r$ and $g^2$.

In this situation my preferred way is to to obtain plots of the integral with respect to $g^2$ for a fixed $r$, and also with $r$ for a fixed $g^2$. How do I combine Plot and NIntegrate together and get a plot for the same over some values for $r$ and $g^2$? In other words, I would need to iterate the NIntegrate, and construct a list of points so as to plot on the graph. How do I achieve that?

I have an integral which doesn't give a closed definite expression. The command

Integrate[x DiracDelta[r x - y] Exp[1/g^2 {Cos[x2 - x] + Cos[x2] + Cos[y+x2]}], {x, 0, 2 Pi}, {y, 0, 2 Pi}, {x2, -Pi, Pi}]

returns the expression itself. Therefore I evaluate this numerically using NIntegrate in order to understand the behaviour of the integral with $r$ and $g^2$.

In this situation my preferred way is to to obtain plots of the integral with respect to $g^2$ for a fixed $r$, and also with $r$ for a fixed $g^2$. How do I combine Plot and NIntegrate together and get a plot for the same over some values for $r$ and $g^2$? In other words, I would need to iterate NIntegrate, and construct a list of points so as to plot on the graph. How do I achieve that?

added 2 characters in body
Source Link
kirma
  • 19.1k
  • 1
  • 55
  • 95
Loading
Source Link
Loading