pdf(color)

Symbolic and Numeric Calculations
File Input and Output
Mathematica has a powerful array of functions that solve equations symbolically and ways to simplify expressions. Many
people use Mathematica because it removes the tedium of doing algebra with pencil and paper---and perhaps more
importantly it doesn't make errors! However, one frustrating aspect is getting Mathematica to represent an expression in
exactly the form you desire. Sometimes it is possible with patience, practice, and skill---and sometimes you have to give
up and accept that the form of the expression will not be ``neat and compact.''
0
Operations on Polynomials, Rational Expressions,
and Simplification of Expressions
A good way to gain familiarity with Mathematica's operations to do symbolic algebra is to look though the categories in the
Built-in Functions section in the Help Browser. Look though the names of functions under Algebraic Computation--they
have names that are fairly indicative of their purpose.
PaulENomeal = H1 + 2 a + 3 x + 4 zL ^ 4
H1 + 2 a + 3 x + 4 zL4
FatPEN = Expand@PaulENomealD
1 + 8 a + 24 a2 + 32 a3 + 16 a4 + 12 x + 72 a x + 144 a2 x + 96 a3 x + 54 x2 +
216 a x2 + 216 a2 x2 + 108 x3 + 216 a x3 + 81 x4 + 16 z + 96 a z + 192 a2 z + 128 a3 z +
144 x z + 576 a x z + 576 a2 x z + 432 x2 z + 864 a x2 z + 432 x3 z + 96 z2 + 384 a z2 +
384 a2 z2 + 576 x z2 + 1152 a x z2 + 864 x2 z2 + 256 z3 + 512 a z3 + 768 x z3 + 256 z4
Factor@FatPEND
H1 + 2 a + 3 x + 4 zL4
PaulinX = Collect@FatPEN, xD
1 + 8 a + 24 a2 + 32 a3 + 16 a4 + 81 x4 + 16 z + 96 a z + 192 a2 z +
128 a3 z + 96 z2 + 384 a z2 + 384 a2 z2 + 256 z3 + 512 a z3 + 256 z4 +
x3 H108 + 216 a + 432 zL + x2 I54 + 216 a + 216 a2 + 432 z + 864 a z + 864 z2 M +
x I12 + 72 a + 144 a2 + 96 a3 + 144 z + 576 a z + 576 a2 z + 576 z2 + 1152 a z2 + 768 z3 M
The coefficient of x 2
Coefficient@PaulinX, x, 2D
54 + 216 a + 216 a2 + 432 z + 864 a z + 864 z2
Rewrite as a polynomial in x, but simplify the coefficients individually
2
PaulSpiffedUp = Sum@
Simplify@Coefficient@PaulinX, x, iDD x ^ i, 8i, 0, 20<D
81 x4 + 108 x3 H1 + 2 a + 4 zL + 54 x2 H1 + 2 a + 4 zL2 + 12 x H1 + 2 a + 4 zL3 + H1 + 2 a + 4 zL4
Simplify@PaulSpiffedUpD
H1 + 2 a + 3 x + 4 zL4
Rational Expressions
Hx + yL
Hx - yL
RashENell =
x-y
x+y
+
+
Hx - yL
Hy + xL
x+y
x-y
Apart@RashENellD
-2 -
2x
-x + y
+
2x
x+y
Together@RashENellD
2 Ix2 + y2 M
Hx - yL Hx + yL
Apart@Together@RashENellDD
-2 -
2x
-x + y
+
2x
x+y
Numerator@Together@RashENellDD
2 Ix2 + y2 M
Simplify@RashENellD
2 Ix2 + y2 M
x2 - y2
Factor@RashENellD
2 Ix2 + y2 M
Hx - yL Hx + yL
Lecture-04.nb
Simplfiying Expressions with Square Roots
One common hurdle is getting Mathematica to remove roots:
RootBoy =
Hx + yL2
Hx + yL2
Simplify@RootBoyD
Hx + yL2
„ Note in the following statement that "x Œ Reals" means "x is a real number" and "&&" is the
"Logical And" operator.
Simplify@RootBoy, x œ Reals && y œ RealsD
Abs@x + yD
Simplify@RootBoy, x ¥ 0 && y ¥ 0D
x+y
Simplify@RootBoy, x < 0 && y < 0D
-x - y
Brute force; clever , but not a good idea follows:
RootBoy ê. Sqrt@Hexpr_L ^ 2D Ø expr
x+y
0
Calculus
0
Solving Equations
0
Numerical Solutions
0
File Input and Output
0
Using Packages