Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4673

Re: avoid combining like terms in algebraic expression

From David Bailey <dave@removedbailey.co.uk>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: avoid combining like terms in algebraic expression
Date 2011-08-31 10:12 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j3l1f3$bvf$1@smc.vnet.net> (permalink)
References <j3ieh3$sda$1@smc.vnet.net>

Show all headers | View raw


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

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

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

csiph-web