I'm trying to find the point where the maximum of my function occurs. Because the function does not yield trivial expressions of derivatives, I can't just differentiate and find the root. I'm trying to find an alternative method and I'm not aware of any. Any hint would be greatly appreciated.
Context: the function is positive definite, defined for x in $[0,\infty]$. It has a bell-shape, but is non-symmetrical.
Sidenote: I do have a general expression for the values of its moments, of all orders. I was hoping that using the order 1 moment (mean, in a distribution sense) I would get it, but because the function is non-symmetrical, the mean would differ from the max. So is there a method, that I may not be aware of, which allows finding where the maximum occurs, using the moments (or something else for that matter)?
Numerical answer (assuming you have good numerical precision on your computer): exponential search followed by bisection.
Details:
Part 1: Set $c = 1$; compare $f(c)$ to $f(2c)$. If the latter is smaller, you're done; if not, double $c$ and repeat.
At this point, your max lies between $a=0$ and $c$.
Part 2: You have a max somewhere between $a$ and $c$; you'd like to narrow it down. Let $A = f(a)$ and $C = f(c)$. Let $\phi \approx 1.618...$ denote the Golden Ratio, and let $b = (\phi-1)a + (2-\phi)c \approx 0.618a + 0.382b$, and let $B = f(b)$. Because $f$ "has a bell shape" (which I take to mean that the maximum is unique), and $a < b < c$, the value $B$ should be greater than either $A$ or $C$, or something's terribly wrong.
You have a triple $(a, b, c)$ of domain values.
Repeat until $a$ and $c$ are close enough to satisfy you: Pick $d = a + (c-b)$.
If $D = f(d)$ is greater than $B$, proceed with the triple $(a', b', c') = (b, c, d). $
Otherwise, proceed with the triple $(a', b', c') = (a,b,c). $
In each case, the distance $c' - a'$ diminishes by at least a quarter, so that eventually $c'-a'$ will be arbitrarily small.
This is called "Golden Section Search".