In this chapter we will learn how to use MATLAB to do symbolic calculus. Although MATLAB is originally a tool for numerical computations, thanks to the (Extended) Symbolic Math Toolbox, it is possible to perform symbolic computation into the numeric environment of MATLAB software. Many mathematical operations can be done. A few examples are differentiation, integration, calculation of limits, substitution of variables, simplifying algebraic expressions and solving equations.
There are a few fundamental data types in MATLAB. An overview of the most common data types is given in Table 3.1. A data type defines a set of values, and the allowable operations on those values. In the previous chapter we saw already that results of numerical computations are influenced by the precision of the numbers you are working with. In order to perform symbolic computations, MATLAB introduces a data type sym called a symbolic object. A symbolic object is a data structure that stores a string representation of the symbol. Symbolic Math Toolbox software uses symbolic objects to represent symbolic variables, expressions, and matrices.
Common data types
16-bit integer number
Double precision number (default)
Single precision number
Logical number,i.e. booleans
In this chapter we mainly discuss how to perform symbolic computation using symbolic objects.