10.1 Symbolic Expressions and Algebra
10.2 Algebraic and Transcendental Equations
10.4 Differential Equations
10.5 Laplace Transfortns
10.6 Symbolic Linear Algebra
Up to now we have used MATLAB to perform numerical operations only; that is, our answers have been numbers, not expressions. In this chapter we use MATLAB to perform symbolic processing to obtain answers in the form of expressions. Symbolic processing is the term used to describe how a computer performs operations
on mathematical expressions in the way, for example, that humans do algebra with pencil and paper. Whenever possible, we wish to obtain solutions in closed form because they give us greater insight into the problem. For example, we often can see how to improve an engineering design by modeling it with mathematical
expressions that do not have specific parameter values. Then we can analyze the expressions and decide which parameter values will optimize the design. This chapter explains how to define a symbolic expression such as y =
sin x / cos x in MATLAB and how to use MATLAB to simplify expressions wherever possible. For example, the previous function simplifies to y = sin x / cos x = tan x. MATLAB can perform operations such as addition and multiplication on mathematical expressions, and we can use MATLAB to obtain symbolic solutions to algebraic equations such as x2 + 2x + a = 0 (the solution for x is x = -I ± .J'”I=Q). MATLAB can also perform symbolic differentiation and integration and can solve ordinary differential equations in closed form.
To use the methods of this chapter, you must have either the Symbolic Math toolbox or the Student Edition of MATLAB, which contains all the functions of the Symbolic Math toolbox but has limited access to the Maple kernel.
The programs in this chapter are compatible with versions 2 through 3.1 of the
toolbox, although different versions might give slightly different error messages and slightly different displays of expressions.
The symbolic processing capabilities in MATLAB are based on the Maple V
software package, which was developed by Waterloo Maple Software, Inc. The MathWorks has licensed the Maple “engine,” that is, the core of Maple. If you have used Maple before, however, or plan to use it in the future, you should be aware that the syntax used by MATLAB differs from that used by the commercially
available Maple package .
We cover in this chapter a subset of the capabilities of the Symbolic Math
toolbox. Specifically we treat
• Symbolic algebra.
• Symbolic methods for solving algebraic and transcendental equations.
• Symbolic methods for solving ordinary differential equations.
• Symbolic calculus, including integration, differentiation, limits, and series.
• Laplace transforms.
• •Selected topics in linear algebra, including symbolic methods for obtaining determinants, matrix inverses, and eigenvalues. The topic of Laplace transforms is included because they provide one way
of solving differential equations and are often covered along with differential equations.
We do not discuss the following features of the Symbolic Math toolbox: canonical forms of symbolic matrices; variable precision arithmetic that allows you to evaluate expressions to a specified numerical accuracy; and special mathematical functions such as Fourier trans forms. Details on tHesecapabilities can be
found in the online help. When you have finished this chapter, you should be able to use MATLAB to
• Create symbolic expressions and manipulate them algebraically.
• Obtain symbolic solutions to algebraic and transcendental equations.
• Perform symbolic differentiation and integration.
• Evaluate limits and series symbolically.
• Obtain symbolic solutions to ordinary differential equations.
• Obtain Laplace transforms.
• Perform symbolic linear algebra operations, including obtaining
expressions for determinants, matrix inverses, and eigenvalues.