Ask Your Question

Revision history [back]

Definite Integral of loglikelihood function multipled by Gaussian

I am trying to calculate

definite_integral((-ln(2*pi)-ln(sigma)-1/2*((x-mu)/sigma)^2)*f, x, -infinity, infinity)



using sagemath.

I have done from sage.symbolic.integration.integral import definite_integral

And I have also done


however I obtain this error

ValueError: Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(muprime>0)', see `assume?` for more details)

Is muprime positive, negative or zero?

However muprime can be positive, negative or zero. So I don't know how to proceed.