I'm new to SageMath and I'm trying to see how complicated are the problems Sage can provide solutions to. So I tried to see whether Sage could solve identifiability problems. If we have a normal model, it's known that the model is identifiable, meaning that different values for the parameter space lead to different values of the likelihood function.
Now I tried to write a code to see whether Sage could provide me the right answer. Following wikipedia's first example, I wrote:
var('x, mu1, mu2, sigma1, sigma2')
assume(sigma1>0)
assume(sigma2>0)
solve((1/sigma1^2)*(x-mu1)^2 + log(sigma1)==(1/sigma2^2)*(x-mu2)^2+log(sigma2), mu1, sigma1)
Which returns me [ ]. What am I doing wrong? Or can't Sage solve such problems? I believe my mistake is in the statement, defining multiple variables, because if I write
var('x, mu1, mu2, sigma1, sigma2')
assume(sigma1>0)
assume(sigma2>0)
solve((1/sigma1^2)*(x-mu1)^2 + log(sigma1)==(1/sigma2^2)*(x-mu2)^2+log(sigma2), sigma1)
I get:
[sigma1^2 == -(mu1^2*sigma2^2 - 2*mu1*sigma2^2*x + sigma2^2*x^2)/(sigma2^2*log(sigma1) - sigma2^2*log(sigma2) - mu2^2 + 2*mu2*x - x^2)]
Thanks!