Professional Documents
Culture Documents
=
: ! n
s
n
+ a s
n!
+ ...... +
a
! n
Num 4 5b
:
, b
!
, EE. b
n
7 * oe++iient o+ the numerator
Fen 4 5!, a
!
, a
&
, EEa
n
7 * oe++iient o+ the #enominator
"he omman# 7r,p,B: ; re#i+ue4Num,3e"5 +in#s tAe re#i+ue 4r5, pole# 4p5, !"+
+iret term# 4B5 o+ a $artial * +ration e,$ansion.
5/s0
=
6/s0
r/!0
+
s p/!0
r/&0
s p/&0
+ ........ +
r/n0
s p/n0
+ " /s0
5
G,am$le.
Consi#er.
"he MA"LA% $rogram.
5/s0
6/s0
&s
(
+ 5s
&
+ (s + ;
=
s
(
+ ;s
&
+!!s + ;
33 %partial - fra!tion expansion of polynomials$7um 8 ,en%
33 Num 4 5& 5 ( ;7< %!oeffi!ient of the numerator
33 Fen 4 5! ; !! ;7< %!oeffi!ient of the denominator
33 5r,$,k7 4 resi#ue/Num,Fen0
r 4
6;.::::
64.::::
(.::::
$ 4
6(.::::
6&.::::
6!.::::
k 4
&
Hartial * +ration e,$ansion o+ %/s08A/s0.
5/s0
=
6/s0
;
+
s + (
4
+
s + &
(
+ &
s + !
III* L!%or!tor& E=eri#e#
A. Holynomials
9oo" for t+o pairs of polynomial expressions and perform the follo+ing operations
of polynomials:
3: 6dd2 sutra!t2 multiply2 and di(ide ea!h pair of polynomials
2: *ultiply the four polynomials y 42 52 &2 and 72 in that order
3: ;ind their roots
4: <se the results of part 3 to find the polynomial !oeffi!ients from the gi(en roots
5: E(aluate the four polynomials at the point x 032 32 52 72 =2 and 33
%. Solution to Linear Algebrai G)uations with MA"LA%
9oo" for 2 sets of linear algerai! e-uations $4 e-uations 8 4 un"no+ns% then find
their solution:
C. Hartial * Iration G,$ansion with MA"LA%
9oo" for 4 polynomial e-uations $num>den% and determine their partial fra!tion
expansion:
;
Program and Outputs
clear
>> a=[2,-10,3,2,-10,5];
>> b=[1,1,2,-6,3,-5];
>> c=[6,-1,5,-5];
>> d=[1,5,-!,3];
Addition of a &b
>> a"b
ans =
3 -# 5 -! -$ 0
Ans= x x x x x 2 4 5 C (
& ( 4 5
+
Addition of c&d
>> c"d
ans =
$ -13 1 -2
Ans= & !( 2
& (
+ x x x
Subtraction of a&b
>> a-b
ans =
1 -11 1 -13 10
Ans = !: !( 1 !!
& ( 4 5
+ + + x x x x x
Subtraction of c&d
>> c-d
ans =
5 -23 # -
Ans= 1 C &( 5
& (
+ x x x
Product of a&b
>> product = con%&a,b'
product =
2 - -3 -2$ 6! -5# 32 61 -$0 65 -25
Product=
&5 ;5 2: ;! (&
5C ;4 &2 ( 1 &
& ( 4
5 ; 2 1 C !:
+ +
+ +
x x x x
x x x x x x
Product of c&d
>> product = con%&c,d'
product =
6 12 -10# 110 -## 35 -15
Product=
!5 (5 5C CC
!!: !:C !& ;
5 &
( 4 5 ;
+
+ +
x x x
x x x x
Division of a&b
>> [(uot)ent, rema)nder] = decon%&a,b'
(uot)ent =
2
rema)nder =
0 -12 -1 1! -16 15
*ema)nder= !5 !; !4 !&
& ( 4
+ + x x x x
Division of c&d
>> [(uot)ent, rema)nder] = decon%&c,d'
(uot)ent =
6
rema)nder =
0 -! 2# -23
*ema)nder= &( &C 41
&
+ x x
Polynomial a! multiply by "
>> !+a
ans =
-!0 12 -!0 20
,ns = &: 4: 1 !& 4: 1
& ( 4 5
+ + + x x x x x
Polynomial b! multiplied by #
>> 5+b
ans =
5 5 10 -30 15 -25
,ns = &5 !5 (: !: 5 5
& ( 4 5
+ + + x x x x x
Polynomial $ multiplied by %
>> 6+c
ans =
36 -10 30 -30
,ns = (: (: !:1 (;
& (
+ x x x
Polynomial d! multiplied by &
>> $+d
ans =
$ 35 -2 21
Ans = &! &1 (5 2
& (
+ + x x x
'oots of polynomial !a!
>> roots&a'
ans =
!-6$$2
-1-0!11
0-!16 " 0-#13)
0-!16 - 0-#13)
0-5303
'oots of polynomial b!
>> roots&b'
ans =
-1-2#3! " 1-1)
-1-2#3! - 1-1)
1-3132
0-136 " 0-636)
0-136 - 0-636)
'oots of polynomial c!
>> roots&c'
ans =
2-0#
0-0#55 " 0-5362)
0-0#55 - 0-5362)
'oots of polynomial d!
>> roots&d'
ans =
-5-$16
0-3#0 " 0-6051)
0-3#0 - 0-6051)
Polynomial coefficient of t(e given roots of a!
>> rootsa=[!-6$$2,-1-0!11,0-!16 " 0-#13),0-!16 - 0-#13),0-5303];
>> pol.&rootsa'
ans =
2-0000 -10-0000 3-0000 2-000! -10-0001 5-0000
,ns= 5 !: & ( !: &
& ( 4 5
+ + + x x x x x
Polynomial coefficient of t(e given roots of b!
>> rootsb=[-1-2#3! " 1-1),-1-2#3! - 1-1),1-3132,0-136 " 0-636),0-136 -
0-636)];
>> pol.&rootsb'
ans =
1-0000 1-0000 2-0000 -6-0006 3-0005 -5-000$
,ns = 5 ( ; &
& ( 4 5
+ + x x x x x
Polynomial coefficient of t(e given roots of c!
>> rootsc=[2-0#,0-0#55 " 0-5362),0-0#55 - 0-5362)];
>> pol.&rootsc'
ans =
6-0000 -1$-#### 5-0001 -5-0002
,ns = 5 5 !1 ;
& (
+ x x x
Polynomial coefficient of t(e given roots of d!
>> rootsd=[-5-$16,0-3#0 " 0-6051),0-3#0 - 0-6051)];
>> pol.&rootsd'
ans =
1-0000 5-0000 -!-0000 2-####
,ns = ( 4 5
& (
+ + x x x
)alues of polynomial a! at specified values of its independent
variable *x+
>> /=[103011];
>> pol.%al&a,/'
ans =
- -323 10666 103105
)alues of polynomial b! at specified values of its independent
variable *x+
>> pol.%al&b,/'
ans =
-! 131# 1#616 111!25
)alues of polynomial c! at specified values of its independent
variable *x+
>> pol.%al&c,/'
ans =
-12 111 1206 !2!5
)alues of polynomial a! at specified values of its independent
variable *d+
>> pol.%al&d,/'
ans =
5 131 563 1!63
, sets of linear algebraic equations and t(eir solution-
>> 1=[1 -3 -2 2;1 -2 1 3;2 5 -3 6;3 -2 2 3]
1 =
1 -3 -2 2
1 -2 1 3
2 5 -3 6
3 -2 2 3
>> 2=[! 1 2 3;3 -6 5 !;# $ -$ ;3 ! 3 2]
2 =
! 1 2 3
3 -6 5 !
# $ -$
3 ! 3 2
>> /=[-!;-12;-15;-1!];
>> .=[6;1;!;5];
>> sol1=13/
sol1 =
-0-2020
0-1133
-1-5#61
-3-3251
w=-3.3251 x=-.2020 y=.1133 z=-1.5961
>> sol2=23.
sol2 =
!-1$32
-0-2$3$
0-312
-3-616
w=4.1732 x=-0.2737 y=0.3128 z=-3.6816