# Preface

This tutorial was made solely for the purpose of education and it was designed for students taking Applied Math 0330. It is primarily for students who have very little experience or have never used *Mathematica* and programming before and would like to learn more of the basics for this computer algebra system.
As a friendly reminder, don't forget to clear variables in use and/or the kernel. The *Mathematica* commands in this tutorial are all written in bold black font,
while *Mathematica* output is in normal font.

Finally, you can copy and paste all commands into your *Mathematica* notebook, change the parameters, and run them because the tutorial is under the terms of the GNU General Public License
(GPL). You, as the user, are free to use the scripts for your needs to learn the *Mathematica* program, and have
the right to distribute this tutorial and refer to this tutorial as long as
this tutorial is accredited appropriately. The tutorial accompanies the
textbook *Applied Differential Equations.
The Primary Course* by Vladimir Dobrushkin, CRC Press, 2015; http://www.crcpress.com/product/isbn/9781439851043

Return to computing page for the second course APMA0340

Return to computing page for the fourth course APMA0360

Return to Mathematica tutorial for the first course APMA0330

Return to Mathematica tutorial for the second course APMA0340

Return to Mathematica tutorial for the fourth course APMA0360

Return to the main page for the course APMA0330

Return to the main page for the course APMA0340

Return to the main page for the course APMA0360

## Glossary

# Collect

The

**Collect**command allows the user to direct

*Mathematica*to collect like powers of a variable together. We begin with a simple mathematical example:

*Mathematica*can help us write the expression \( yx^2+x^2+3y^2 x+xy^4+(x+1+y)^2 . \) Upon expansion we see this is equivalent to :

*x*powers as follows:

*Mathematica*collect powers of

*y*:

**Example: **
Suppose that in a region of wilderness, the function \( f(x,y) = 1 + x^2 - 2 y + x y + 10 y^2 -
7 x y^2 + x^2 y^2 + 2 y^3 + x y^3 + x^2 y^3 \) models the topography where *f*(*x,y*) is the height and *x* and *y* indicate the location. Suppose you want to create a simple formula for the height of the wilderness as a function of *y* at several points *x* = 𝑎.
We can accomplish this most easily by using *Mathematica* to collect the *y* terms.

g[y_] = Collect[f[a, y], y]

Return to Mathematica page

Return to the main page (APMA0330)

Return to the Part 1 (Plotting)

Return to the Part 2 (First Order ODEs)

Return to the Part 3 (Numerical Methods)

Return to the Part 4 (Second and Higher Order ODEs)

Return to the Part 5 (Series and Recurrences)

Return to the Part 6 (Laplace Transform)

Return to the Part 7 (Boundary Value Problems)