Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #4656 > unrolled thread
| Started by | Phil Hammond <phil@hammondo.org> |
|---|---|
| First post | 2011-08-30 10:37 +0000 |
| Last post | 2011-08-31 10:12 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
avoid combining like terms in algebraic expression Phil Hammond <phil@hammondo.org> - 2011-08-30 10:37 +0000
Re: avoid combining like terms in algebraic expression David Bailey <dave@removedbailey.co.uk> - 2011-08-31 10:12 +0000
| From | Phil Hammond <phil@hammondo.org> |
|---|---|
| Date | 2011-08-30 10:37 +0000 |
| Subject | avoid combining like terms in algebraic expression |
| Message-ID | <j3ieh3$sda$1@smc.vnet.net> |
I'm generating problems for basic algebra students, and I would like to present expressions with like terms (e.g. 3x + 4x) and have the students combine them in their answers. Could somebody help me persuade Mathematica to refrain from combining them automatically? Thanks-
[toc] | [next] | [standalone]
| From | David Bailey <dave@removedbailey.co.uk> |
|---|---|
| Date | 2011-08-31 10:12 +0000 |
| Message-ID | <j3l1f3$bvf$1@smc.vnet.net> |
| In reply to | #4656 |
On 30/08/2011 11:37, Phil Hammond wrote:
> I'm generating problems for basic algebra students, and I would like
> to present expressions with like terms (e.g. 3x + 4x) and have the
> students combine them in their answers. Could somebody help me
> persuade Mathematica to refrain from combining them automatically?
>
> Thanks-
>
It is not completely clear what you mean by 'generating' - because of
course, you can type anything you want into a notebook. However, perhaps
the following is what you want:
HoldForm[3 x]+HoldForm[4 x]
3x + 4x
If the constants come from some other calculation then they would need
injecting inside the HoldForm expressions:
c3=3;
c4=4;
With[{c3=c3,c4=c4},HoldForm[c3 x]+HoldForm[c4 x]]
Note that these expression contains HoldForm invisibly within them, so
it would not be suitable to naively copy/paste into another Mathematica
expression.
David Bailey
http://www.dbaileyconsultancy.co.uk
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web