Chapter 12
Symbolic Mathematics
W
hen mathematicians work, they use symbols, such as
x
and
y
, to represent numbers
and the functional notation
f(x)
to represent a function of
x
. We have used the same
symbols in Matlab, and yet the meanings are subtly different. The Matlab symbols
x
and
y
refer to floating point numbers or integers of the types we considered in Chapter 8,
whose ranges and accuracies are limited and to functions that operate on these numbers.
A common feature of all the numbers that can be represented as floating point numbers or
integers is that they are rational numbers,
i.e.
, numbers that are equal to ratios of integers.
The
x
and
y
of mathematics, on the other hand, refer to real (or complex) numbers whose
values are often defined only by being solutions to equations. These solutions are
sometimes not rational, as for example the solution to the equation,
2
2
x
=
, which we can
represent by
2
x
=
or
1 2
2
x
=
.
In Matlab we can easily set
x = 2^(1/2)
or
x =
-2^(1/2)
, but the meaning is not the same. The result of Matlab’s calculation of
2^(1/2)
is approximately equal to
1 2
2
, but it is certainly not exact
because
2
is an
irrational number and cannot be represented to perfect accuracy with any floating point
number. The statement
1 2
2
x
=
, on the other hand, means “
x
is equal to the number that
solves the equation,
2
2
x
=
”. The equation is the central feature here, not the number.
Furthermore, suppose a mathematician is interested in the function
(
29
2
f x
x
=
and wants
to know the rate at which
(
29
f x
changes with
x
. The rate of change of
(
29
f x
with respect
to x is the derivative of
(
29
f x
, expressed symbolically in standard calculus notation as
(
29
df x
dx
.
We learn from calculus that the derivative is another function, in this case,
(
29
2
df x
x
dx
=
.
In this case there is no number involved at all. We have, by taking a derivative,
manipulated one function to produce another function. There are many such relationships
between functions of importance in mathematics. For example, if we treat 2
x
as a
function of
x
, then its integral gives a family of functions:
2
2
xdx
x
c
=
+
,
1