S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan Math Review with Matlab: Simplification Symbolic Math Toolbox.

Slides:



Advertisements
Similar presentations
Laplace Transform Math Review with Matlab:
Advertisements

Beginning Programming for Engineers
Complex Numbers S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Complex Math.
Solving Algebraic Equations
Calculus S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Math Review with Matlab: Differentiation.
Differential Equations Math Review with Matlab: Finding Solutions to Differential Equations S. Awad, Ph.D. M. Corless, M.S.E.E. D. Cinpinski E.C.E. Department.
CSE 123 Symbolic Processing. Declaring Symbolic Variables and Constants To enable symbolic processing, the variables and constants involved must first.
Trigonometric Identities Section 4.3. Objectives Use algebra to simplify trigonometric expressions Establish identities.
Mathematics made simple © KS Polynomials A polynomial in x is an expression with positive integer powers of x. Degree of Polynomial Terminology 5x is a.
Lecture 16 Symbolic Mathematics Symbolic mathematics: algebraezplotcalculus © 2007 Daniel Valentine. All rights reserved. Published by Elsevier.
Math Review with Matlab: Application: Solving Differential Equations
TECHNIQUES OF INTEGRATION
Solving Linear Equations
Verifying Trigonometric Identities
Simplifying Expressions
Algebra: Variables and Expressions variable A variable is a letter or symbol that represents an unknown quantity (a number). ALGEBRA. The branch of mathematics.
Solving Algebraic Equations S. Awad, Ph.D. M. Corless, M.S.E.E. D. Cinpinski E.C.E. Department University of Michigan-Dearborn Math Review with Matlab:
Matrix Mathematics in MATLAB and Excel
S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan Math Review with Matlab: Fundamentals Symbolic Math Toolbox.
S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Laplace Transform Math Review with Matlab: Calculating the Laplace.
Multiplying Monomials and Raising Monomials to Powers
Sets and Expressions Number Sets
Chapter 2 Review Algebra 1.
Chapter 10 Review: Matrix Algebra
Logarithmic Functions and Models Lesson 5.4. A New Function Consider the exponential function y = 10 x Based on that function, declare a new function.
Indefinite integrals Definition: if f(x) be any differentiable function of such that d/dx f( x ) = f(x)Is called an anti-derivative or an indefinite integral.
Simultaneous Equations By Dr J.P.M. Whitty
Introduction to Engineering MATLAB – 1 Introduction to MATLAB Agenda Introduction Arithmetic Operations MATLAB Windows Command Window Defining Variables.
Module :MA0001NP Foundation Mathematics Lecture Week 3.
Analytical Toolbox Differential calculus By Dr J.P.M. Whitty.
Scientific Computing Interpolation – Divided Differences Efficiency and Error Analysis.
1 MatLab Basics Jae Hoon Kim Department of Physics Kangwon National University It contains hundreds of commands to do mathematics. Graph functions, solve.
Introduction To this point MATLAB has been used to answer questions with a numeric value ▫Variables are assigned specific values ▫Answers are numbers MATLAB.
Chapter 1 Review College Algebra Remember the phrase “Please Excuse My Dear Aunt Sally” or PEMDAS. ORDER OF OPERATIONS 1. Parentheses - ( ) or [ ] 2.
Introduction to Matlab
Techniques of Integration
Course 1 Warm Up Lesson Presentation Lesson Presentation Problem of the Day 2-1 Variables and Expressions Course 1.
Multiplying Polynomials MATH 017 Intermediate Algebra S. Rook.
Section 7.3 Multiply a Monomial by a Polynomial We will be learning how to multiply a monomial (one term) by a polynomial (more than one term.
5.1 The Natural Logarithmic Function: Differentiation.
ELF Laws of Logarithms MCB4U - Santowski. (A) Review ► if f(x) = a x, find f -1 (x) so y = a x then x = a y and now isolate y ► in order to isolate.
Warm Up Simplify.  3   15  (9 + 2)  7  5
Evaluating Expressions and Combining Like Terms
Trigonometric Identities
Chapter 5.1 Notes Simplifying Polynomials Multiplying Polynomials Degree of a Polynomial Algebra 2.
Simplifying Algebraic Expressions 6.ee.3
Sec Math II 1.3.
Choctaw High School Algebra I EOI Review 1 Simplifying Expressions To simplify an algebraic expressions, you need to combine the like terms. Like terms.
6/5/20161 Math 2 Honors - Santowski1 Lesson 35 - Properties of Logarithms Math 2 Honors - Santowski.
Simplifying Expressions August 15, 2013 Evaluating Example/ Warm-up.
MATLAB (Matrix Algebra laboratory), distributed by The MathWorks, is a technical computing environment for high performance numeric computation and.
Notes T4-53 Properties of Exponents Objective: I can use properties of exponents. Key Words: Base Exponent Variable.
Variables and Expressions #4. A variable is a letter or symbol that represents a quantity that can change. A constant is a quantity that does not change.
Vocabulary Variable Constant Algebraic Expression Evaluate.
Evaluating Expressions and Combining Like Terms
Evaluating Expressions and Combining Like Terms
Symbolic Toolbox Dr GUNASEKARAN THANGAVEL Lecturer & Program Co-ordinator Electronics & Telecommunication Engineering EEE Section Department of Engineering.
Chapter 5.5 Slides 1-19 Math 7.
Symbolic mathematics: algebra ezplot calculus
Introduction to Algebra
Evaluating Expressions and Combining Like Terms
1.1 & 1.2: Properties of Real Numbers & Algebraic Expressions
Maths Unit 1 - Algebra Order of operations - BIDMAS Algebraic Notation
An algebraic expression that defines a function is a function rule.
Algebra: Variables and Expressions
LINEAR EQUATIONS.
Simplifying Algebraic Expressions
LINEAR EQUATIONS.
Evaluating Expressions and Combining Like Terms
Presentation transcript:

S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan Math Review with Matlab: Simplification Symbolic Math Toolbox

Symbolic Toolbox:Simplifications and Substitutions 2 Symbolic Simplifications n Pretty Command n Factor Command n Collect Command n Expand Command n Simplify Command n Simple Command

Symbolic Toolbox:Simplifications and Substitutions 3 Pretty Command The pretty command can be used to display symbolic expression in a format that resembles type-set mathematics PrettyPretty pretty(s) prints the symbolic expression s pretty(s,n) prints s using screen width n instead of the default 79

Symbolic Toolbox:Simplifications and Substitutions 4 Pretty Examples » syms x » f=x^3 - 6*x^2 + 21*x -6; » g=(x-1)*(x-2)*(x-3); » pretty(g) (x - 1) (x - 2) (x - 3) » h=x*(x*(x-6)+11)-6; » pretty(h) x (x (x - 6) + 11) - 6 Product Polynomial Nested Products Polynomial » pretty(f) 3 2 x - 6 x + 21 x - 6

Symbolic Toolbox:Simplifications and Substitutions 5 Factor Command The factor(f) command factors f into polynomial products » f = x^3 -6*x^2 +11*x -6; » y = factor(f) y = (x-1)*(x-2)*(x-3) » y = factor(x^5-1) y = (x-1)*(x^4+x^3+x^2+x+1)

Symbolic Toolbox:Simplifications and Substitutions 6 Collect Command The collect command collects coefficients of a symbolic expression and rewrites it as powers of a polynomial collect(s,v) s is a symbolic expression matrix v is the independent polynomial variable If v is omitted, collect uses rules to determine a default variable

Symbolic Toolbox:Simplifications and Substitutions 7 Collect Examples n Create symbolic expression f(x,t)=(1+x)t+xt » syms x t » f=(1+x)*t+x*t f = (1+x)*t+x*t n Specify collecting the x terms n Specify collecting the t terms n Unspecified independent variable collects the x variable » f_col_x = collect(f,x) f_col_x = 2*x*t+t » f_col_t = collect(f,t) f_col_t = (1+2*x)*t » f_col = collect(f) f_col = 2*x*t+t

Symbolic Toolbox:Simplifications and Substitutions 8 Expand Command The expand(s) command writes each element of the symbolic expression s as a product of its factors n Types of expandable expressions include: u Polynomial expressions u Trigonometric expressions u Exponential expressions u Logorithmetic expressions This is the inverse of the collect command

Symbolic Toolbox:Simplifications and Substitutions 9 Expand Examples » syms a x y » expand(a*(x+y)) ans = a*x+a*y » expand(exp(x+y)) ans = exp(x)*exp(y) Polynomial Expansion Exponential Expansion n Polynomial and exponential expansion examples

Symbolic Toolbox:Simplifications and Substitutions 10 Involved Expand Example n Given the following function of x: 1)Expand f(x) by hand to get a polynomial function of x 2)Verify the result using the symbolic expand command

