Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #3557 > unrolled thread
| Started by | paulvonhippel at yahoo <paulvonhippel@yahoo.com> |
|---|---|
| First post | 2011-07-07 11:47 +0000 |
| Last post | 2011-07-08 08:56 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Grouping terms under the radical paulvonhippel at yahoo <paulvonhippel@yahoo.com> - 2011-07-07 11:47 +0000
Re: Grouping terms under the radical David Bailey <dave@removedbailey.co.uk> - 2011-07-08 08:56 +0000
| From | paulvonhippel at yahoo <paulvonhippel@yahoo.com> |
|---|---|
| Date | 2011-07-07 11:47 +0000 |
| Subject | Grouping terms under the radical |
| Message-ID | <iv46bq$fbl$1@smc.vnet.net> |
This must be a classic question. When I input Sqrt[(2 n)] Mathematica displays the output as Sqrt[2] Sqrt[n] -- i.e., both 2 and n are under their own radical. The display of output doesn't change if I impose the assumption that n > 0. This is fine from a mathematical point of view, but it looks unconventional when pasted into a paper. It seems to me most authors would keep the 2 and the n under a common radical -- how can I get Mathematica to do the same? Thanks!
[toc] | [next] | [standalone]
| From | David Bailey <dave@removedbailey.co.uk> |
|---|---|
| Date | 2011-07-08 08:56 +0000 |
| Message-ID | <iv6gnt$s52$1@smc.vnet.net> |
| In reply to | #3557 |
On 07/07/2011 12:47, paulvonhippel at yahoo wrote: > This must be a classic question. When I input > Sqrt[(2 n)] > Mathematica displays the output as Sqrt[2] Sqrt[n] -- i.e., both 2 and > n are under their own radical. The display of output doesn't change if > I impose the assumption that n> 0. > > This is fine from a mathematical point of view, but it looks > unconventional when pasted into a paper. It seems to me most authors > would keep the 2 and the n under a common radical -- how can I get > Mathematica to do the same? > > Thanks! > > These issues are a bit tricky, because there are certain algebraic operations that happen automatically inside Mathematica - so any attempt to rearrange an expression is instantly undone. One answer is to apply a transformation rule to alter your expression using HoldForm to block the reverse transformation: Sqrt[2 n] /. (a_^n_) (b_^ n_) -> HoldForm[a b]^n This works well, but with two caveats: 1) The output can't be used in a further calculation unless the HoldForm is removed. 2) Some kinds of pasting operations seem to paste with the HoldForm made explicit again, as I just discovered by trying to paste the result into this email! However, you can certainly convert the expression into an image, and paste that - which is probably what you would need to do anyway to keep the expression structure. Variants of the above construction can be used to improve the appearance of many expressions, for example, humans tend to prefer 1/Sin[a] to Csc[a], which Mathematica 'prefers'. David Bailey http://www.dbaileyconsultancy.co.uk
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web