Symbolic Math in Matlab
Matlab has a powerful symbolic math ability. Rather than making calculations on known numbers, we can make calculations on symbolic expressions. For example, what is the limit as x approaches infinity of 1 + 1/2^1 + 1/2^2 + 1/2^3... + 1/2^n? Matlab can tell us. What is the integral of x^3 for any x? Matlab can tell us.
Symbolic Math in Matlab
Matlab allows you to create symbolic math expressions. This is useful when you don't want to immediately compute an answer or when you have a math "formula" to work on but don't know how to "process" it.
Matlab allows symbolic operations in several areas, including:
Calculus
Linear Algebra
Algebraic and Differential Equations
Transforms (Fourier, Laplace, etc.)
The key function in Matlab to create a symbolic representation of data is sym() or syms if you have multiple symbols to make.
Below is an example of creating some symbolic fractions and square roots: