Message Boards Message Boards

Maximize the solution of an equation containing an integral?

Posted 5 years ago

I have to find {x,y} which makes the integral

NIntegrate[(1/(E^((x^2 - 2*x*d + d^2 + y^2 )/(2*(d + r^2)))*
          (Sqrt[d]*(d + r^2)))), {d, 0, Infinity}]

equal to Pi^0.5/Ry. Among all the possible solutions, I am interested in the one which maximises y, with the constraint y>0. I have also a good starting point for y. The problem has to be solved for different values of r, say from 0 to 20, and Ry, say from 10^-7 to 10^7. I have set the problem in this way:

f2[x_?NumberQ, y_?NumberQ, r_?NumberQ] := 
  NIntegrate[(1/(E^((x^2 - 2*x*d + d^2 + y^2 )/(2*(d + r^2)))*
            (Sqrt[d]*(d + r^2)))), {d, 0, Infinity}];
solu2 = Table[
  FindMaximum[{y, f2[x, y, r] == Sqrt[\[Pi]]/Ry, y > 0}, {x, y}], {r, 
   ranger}, {Ry, rangeRy}]

Unfortunately, NIntegrate fails to converge to the solution for all the values of r and Ry. Any help?

Attachments:
POSTED BY: robby piscopo
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