I have two functions fn[x,y,z] which is in integral form and I have another function gn[x,y] which is also in integral form included with fn[x,y,z] as well.
m1[x_] := (2 (x - 1))/x;
m2[x_, y_] := (x (2 - x y))/(2 (x - 1) y);
fn[x_, y_, z_]:=
NIntegrate[E^(-(z/(t m1[x])) - t/m2[x, y])/(t m1[x] m2[x, y]), {t, 0, 1}] +
E^(-(1/m2[x, y]))/m1[x] - (E^(-(z/m1[x]) - 1/m2[x, y]) (-1 + E^(z/m1[x])))/m1[x];
gn[x_, y_] := y/2 NIntegrate[Log[1 + z] fn[x, y, z], {z, 0,\[Infinity]}];
I want to find x and y which maximize gn[x,y]. I tried following to calculate x and y but they did not give solutions as they are keep on running.
x /. {#2 & @@ NMaximize[{gn[x, y], 2 > x > 1,1 > y > 0}, {x, y}]}[[1, 1]];
y/. {#2 & @@ NMaximize[{gn[x, y], 2 > x > 1,1 > y > 0}, {x, y}]}[[1, 2]];
Can someone help me to find x and y which maximize gn[x,y] using an alternative method?

NMaximizeevaluates your functions many times, and each evaluation takes a lot of time, because it involves a numerical integration. A possible solution is to pre-calculatefnon a grid of values, construct anInterpolatingFunctionfrom these data, and run the maximization function on that. – yohbs Aug 31 '15 at 16:13xandytill at least 4 decimal places, and then I may have huge grid. Thats why I am looking for any precise in-built function is available in mathematica. Further, I dont know how I can use interpolating function. – Frey Aug 31 '15 at 16:43