Ask Your Question

# $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

## Comments

Hi @EconJohn I do not see x3 in eq ?

( 2020-07-17 14:23:16 -0500 )edit

@ortollj sorry my bad edited

( 2020-07-17 14:35:50 -0500 )edit

## 1 answer

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

## Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

## Stats

Asked: 2020-07-17 13:13:18 -0500

Seen: 100 times

Last updated: Jul 17