Solving Algebraic Equations - PowerPoint PPT Presentation

About This Presentation
Title:

Solving Algebraic Equations

Description:

Math Review with Matlab: Solving Algebraic Equations Single Variable Transcendental Equations S. Awad, Ph.D. M. Corless, M.S.E.E. D. Cinpinski E.C.E. Department – PowerPoint PPT presentation

Number of Views:68
Avg rating:3.0/5.0
Slides: 11
Provided by: EC9
Category:

less

Transcript and Presenter's Notes

Title: Solving Algebraic Equations


1
Solving AlgebraicEquations
Math Review with Matlab
Single Variable Transcendental Equations
  • S. Awad, Ph.D.
  • M. Corless, M.S.E.E.
  • D. Cinpinski
  • E.C.E. Department
  • University of Michigan-Dearborn

2
Solving TranscendentalEquations
  • Solve Command
  • Polynomial Transcendental Example
  • Poly2sym Command
  • Exponential Transcendental Example
  • Complex Solution Example

3
Solve Command
  • The Symbolic Toolboxs solve command is used to
    solve both transcendental and algebraic equations
  • solve(f) solves f in terms of the independent
    symbolic variable closest to x. f must be a
    symbolic expression or a entered as a text string
    enclosed by single quotes
  • solve(f1,f2,...,fn) is used to solve multiple
    equations by separating the symbolic equations by
    commas as follows

4
Polynomial Transcendental Equation Example
  • Use Matlabs Symbolic Toolbox solve command to
    solve the transcendental equation

syms x xs_symsolve(x2-3x2) xs_sym
1 2
xs_dbldouble(xs) xs_dbl 1 2
5
Poly2Sym Command
  • The poly2sym(f) command converts a polynomial
    coefficient vector to symbolic polynomial
    expression in terms of the default symbolic
    variable x
  • The poly2sym(f,'v') command converts a polynomial
    coefficient vector to symbolic polynomial
    expression in terms of the symbolic variable v
  • The sym2poly command converts a symbolic
    polynomial expression to a polynomial coefficient
    vector

6
Poly2sym Example
  • Example

p5,2,-1,1,10
Polynomial Vector
sym_exppoly2sym(p) sym_exp 5x42x3-x2x
10
Symbolic Expression
poly_vecsym2poly(sym_exp) poly_vec 5 2
-1 1 10
Polynomial Vector
7
Exponential Transcendental Equation Example
  • Use the solve command to solve the transcendental
    equation

xs_symsolve(exp(2x)3exp(x)-54) xs_sym
log(-9) log(6)
xs_dbldouble(xs) xs_dbl 2.1972 3.1416i
1.7918
8
Verify Loge(-9)
  • In Matlab, log is the natural log of base e
  • Verify ln(-a) is a complex number
  • In this case -a -9, so

9
Complex Solution Example
  • Solve the nonlinear equation
  • Verify the result

syms x rt solve('x2exp(x)5') rt
3.5668799472626199482146544957277
4.8873680198538466074569067078051i
zsubs('x2exp(x)5',rt) z .2e-30
10
Summary
  • The solve command can be used to solve symbolic
    transcendental equations with real or complex
    solutions
  • poly2sym and sym2poly commands can be used to
    convert polynomial vectors to/from symbolic
    expressions
Write a Comment
User Comments (0)
About PowerShow.com