Symbolic Toolbox:Simplifications and Substitutions 11 Expansion Approach n To expand f(x) by hand, represent the inverse cosine portion as a new function z n Expand cos(3z) in terms of z n Once cos(3z) is expanded, substitute back in z=cos -1 (x) Let: Thus:

Symbolic Toolbox:Simplifications and Substitutions 12 Expand cos(3z) Term n Begin by expanding f(x) in terms of z

Symbolic Toolbox:Simplifications and Substitutions 13 Substitute and Simplify n From the previous work: n Substitute: n Simplify:

Symbolic Toolbox:Simplifications and Substitutions 14 Expand Verification n This is easily verified in Matlab » expand( cos(3*acos(x)) ) ans = 4*x^3-3*x

Symbolic Toolbox:Simplifications and Substitutions 15 » syms x » f1=sin(x)^2 + cos(x)^2 + log(x); » f1_smplfy = simplify(f1) f1_smplfy = 1+log(x) Simplify Command The simplify(s) command performs algebraic, trigonometric, and logarithmic identities and relationships to simplify each element of the the symbolic matrix s Trigonometric Identity:

Symbolic Toolbox:Simplifications and Substitutions 16 » syms a b » f=exp(a*log(b)); » f_smplfy=simplify(f) f_smplfy = b^a » f_expnd = expand(f) f_expnd = b^a Simplify Example n Simplify the expression: Expand gives the same result

