I want to find the maximum(in fact just the value of the function at the max will do)
of a function that is of the form
F(x)=(int_-infty^x g(y) dy)^2-(int_-infty^x q(y) dy)
Taking the derivative one gets
g(x) int_-infty^x g(y) dy-q(x) int_-infty^x q(y) dy=0
The problem with this is that the LHS is not a monotonous function
and it may be complicated to locate all zeros and then check for the max.
One could take the second derivatives to check, but the function is not analytically integrable
I'm just curious if maxima could be of any help here.
I have done the (fortran) routines to compute the function, it's now a question of locating the maxima