Question: Locating maximum for function in two dimensions

Hi,

I've got the following equation, which I am plotting for the range g=0.1E-3..5E-3 and h=0..10E-3

"First:=Int(Int(((2*L)/(x^2+(L/2)^2+(h-z)^2)^(3/2)),z=(-L/2)..(L/2)),x=(g/2)..((g/2)+L)):
Second:=Int(Int(((2*h+L)/(x^2+y^2+(h+(L/2))^2)^(3/2)),y=(-L/2)..(L/2)),x=(g/2)..((g/2)+L)):
Third:=Int(Int(((-2*h+L)/(x^2+y^2+(h-(L/2))^2)^(3/2)),y=(-L/2)..(L/2)),x=(g/2)..((g/2)+L)):
HorB[x]:=(B[r]/(4*Pi))*(First+Second+Third);"

The constants I am using are:

B[r]:=1.43;
L:=5E-3;

I would like to be able to find the location of the maximum for this expression (HorB[x]) (in particular the h-value, as it would appear that this is constant throughout (I belive it should be 2.5)). 

I've spent hours searching the internet and have tried several different methods, such as solve, LPSolve, QPSolve and Maximize, but none have given me numerical values for the location of my maximum.

Any help on this would be greatly appreciated

Thanks in advance

Stephen

Please Wait...