Question: A matter of trust?

July 06 2010 afeddersen 444
Maple 14

0

Consider the following expression:

sCARA4 := -ln(-(mu/sigma^2)^(mu^2/(mu-sigma^2))*(sigma^2/mu)^(mu^2/(mu-sigma^2))+(sigma^2/mu)^(mu^2/(mu-sigma^2))*((exp(phi)*sigma^2+mu-sigma^2)*exp(-phi)/sigma^2)^(mu^2/(mu-sigma^2))+1)/phi;

Now try to find out whether the first derivative to mu is positive for all positive mu, phi and sigma, except for some rare exceptions (e.g. sigma^2=mu).

diff(%,mu);

Since 'is' is not a satisfying option, I used 'Explore' to check that, for mu=1.0 .. 100, sigma=1.0 .. 100, phi=1.0 .. 10.

Now, e.g. Explore outputs for mu=29.38, phi=1.0, sigma=1.0 the value -2.499130625 and thus a negative value, which was not expected. Maple also explores a negative result for some other constellations.

Anyway, when you examine the expression sCARA4 in more detail, you can simplify it by hand (because Maple is somehow not able to recognize that the first term in the logarithm equals -1 and therefore it cancels with the +1 at the end):

sCARA4_handjob:=-ln((sigma^2/mu)^(mu^2/(mu-sigma^2))*((exp(phi)*sigma^2+mu-sigma^2)*exp(-phi)/sigma^2)^(mu^2/(mu-sigma^2)))/phi;

If you then apply diff(%,mu) to that simplified expression, the output is completely different!

First of all, it is always positive (as expected, except for the mentioned exceptions).

Second, the value for mu=29.38, phi=1.0, sigma=1.0 is 0.9991907709.

Well now I ask myself if I neglected anything, or if this is finally a matter of trust in Maple´s ability to differentiate and/or Explore correctly?

Thanks for clarification.

Please Wait...