# Lesson 11: Symbolic Mathematics

## Objectives

• To learn how to create and manipulate symbolic variables, and use symbolic functions
• To learn how to solve symbolic expressions and equations

## Questions

1. Create the following symbolic variables, using wither sym or syms command:
x, a, b, c
Use them to create thee following symbolic expressions or equations:
$ex1 = {x^2} - 1$
$ex2 = {(x+1)^2}$
$ex3 = a{x^2}-1$
$eq1 = {x^2} == 1$
$eq2 = {(x+1)^2} = = 0$
$eq3 = a{x^2} == 1$
1. Multiply ex1 by ex2, and name the result y1.
2. Divide ex1 by ex2, and name the result y2.
3. Use numden function to extract the numerator and denominator from y1 and y2.
4. Use the factor, expand, collect, and simplify functions on y1, y2.
5. Use the solve function to solve both ex1 and eq1.
6. Use the solve function to solve ex3 and eq3 for both x and a.
2. Consider the following system of linear equations:
$5x + 6y - 3z = 10$
$3x - 3y + 2z = 14$
$2x - 4y - 12z = 24$
1. Solve this system of equations by means of the linear algebra techniques discussed in Lab 09: Matrix Algebra.
2. Define a symbolic equation representing each equation in the given system of equations. Use the solve function to solve for x , y , and z.
3. Consider the following nonlinear system of equations:
${x^2} + 5y - 3{z^2} = 15$
$4x + {y^2} - z = 10$
$x + y + z = 15$
Solve the nonlinear system with the solve function. Use the double function on your results to simplify the answer.