Professional Documents
Culture Documents
Activity 4 - Gilay
Activity 4 - Gilay
Activity 4 - Gilay
Activity 4 POLYNOMIALS
PROBLEMS:
Commands
disp("Find the roots of 6s^4 + 8s^3 + 9s^2 − 5s + 3 = 0 and assign it to M1");
M1 = poly([3 -5 9 8 6], 's', 'c')
disp(M1); disp(roots(M1));
Answers
-0.9370637 + 1.1906435i
-0.9370637 - 1.1906435i
0.270397 + 0.3803709i
0.270397 - 0.3803709i
2. Find the roots of M2 = 8𝑠3 + 9𝑠2 + 3 = 0 and reassemble M2 from its roots.
Commands
disp("Find the roots of M2 = 8s^3 + 9s^2 + 3 = 0 and reassemble M2 from its roots.");
M2 = poly([3 0 9 8],'s','c');
disp(M2); rM2 =
roots(M2);
disp(rM2);
M3 = (poly(rM2,'s'))*8;
disp(M3);
Answers
3 +9s² +8s³
-1.3353126 + 0.i
Commands
disp("Display P3 as product of (2s^4 + 4s^3 + 3s^2 + 5s + 1) (s^3 + 3s^2 − s + 3).");
P1 = poly([1 5 3 4 2],'s','c'); P2
= poly([ 3 -1 3 1],'s','c');
disp(P1); disp(P2);
P3=P1*P2;
disp(P3);
Answers
1 +5s +3s² +4s³ +2s⁴
3 -s +3s² +s³
4. Expand the polynomial M4 = (2𝑠4 + 4𝑠3 + 3𝑠2 + 5𝑠 + 1) (𝑠3 + 3𝑠2 − 𝑠 + 3) and evaluate
at s = 3.
Commands
disp("Expand the polynomial M4 = (2s^4 + 4s^3 + 3s^2 + 5s + 1) (s^3 + 3s^2 − s + 3) and evaluate
at s = 3.");
disp(P3);
P4 = horner(P3,3);
disp(P4);
Answers
= 16902
Commands
disp("Problem 5a");
s=%s;
num = 6*poly([2 5 1],'s','c');
den = s*(s+3)*(s-1); F1 =
num/den ; disp(F1);
Answers
12 +30s +6s²
---------------- -3s +2s² +s³
b. 𝑭𝟐(𝒔) = 𝟏𝟐 (𝒔+𝟐)(𝒔+𝟓)
( 𝒔+𝟑)(𝒔+𝟓)
Commands
disp("Problem 5b")
num = 12*(s+2)*(s+5);
den = (s+3)*(s+5); F2=
num/den ;
disp(F2);
Answers
24 +12s
-----------
3 +s
6. Give the partial expansion of the following functions:
𝟐
𝟔𝒔 +𝟓𝒔+𝟕
Commands
Answers
𝟒
𝟖 (𝒔+𝟏𝟐)(𝒔+𝟓)
b. 𝑭𝟒(𝒔𝒔)( 𝒔=+ 𝟏)(𝒔+𝟑)(𝟑𝒔𝟐+𝟐𝒔+𝟏)
Commands
Answers