Activity 3 Symbolic Processing 2024
Activity 3 Symbolic Processing 2024
Colllege of Engineering
ECE Department
ECM02- ADVANCED ENGINEERING MATHEMATICS LAB
ACTIVITY 3
SYMBOLIC PROCESSING
(ALGEBRAIC FUNCTION)
RATING
__________________________________________
INSTRUCTOR
I. OBJECTIVES:
b. Symbolic Constants are numbers which we want to be left to its form rather than evaluating
as floating decimals. Using symbolic constant, it avoids the floating-point approximation
inherent in the irrational constant. If you create these symbolic constants, say 𝜋, it temporarily
replaces the built-in numeric constant, and you no longer obtain a numerical value when you
type its name. Its advantage is that they need not be evaluated until a numeric answer is
required.
Example: [a, b, c; b, c, a; c, a, b]
>> syms a b c
>> A = [a b c;b a c; c a b]
>> syms A
>> A = [1, 2 3; 4, 5, 6]
In both cases, symbolic matrix A was created.
COMMAND RESULT
COMMAND RESULT
COMMAND RESULT
D.Create the following symbolic constants, and express answers in terms of symbolic and
decimal constants:
3√2+5−6√2
1. √2, 𝐴 = 7−√2
2. 𝜋, 𝐵 = (7 + 8/7) ∗ 𝜋
Hint. Use sym and double command
COMMAND RESULT
E. Express
𝑓 = 𝑥^3 − 6 ∗ 𝑥^2 + 11 ∗ 𝑥 − 6 and
𝑔 = (𝑥 − 1) ∗ (𝑥 − 2) ∗ (𝑥 − 3)
in typeset display mathematics
Hint. Use sym and pretty command
COMMAND RESULT
COMMAND RESULT
COMMAND RESULT
COMMAND RESULT
COMMAND RESULT
Example:
>> poly2sym([1 2 3]) % it creates 𝑥 2 + 2𝑥 + 3
>> poly2sym(1:2:11, z) % it creates 𝑧 5 + 3𝑧 4 + 5𝑧 3 + 7𝑧 2 + 9𝑧 + 11
>> syms x
>> sym2poly(2*x^2-x+6) % it outputs [2 -1 6]
COMMAND RESULT
COMMAND RESULT
C. Find the coefficients of the polynomial given the roots are 1 , -2, 3
Hint. Use poly command
COMMAND RESULT
COMMAND RESULT
COMMAND RESULT
COMMAND RESULT
a.
b.
c.
d.