# 9.4 Symbolic vs Numeric Methods

## 9.4 Symbolic vs Numeric Methods

Mathematical computation can happen in two main ways. We can work with symbols, such as $x$, $y$, fractions, equations, and formulas. We can also work with numbers, such as decimals, measurements, and approximations.

These two styles are called symbolic methods and numeric methods.

### Symbolic methods

A symbolic method keeps the mathematical expression in exact form. It does not immediately turn everything into decimals.

For example, consider

$$
\frac{1}{3} + \frac{1}{6}.
$$

A symbolic computation gives

$$
\frac{1}{2}.
$$

This answer is exact. No information has been lost.

Symbolic methods are also useful when working with variables. For example, if we simplify

$$
2x + 3x,
$$

we get

$$
5x.
$$

This does not give one numerical answer. Instead, it gives a simpler expression that works for every value of $x$.

### Numeric methods

A numeric method works with actual numerical values. These values are often decimals.

For example,

$$
\frac{1}{3} \approx 0.3333
$$

and

$$
\frac{1}{6} \approx 0.1667.
$$

Adding them gives

$$
0.3333 + 0.1667 = 0.5000.
$$

This is close to $\frac{1}{2}$, but it depends on how many decimal places we use. Numeric methods are useful when we need practical answers, measurements, or simulations.

### A simple comparison

Suppose we want to solve

$$
x^2 = 2.
$$

A symbolic answer is

$$
x = \sqrt{2}
$$

or

$$
x = -\sqrt{2}.
$$

This is exact.

A numeric answer is approximately

$$
x \approx 1.41421
$$

or

$$
x \approx -1.41421.
$$

This is easier to use in measurement or computation, but it is only approximate.

### When symbolic methods help

Symbolic methods are useful when we care about exact structure.

For example, the formula

$$
(a + b)^2 = a^2 + 2ab + b^2
$$

works for all values of $a$ and $b$. It explains a general pattern. A numeric method could test the formula with examples, but symbolic reasoning proves the relationship in general.

Symbolic methods are common in algebra, calculus, logic, and proof.

### When numeric methods help

Numeric methods are useful when exact formulas are difficult, impossible, or unnecessary.

For example, suppose we want to estimate the height of a rocket after several seconds, using measurements of speed, air resistance, and gravity. The exact formula may be complicated. A numeric simulation can still give a useful answer.

Numeric methods are common in engineering, physics, statistics, machine learning, and data analysis.

### Both methods can work together

Symbolic and numeric methods are not enemies. Often we use both.

For example, we may first use algebra to simplify a formula. Then we substitute numbers into the simplified formula to compute an estimate. Or we may use numerical experiments to guess a pattern, then use symbolic proof to confirm it.

A computer algebra system, such as SageMath, Mathematica, or SymPy, often focuses on symbolic computation. A numerical library, such as NumPy, focuses on fast computation with arrays of numbers.

### A practical habit

When solving a problem, ask what kind of answer you need.

If you need an exact formula, use symbolic methods. If you need a practical estimate, use numeric methods. If the problem is large or based on real-world measurements, numeric methods may be more useful. If the problem involves proof, identity, or structure, symbolic methods may be more appropriate.

The important point is to know what is being preserved and what is being approximated. Symbolic methods preserve exact form. Numeric methods give usable values. Both are central to mathematical computation.

