kjetil b halvorsen

MaplePrimes Activity

These are questions asked by kjetil b halvorsen

This must be a simple question. I have a simple expression:

test := -2+exp(theta)+exp(-theta)

and want to get that factored as a polynomial in the variable exp(-theta).

That is of course easy by hand, but the same problem appears frequently, as a part in further simplifications. There must be an easy way to do it, but I cannot find it. 




Look at the following code:

M1 := (t,lambda1,k,lambda2) -> exp( -(1/2)*(log(1-2*lambda1*t) + k*log(1-2*lambda2*t)) )

int( diff(M1(z,2,9,1/2),z)/sqrt(abs(z)),z=-infinity..0 )/GAMMA(1/2) 



returns:    -4.682354481-5.587737200*I


which cannot be true. 

The following integral is obviously positive, but Maple returns 0:  (Maple 2017)

assume(gamma1>0, gamma2>0 , mu1, 'real', mu2, 'real')'
int( 1/sqrt( Pi^2 * gamma1 * gamma2 * (1+((x-mu1)/gamma1)^2) * (1+((x-mu2)/gamma2)^2) ), x=-infinity..infinity )

(This is the Bhattacharyya coefficient between two cauchy distributions). Numerical integration works.


Page 1 of 1