Ask Your Question
0

How to simplify expression with fractional exponents?

asked 2013-04-09 14:24:12 -0500

kevinfat gravatar image

Is there a way to have Sage recognize that e^(2/3) times e^(1/3) in the below will simplify to just the variable e. Is there a type that can handle this? Obviously using a PolynomialRing in the code below won't work.

R.<a,e> = PolynomialRing(QQ)
p1 = (a+e^(1/3))
p2 = e^(2/3)
p1*p2
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-04-09 14:55:07 -0500

kcrisman gravatar image

Do you mean something like this?

sage: var('a,e')
(a, e)
sage: p1 = (a+e^(1/3))
sage: p2 = e^(2/3)
sage: p1*p2
(a + e^(1/3))*e^(2/3)
sage: expand(_)
a*e^(2/3) + e
edit flag offensive delete link more

Comments

In general, unless you intend to work specifically with polynomials in an abstract algebraic sense, just use these "symbolic variables".

kcrisman gravatar imagekcrisman ( 2013-04-09 16:03:15 -0500 )edit

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: 2013-04-09 14:24:12 -0500

Seen: 371 times

Last updated: Apr 09 '13