       Use of Mathematica with Rule-based Equation Derivations

• To: mathgroup at smc.vnet.net
• Subject: [mg61914] Use of Mathematica with Rule-based Equation Derivations
• From: mmorriss at gcn.ou.edu
• Date: Fri, 4 Nov 2005 05:11:39 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Hi All - I'm a many-year user of mathematica, but have always had one
particular problem with it that I may have just simply missed reading

Mathematica Version: 5.2

Problem: I would like to develop a set of re-rewite rules to apply to the
Expected Value operator.  For example:

E[a x] = a E[x]  a -> constant, x -> variable
E[b + f[x]] = b + E[f[x]] , etc.

The issue is how does one using Mathematica distinguish a 'constant
variable (i.e. a and b)' from a variable 'variable' (i.e. 'x')? The head
of a, b and x is 'Symbol' and neither a, b nor x contain a number so I
can't use a_?NumberQ to identify it as a constant.

This actually goes to the wider question of how does one use Mathematica
for symbolic derviations where numbers are not actually substituted in the
derviation?

E.g. E[a + E[b x]] /. Rule2
out= a + b E[x] etc.

Thanks all - Mark Morrissey
University of Oklahoma

```

• Prev by Date: MiniMaxApproximation question
• Next by Date: Re: A Problem with Integrate
• Previous by thread: Re: MiniMaxApproximation question
• Next by thread: Re: Use of Mathematica with Rule-based Equation Derivations