# Maximize the solution of an equation containing an integral?

Posted 2 months ago
188 Views
|
0 Replies
|
0 Total Likes
|
 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: