Sorry, this content is no longer available

Ask Your Question
0

How to simplify expression with fractional exponents?

asked 11 years ago

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
Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 11 years ago

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
Preview: (hide)
link

Comments

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

kcrisman gravatar imagekcrisman ( 11 years ago )

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: 11 years ago

Seen: 880 times

Last updated: Apr 09 '13