# 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 Mathematica tutorial for the first course APMA0330

Return to Mathematica tutorial for the second course APMA0340

Return to the main page for the course APMA0330

Return to the main page for the course APMA0340

## Glossary

# Solving Equations

*Mathematica* is not only powerful program for symbolic mathematics, it is also capable of handling sophisticated numerical calculations. In fact, almost all the symbolic operations have a numerical counterpart. *Mathematica* uses a special letter **N** for numerical evaluations. One of the most common problems encountered in numerical mathematics is solving equations. They are defined in *Mathematica* by a double equal sign. The basic command in *Mathematica* for solving equations is **Solve**. However, for numerical evaluations, we need other procedures.

Suppose that we need to solve the algebraic equation

for some smooth functions *f(x)* and *g(x)*.
* Mathematica* has two basic commands, **FixedPoint** and **NSolve**, to solve these equations numerically. More details can be found in the
first three sections of Part III. Recall that** FixedPoint[f,expr]**
starts with expr, then applies f repeatedly until the result no longer
changes. **NSolve** works when restricted to reals:

*x = cos x*are presented for illustration:

N @ Reduce[{x == Cos[x], -1 < x < 1}, x]

FindRoot[x == Cos[x], {x, 0}]

FixedPoint[Cos[#] &, 0.5] (* 0.5 is the initial guess *)

Example: Suppose we want to find a square root of 4.5. First, we apply
**FixedPoint** command:

or 2.121320343559643 . Another option is

which is actually the same value as Newton's method provides: 2.121320343559643

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)