Symbolic Toolbox:Simplifications and Substitutions 17 n Example Methods for Simplification:  Collect Similar Terms  Trigonometric Identities  Log/Complex Number Relations Simple Command r = simple(s) tries different algebraic simplifications and looks for the shortest form of the entire symbolic matrix s. If the result r is not specified, all intermediate steps are displayed to the screen. [r,how] = simple(s) does not display intermediate simplifications, but returns the shortest form, as well as a string describing the simplification method used

Symbolic Toolbox:Simplifications and Substitutions 18 Simplify Example n Use the simple command to simplify the function f from the previous example and show intermediate steps » f=exp(a*log(b)); » f_smpl=simple(f) simplify: b^a radsimp: exp(a*log(b)) combine(trig): exp(a*log(b)) convert(sincos): exp(a*log(b)) convert(tan): exp(a*log(b)) collect(b): exp(a*log(b)) f_smpl = b^a factor: exp(a*log(b)) expand: b^a combine: exp(a*log(b)) convert(exp): exp(a*log(b))

Symbolic Toolbox:Simplifications and Substitutions 19 Best Simplify Method n Perform the simplification again but show only the result » [f_smpl]=simple(f) f_smpl = b^a Recall from a previous example that the expand and simplify methods gave the same results n Also show which simplification was used » [f_smpl,how]=simple(f) f_smpl = b^a how = expand

Symbolic Toolbox:Simplifications and Substitutions 20 Simple Example » f=sym( '(1+1/2*2^(1/2))^2+1+1/2*2^(1/2)') f = (1+1/2*2^(1/2))^2+1+1/2*2^(1/2) » f_smpl=simple(f) f_smpl = 5/2+3/2*2^(1/2) n The simple command can also be used to simplify symbolic mathematical expressions without dependent variables

Symbolic Toolbox:Simplifications and Substitutions 21 Summary The pretty command can be used to display symbolic expressions in mathematical type-set form The factor, collect, expand, and simplify commands can be used to reduce a symbolic expression to shorter forms The simple command implements multiple simplification methods to simplify a symbolic expression to its shortest form The simple command can also return the best simplification method used to reduce the symbolic expression