# $e^\left({\frac{-alog(x1)}{a+b}+\frac{alog(x1)}{a+b}+\frac{alog(x2)}{a+b}-\frac{alog(x3)}{a+b}}\right)$ does not simplify in sage

I'm running the following code in sage but the answer is not simplified all the way:

eq=e^(-a*log(x1)/(a+b)+a*log(x1)/(a+b)+a*log(x2)/(a+b)-a*log(x3)/(a+b))
eq
Out: [e^(a*log(x2)/(a + b) - a*log(x3)/(a + b))]
show(eq)


$$e^{\left(\frac{alog(x2)}{a + b} - \frac{alog(x3)}{a + b}\right)}$$

what I wanted to get is along the lines of $$\left(\frac{x_2}{x_3}\right)^\frac{1}{a+b}$$

I've tried using simplify_full() with no success. any help is appreciated.

edit retag close merge delete

Hi @EconJohn I do not see x3 in eq ?

( 2020-07-17 21:23:16 +0200 )edit

( 2020-07-17 21:35:50 +0200 )edit

Sort by ยป oldest newest most voted

I propose :

var('a,b,x,x1,x2,x4')
eq=e^(-a*log(x1)/(a+b)+a*log(x1)/(a+b)+a*log(x2)/(a+b)-a*log(x4)/(a+b))
show(eq.simplify_log())


SageMath doc on symbolic expression

but I admit that me too , I am a bit lost in all these different simplifying functions!

more

## Stats

Seen: 106 times

Last updated: Jul 17 '20