I’m using Mathematica 8 to find an analytic solution to the max of an expression. When I use the Maximize command to try to find a solution, it just repeats what I entered, implying that Mathematica doesn’t know how to do it. I’ve narrowed down the problem to this: it seems like if there is an exponent that is a parameter, Maximize doesn’t work. Here’s an example. This is the likelihood function from a Bernoulli trial, where a and b are the successes and failures.
Maximize[{t^a*(1 - t)^b, {t >= 0, t <= 1, a > 0, b > 0}}, {t}]
What I would like to get as a solution is a/(a+b) in this case. If I provide constants like 3 and 2 instead of a and b then it finds the solution.
Is there a different way to specify the expression or the constraints so that Mathematica can find a maximum to expressions with exponents that are parameters? I feel like there’s something I’m missing because this is so simple.
I’ve been playing with it, i.e. moving conditions, changing expression form, removing conditions, and I can’t get
Maximizeto behave, either. However, this can be solved directly, as followswhich gives, as you said,
{{t -> a/(a + b)}}. SometimesReducecan be used to help understand why a function likeMaximizemisbehaves by giving a more complete picture of the solution space. It is invoked likeSolve, as followsgiving
which isn’t all that helpful, in this case.