Ask Your Question

Simplifying a simple rational function

asked 2015-11-11 19:21:58 +0200

Erel Segal-Halevi gravatar image

The following code:

simplify((d^(T + 1)-d)/d)


(d^(T + 1) - d)/d

Apparently, this should be simplified to:

d^T - 1

What am I doing wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-11-11 20:35:52 +0200

B r u n o gravatar image

updated 2015-11-11 20:38:10 +0200

For this expression, you can use simplify_rational() instead of simplify():

sage: var('d, T')
(d, T)
sage: f = (d^(T+1)-d)/d
sage: f.simplify_rational()
d^T - 1

Note that in this case you also have:

sage: f.expand()
d^T - 1

Note that in a more general case, the "most simplified" expression is obtained with the command simplify_full():

sage: f.simplify_full()
d^T - 1
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

1 follower


Asked: 2015-11-11 19:21:58 +0200

Seen: 2,224 times

Last updated: Nov 11 '15