Ask Your Question
0

$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

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

EconJohn gravatar image

updated 2020-07-17 14:35:24 -0500

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 flag offensive close merge delete

Comments

Hi @EconJohn I do not see x3 in eq ?

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

@ortollj sorry my bad edited

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

1 answer

Sort by ยป oldest newest most voted
1

answered 2020-07-17 14:35:43 -0500

ortollj gravatar image

updated 2020-07-17 14:39:16 -0500

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!

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

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

Seen: 100 times

Last updated: Jul 17