Finding maxima of a function

1. May 27, 2013

BinBinBinBin

1. The problem statement, all variables and given/known data

I have been trying to find the value of x that maximizes the function is section 2.

z is a variable distributed using a standard normal distribution i.e. can vary between -∞ and ∞, but generally is between -4 and 4. m varies between 0 and 1. c varies the same way as z.

x is always greater than c (so the function is always real).

2. Relevant equations

http://www4b.wolframalpha.com/Calculate/MSP/MSP6341gbhe843gi5189e300002d76b658d53h3hd0?MSPStoreType=image/gif&s=45&w=271.&h=47 [Broken].

http://www.wolframalpha.com/input/?...qrt((x-c)/m))*(erf(z/sqrt(2))-erf(x/sqrt(2)))

3. The attempt at a solution

I basically attempted to differentiate it (which is fine), and it gives me a really complicated solution. I set this to zero (to find the turning point), and am having trouble solving that equation. I was able to find specific values of this maxima by setting the other variables: z, m, c to specific values. For example,

http://www.wolframalpha.com/input/?...2))*(erf(0.5/sqrt(2))-erf(x/sqrt(2))),+maxima

Sorry, this isn't exactly homework, but for a research project I'm working on in college. Any help/guidance will be greatly appreciated.

Last edited by a moderator: May 6, 2017
2. May 27, 2013

Staff: Mentor

If it is not homework, there is no guarantee that there is a nice, analytic solution.

You can simplify the problem a bit: Ignore the constant prefactor of sqrt(pi/2), substitute x/sqrt(2) by another variable and do the same for z, c and m.

This should lead to something like
$$y'=\sqrt{\frac{x'-c'}{m'}} \left( erf(z') - erf(x') \right)$$

A maximum of y is a maximum of y^2 as well, so you can square the whole expression and look for a maximum of this. Even if there is no analytic solution, it could be easier to analyze numerically.