Ask Your Question

Radical in the denominator?

asked 2010-10-10 13:00:07 +0200

Mike Witt gravatar image

Is there any way I can get a general complex number to display with the radical in the denominator, rather than having it rationalized? For example (1+i)/sqrt(2).

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2010-10-10 13:23:43 +0200

With the patches recently merged to Sage 4.6.alpha3, you can do this:

sage: sqrt(2).power(-1, hold=True)*(1+i)
(I + 1)/sqrt(2)

If you want to try it out before the release, you can find the new alpha here:

or you can upgrade with

./sage -upgrade
edit flag offensive delete link more


If I understand correctly what you're saying, that would allow me to specifically enter a number in that form, and keep that specific number from being changed before being displayed, right? But what I'm looking for is a more general "form" ... simplify_??? ... Does that make any sense?

Mike Witt gravatar imageMike Witt ( 2010-10-10 14:20:03 +0200 )edit

One of the automatic evaluations pynac performs is to clear radicals from the denominator, as in 1/sqrt(2) -> 1/2*sqrt(2). I'm afraid it's not possible to disable this in general.

burcin gravatar imageburcin ( 2010-10-10 15:16:56 +0200 )edit

OK, I understand. The technique above may still have some value for me. I didn't have any success getting the alpha version to build, but I'll check it out when 4.6 gets released.

Mike Witt gravatar imageMike Witt ( 2010-10-10 15:28:46 +0200 )edit

Mike, if you have the time, could you give us information about your build problem with 4.6.alpha3 on the sage-release mailing list ( )?

Mitesh Patel gravatar imageMitesh Patel ( 2010-10-10 18:29:56 +0200 )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


Asked: 2010-10-10 13:00:07 +0200

Seen: 688 times

Last updated: Oct 10 '10