[Date Index]
[Thread Index]
[Author Index]
Re: trying to "simplify" very large output
*To*: mathgroup at smc.vnet.net
*Subject*: [mg83092] Re: trying to "simplify" very large output
*From*: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
*Date*: Sat, 10 Nov 2007 03:43:48 -0500 (EST)
*Organization*: The Open University, Milton Keynes, UK
*References*: <fh1btf$an7$1@smc.vnet.net>
Basjsmit wrote:
> When I used Mathematica to solve a certain expression, the output was
> extremely large, somewhere around 10 000 characters. When I looked more
> closely at the output, I noticed certain frases kept repeating. I havent
> found anything in the help, but Im wondering if there is a function that can
> replace those frases with a variable and set that variable once. An example:
>
> t-> -(y z-v x Cos[k]^2-v x Sin[k]^2)/(z^2-x^2 Cos[k]^2-x^2 Sin[k]^2)-1/2
> \[Sqrt]((4 (y z-v x Cos[k]^2-v x Sin[k]^2) ........
>
> becomes:
>
> A = y z-v x Cos[k]^2-v x Sin[k]^2
> B = z^2-x^2 Cos[k]^2-x^2 Sin[k]^2
> t-> -A / B -1/2 \[Sqrt]((4 A ........
>
> Thanks in advance, Bas
>
> PS: just curious, is there a name for the proces I described above?
Transformation rules and replacement operators are your friends here.
You should familiarize yourself with the following set of tutorials,
available in the documentation center
tutorial/TransformationRulesAndDefinitionsOverview
or online at
http://reference.wolfram.com/mathematica/tutorial/TransformationRulesAndDefinitionsOverview.html
Regards,
--
Jean-Marc
Prev by Date:
**Re: $UserBaseDirectory**
Next by Date:
**Re: Can't abort a loop with Print inside (V6)**
Previous by thread:
**Re: trying to "simplify" very large output**
Next by thread:
**Optimizing fixed point iteration**
| |