[Date Index] [Thread Index] [Author Index]
Simple questions about Mathematica
1. Suppose I solve some equations and get a complicated expression containing multiple identical elements such as sqrt(a^2+b^2). To make the expression smaller, clearer, and easier to deal with, I want to substitute say R=sqrt(a^2+b^2) everywhere in the main expression and have R available as a symbol from then on. I see nothing in Help or anywhere else about how to do this. But it's such a standard thing to do that there must be an easy answer. 2. I'm not sure how a "batch" file is suppposed to be prepared and fed to Mathematica. That is, I want to prepare a bunch of operations and variables in advance and feed it in, preferably having mathematica give me line-by-line output as it would if I were typing each line in one by one. As a new user I really need answers to these questions. Thanks in advance for any information.