The function $f$ as written at the top of your question is odd in x (basically you're just integrating Sinh), so your mean $f$ vanishes integrating over $-\frac{L}{2} \le x\le \frac{L}{2}$. Everything else is along for the ride.
The numerical expression you're plotting is averaging Abs[Sinh[x]]
which is even. That's fine and can still be done analytically.
In essence your calculation looks like:
meanAbsSinhX[L_, G_] = Integrate[Sqrt[Sinh[x/G]^2], {x, -L/2, L/2}]/L;
meanf[const_, G_, j_, L_] := Abs[const j G /Cosh[L/(2 G)]] meanAbsSinhX[L, G]
We can compare this with numerical integration on human readable values:
meanf[1, 1, 1, 1] // N
0.226362
NIntegrate[ Abs[Sinh[x]/Cosh[1/2]], {x, -1/2, 1/2}]
0.226362
And you can reproduce your above plot with:
Plot3D[meanf[-(6.699719*10^-6) , g, j, 100*10^-6] // Evaluate, {j,
1.*10^9, 1.*10^11}, {g, 1.*10^-6, 10.*10^-6},ColorFunction -> None]
I should point out -- I have absolutely no way of knowing whether your numbers make sense, or if this is even the value you want to be plotting. The good news is your expression isn't very complicated and can be debugged analytically.
Sinh[]
andCosh[]
. Also, why isL
not specified in your code? $\endgroup$R
? $\endgroup$