Partial Fraction Decomposition for TI-85
by Ravi Prasad (4/17/92)
----begin documentation----
You must first run the uudecode "UUD20" program which will create the
"PRTLFRAC.85P" file and then you must run the "LINK85" program to load
the file to your TI85.

While writing the partial fraction program, I was forced to write an
n'th order derivative program.  A small routine in the "PRTLFRAC" 
program determines the derivative of a function F(x) = U(x) / V(x).  
The "DERIV" routine lets you get the n'th derivative of a polynomial.
Since I needed to get a derivative of a function f(x) = u(x) / g(x),
I used a combination of divide and multiply and deriv in a loop to get
the required result. The multiply and divide routines 
are basically the same ones currently on the archive listed as 
"Pmul" and "Pdiv" with  only slight modifications as needed. 
To properly add or subtract polynomials, I was also had to write 
a routine that would fix the list size of different degree polynomials.  
This routine can be used seperately as can the DERIV routine 
to do further handle polynomials.

                          Running the program.

Simply execute the "PRTLFRAC" program by selecting it from the PROG menu
You will be prompted to enter N(x) and the roots to D(x).  N(x) is the numerator
of the function to be worked on.  Accordingly, D(x) is the denominator of
the same function.  Due to accuracy problems, I was forced to write a routine
where you must enter the roots of the denominator versus entering the
denominator polynomial itselt.  Anyway, I latter emply the multiply routine
and build the needed denominator.  It is a good idea to enter duplicated roots
of D(x) at the same time, although not necessary.  After a while, the partial
fraction decomposition is done and the necessary information presented in
matrix form.  The matrix is also saved under the variable "x" for your
future review.  Again, due to accuracy problems on the TI, I have employed
a routine which randomly selects a number and checks the value of this
number in the original function, and then in the newly decomposed fraction
form.  If a difference between the two exist by more than the "tol" value
setup in you TI-85, the matrix presented is displayed with question marks.
I have found that in most cases, the difference is trivial and can be
ignored.  The difference between the two versions are held in the
greek character "omega" for your further review.

                                          2
example: give the                        x
                           F(x) = -------------------
                                        2
                                   (x+1)   (x+2)

                                                           2
enter in LIST form N(x): {1,0,0}        which represents 1x  + 0x + 0
enter in LIST form Roots of D(x): {-1,-1,-2}  which shows -1 as a double root

the solution presented in matrix form says that the fuction F(x) can also
be represented as:

        -3             1              4
     --------  +  -----------  +  ----------
            1            2               1
       (x+1)         (x+1)          (x+2)

The numerator values (-3,1,4) are presented in row 1 of the matrix
The values (x+n) where n is 1,1,2 are presented in row 2 of the matrix
The powers on the denominator (1,2,1) appear in row 3.

The matrix has been organixed such that each column corresponds to each term.

Again, as previously mentioned, if the computational difference greater
than the internal "tol" value exist between the original function and
the decomposed form, the screen has question marks displed next to the
sample matrix.  In most cases this is not anything significant.
One last note,  as always, I have made common practice to start all program 
variables with the greek letter omega.  This makes deletion of the variables 
much easier since they appear all together in the memory management screen.

----end documentation----
----begin ascii----
\START\
\COMMENT=Program file dated 04/30/93, 08:52
\NAME=PRTLFRAC
\FILE=prtlfrac.85P
Lbl START
ClLCD
Disp "DECOMPOSE F=N(x)/D(x)"
Disp "NOTE:\deg\N(x) < \deg\D(x) !!"
Disp "    Ans=\UC-Sigma\\hexA\i/(x+\hexB\i)^\hexC\i"
Disp "---------------------"
Input "N(x)=",\UC-Omega\NUM
Input "ROOTS OF D(x)=",\UC-Omega\ROOT
sortA \UC-Omega\ROOT\->\\UC-Omega\ROOT
dimL \UC-Omega\ROOT\->\\UC-Omega\\LC-beta\:{3,\UC-Omega\\LC-beta\}\->\d\#\
im \UC-Omega\SOL
{1}\->\\UC-Omega\L2
For(\UC-Omega\B,1,\UC-Omega\\LC-beta\)
{1,\(-)\\UC-Omega\ROOT(\UC-Omega\B)}\->\\UC-Omega\L1
10\->\\UC-Omega\RTS:Goto MULTIPLY
Lbl RTS10
\UC-Omega\ML\->\\UC-Omega\L2
End
\UC-Omega\ML\->\\UC-Omega\DEN
Lbl TEST1
int (100*rand)+1\->\\UC-Omega\TSTPT
For(\UC-Omega\B,1,\UC-Omega\\LC-beta\)
If angle \UC-Omega\ROOT(\UC-Omega\B)\<>\0
Then
(\UC-Omega\TSTPT,0)\->\\UC-Omega\TSTPT
Goto TEST2
End
End
Lbl TEST2
For(\UC-Omega\B,1,\UC-Omega\\LC-beta\)
If \UC-Omega\TSTPT==\UC-Omega\ROOT(\UC-Omega\B)
Goto TEST1
End
Fill(0,\UC-Omega\SOL):\li>vc\ \(-)\\UC-Omega\ROOT\->\\UC-Omega\SOL(2,1)\#\

1\->\\UC-Omega\A:1\->\\UC-Omega\DerN
Lbl MAIN
0\->\\UC-Omega\K:0\->\\UC-Omega\n
If \UC-Omega\A\<=\\UC-Omega\\LC-beta\
Then
\UC-Omega\ROOT(\UC-Omega\A)\->\\UC-Omega\\LC-alpha\
For(\UC-Omega\B,1,\UC-Omega\\LC-beta\)
If \UC-Omega\ROOT(\UC-Omega\B)==\UC-Omega\\LC-alpha\
\UC-Omega\K+1\->\\UC-Omega\K
End
{1,\(-)\\UC-Omega\\LC-alpha\}\->\\UC-Omega\L1:{1}\->\\UC-Omega\L2
For(\UC-Omega\B,1,\UC-Omega\K)
20\->\\UC-Omega\RTS:Goto MULTIPLY
Lbl RTS20
\UC-Omega\ML\->\\UC-Omega\L2
End
\UC-Omega\DEN\->\\UC-Omega\N:\UC-Omega\ML\->\\UC-Omega\D
30\->\\UC-Omega\RTS:Goto DIVIDE
Lbl RTS30
\UC-Omega\Q\->\\UC-Omega\TMPDEN:\UC-Omega\NUM\->\\UC-Omega\TMPNUM
(pEval(\UC-Omega\TMPNUM,\UC-Omega\\LC-alpha\)/pEval(\UC-Omega\TMPDEN,\UC-Omega\\#\
\LC-alpha\))\->\\UC-Omega\SOL(1,\UC-Omega\A+\UC-Omega\K-1)
\UC-Omega\K\->\\UC-Omega\SOL(3,\UC-Omega\A+\UC-Omega\K-1)
If \UC-Omega\K>1
Then
For(\UC-Omega\n,1,\UC-Omega\K-1)
\UC-Omega\TMPNUM\->\\UC-Omega\F
40\->\\UC-Omega\RTS:Goto DERIV
Lbl RTS40
\UC-Omega\DER\->\\UC-Omega\Uder
\UC-Omega\TMPDEN\->\\UC-Omega\F
50\->\\UC-Omega\RTS:Goto DERIV
Lbl RTS50
\UC-Omega\DER\->\\UC-Omega\Vder
\UC-Omega\TMPDEN\->\\UC-Omega\L1:\UC-Omega\Uder\->\\UC-Omega\L2
60\->\\UC-Omega\RTS:Goto MULTIPLY
Lbl RTS60
\UC-Omega\ML\->\\UC-Omega\N1
\UC-Omega\TMPNUM\->\\UC-Omega\L1:\UC-Omega\Vder\->\\UC-Omega\L2
70\->\\UC-Omega\RTS:Goto MULTIPLY
Lbl RTS70
\UC-Omega\ML\->\\UC-Omega\N2
If dimL \UC-Omega\N1<dimL \UC-Omega\N2
Then
dimL \UC-Omega\N2\->\\UC-Omega\WANTSIZ
\UC-Omega\N1\->\\UC-Omega\LST
80\->\\UC-Omega\RTS:Goto SIZFIX
Lbl RTS80
\UC-Omega\LST\->\\UC-Omega\N1
End
If dimL \UC-Omega\N1>dimL \UC-Omega\N2
Then
dimL \UC-Omega\N1\->\\UC-Omega\WANTSIZ
\UC-Omega\N2\->\\UC-Omega\LST
90\->\\UC-Omega\RTS:Goto SIZFIX
Lbl RTS90
\UC-Omega\LST\->\\UC-Omega\N2
End
(\UC-Omega\N1-\UC-Omega\N2)\->\\UC-Omega\TMPNUM
\UC-Omega\TMPDEN\->\\UC-Omega\L1:\UC-Omega\L1\->\\UC-Omega\L2
100\->\\UC-Omega\RTS:Goto MULTIPLY
Lbl RTS100
\UC-Omega\ML\->\\UC-Omega\TMPDEN
(1/\UC-Omega\n!)*(pEval(\UC-Omega\TMPNUM,\UC-Omega\\LC-alpha\)/pEval(\UC-Omega\\#\
TMPDEN,\UC-Omega\\LC-alpha\))\->\\UC-Omega\SOL(1,\UC-Omega\A+\UC-Omega\\#\
K-\UC-Omega\n-1)
\UC-Omega\K-\UC-Omega\n\->\\UC-Omega\SOL(3,\UC-Omega\A+\UC-Omega\K-\UC-Omega\\#\
n-1)
End
\UC-Omega\A+\UC-Omega\K\->\\UC-Omega\A:0\->\\UC-Omega\K
End
\UC-Omega\A+\UC-Omega\K\->\\UC-Omega\A
Goto MAIN
End
Goto FINISHED
Lbl MULTIPLY
dimL \UC-Omega\L1\->\\UC-Omega\S1
dimL \UC-Omega\L2\->\\UC-Omega\S2
\UC-Omega\S1+\UC-Omega\S2-1\->\dimL \UC-Omega\DL
Fill(0,\UC-Omega\DL)
\UC-Omega\DL\->\\UC-Omega\ML
For(\UC-Omega\I,1,\UC-Omega\S2,1)
Fill(0,\UC-Omega\DL)
For(\UC-Omega\J,1,\UC-Omega\S1,1)
\UC-Omega\L1(\UC-Omega\J)\->\\UC-Omega\DL(\UC-Omega\J+\UC-Omega\I-1)
End
\UC-Omega\L2(\UC-Omega\I)*\UC-Omega\DL+\UC-Omega\ML\->\\UC-Omega\ML
End
Goto RTSCHK
Lbl DIVIDE
0\->\\UC-Omega\Q
dimL \UC-Omega\N\->\\UC-Omega\S1
dimL \UC-Omega\D\->\\UC-Omega\S2
\UC-Omega\S1-\UC-Omega\S2+1\->\\UC-Omega\ND
\UC-Omega\ND\->\dimL \UC-Omega\Q
\UC-Omega\D\->\\UC-Omega\D2
\UC-Omega\S1\->\dimL \UC-Omega\D2
\UC-Omega\N\->\\UC-Omega\Rem
For(\UC-Omega\I,1,\UC-Omega\ND,1)
\UC-Omega\Rem(\UC-Omega\I)/\UC-Omega\D(1)\->\\UC-Omega\M
\UC-Omega\M\->\\UC-Omega\Q(\UC-Omega\I)
\UC-Omega\Rem-(\UC-Omega\M*\UC-Omega\D2)\->\\UC-Omega\Rem
Fill(0,\UC-Omega\D2)
For(\UC-Omega\J,1,\UC-Omega\S2,1)
\UC-Omega\D(\UC-Omega\J)\->\\UC-Omega\D2(\UC-Omega\I+\UC-Omega\J)
End
End
Goto RTSCHK
Lbl DERIV
\UC-Omega\F\->\\UC-Omega\DER
dimL \UC-Omega\F\->\\UC-Omega\Fsize
If \UC-Omega\DerN\>=\\UC-Omega\Fsize
Then
1\->\dimL \UC-Omega\DER:0\->\\UC-Omega\DER(1)
Goto DONE
End
\UC-Omega\Fsize-\UC-Omega\DerN\->\dimL \UC-Omega\DER
For(\UC-Omega\B,1,\UC-Omega\Fsize-\UC-Omega\DerN)
\UC-Omega\F(\UC-Omega\B)*(\UC-Omega\Fsize-\UC-Omega\B)!/(\UC-Omega\Fsiz\#\
e-\UC-Omega\B-\UC-Omega\DerN)!\->\\UC-Omega\DER(\UC-Omega\B)
Lbl DONE
End
Goto RTSCHK
Lbl SIZFIX
dimL \UC-Omega\LST\->\\UC-Omega\ORGSZ
\UC-Omega\WANTSIZ\->\dimL \UC-Omega\LST
0\->\\UC-Omega\\LC-gamma\
For(\UC-Omega\B,\UC-Omega\ORGSZ,1,\(-)\1)
\UC-Omega\LST(\UC-Omega\B)\->\\UC-Omega\LST(\UC-Omega\WANTSIZ-\UC-Omega\\#\
\LC-gamma\)
0\->\\UC-Omega\LST(\UC-Omega\B):\UC-Omega\\LC-gamma\+1\->\\UC-Omega\\LC-gamma\\#\

End
Goto RTSCHK
Lbl RTSCHK
If \UC-Omega\RTS==10
Goto RTS10
If \UC-Omega\RTS==20
Goto RTS20
If \UC-Omega\RTS==30
Goto RTS30
If \UC-Omega\RTS==40
Goto RTS40
If \UC-Omega\RTS==50
Goto RTS50
If \UC-Omega\RTS==60
Goto RTS60
If \UC-Omega\RTS==70
Goto RTS70
If \UC-Omega\RTS==80
Goto RTS80
If \UC-Omega\RTS==90
Goto RTS90
If \UC-Omega\RTS==100
Goto RTS100
Lbl FINISHED
0\->\\UC-Omega\A:\UC-Omega\SOL\->\x
For(\UC-Omega\B,1,\UC-Omega\\LC-beta\)
x(1,\UC-Omega\B)/((\UC-Omega\TSTPT+x(2,\UC-Omega\B))^x(3,\UC-Omega\B))+\#\
\UC-Omega\A\->\\UC-Omega\A
End
(pEval(\UC-Omega\NUM,\UC-Omega\TSTPT)/pEval(\UC-Omega\DEN,\UC-Omega\TST\#\
PT))\->\\UC-Omega\B
ClLCD
Disp "Ans=\UC-Sigma\\hexA\i/(x+\hexB\i)^\hexC\i"
Disp "    [\hexA\1,\hexA\2,\hexA\3.....]"
Disp "    [\hexB\1,\hexB\2,\hexB\3.....]"
Disp "    [\hexC\1,\hexC\2,\hexC\3.....]"
abs (\UC-Omega\A-\UC-Omega\B)\->\\UC-Omega\
If \UC-Omega\>tol
Then
Outpt(2,1,"????")
Outpt(3,1,"  ?")
Outpt(4,1," ?"
End
x\>Frac\
\STOP\

----end ascii----
----begin uue----
begin 644 prtlfrac.85p
M*BI423@U*BH:#`!0<F]G<F%M(&9I;&4@9&%T960@,#0O,S`O.3,L(#`X.C4R
M```G,<=GK)(O"PP`'PL2"%!25$Q&4D%#'PL="P!,8FP@4U1!4E360VQ,0T36
M1&ES<"`B1$5#3TU03U-%($8]3BAX*2]$*'@I(M9$:7-P(").3U1%.A1.*'@I
M(#P@%$0H>"D@(2$BUD1I<W`@(B`@("!!;G,]Q@II+RAX*PMI*5X,:2+61&ES
M<"`B+2TM+2TM+2TM+2TM+2TM+2TM+2TM(M9);G!U="`B3BAX*3TB+,I.54W6
M26YP=70@(E)/3U13($]&($0H>"D](BS*4D]/5-9S;W)T02#*4D]/5!S*4D]/
M5-9D:6U,(,I23T]4',J\.GLS+,J\?1QD:6T@RE-/3-9[,7T<RDPRUD9O<BC*
M0BPQ+,J\*=9[,2P:RE)/3U0HRD(I?1S*3#'6,3`<RE)44SI';W1O($U53%1)
M4$Q9UDQB;"!25%,Q,-;*34P<RDPRUD5N9-;*34P<RD1%3M9,8FP@5$535#'6
M:6YT("@Q,#`J<F%N9"DK,1S*5%-44%361F]R*,I"+#$LRKPIUDEF(&%N9VQE
M(,I23T]4*,I"*1@PUE1H96[6*,I44U105"PP*1S*5%-44%361V]T;R!415-4
M,M9%;F3616YDUDQB;"!415-4,M9&;W(HRD(L,2S*O"G6268@RE135%!4/3W*
M4D]/5"C*0BG61V]T;R!415-4,=9%;F361FEL;"@P+,I33TPI.FQI!79C(!K*
M4D]/5!S*4T],*#(L,2G6,1S*03HQ',I$97).UDQB;"!-04E.UC`<RDLZ,!S*
M;M9)9B#*01?*O-94:&5NULI23T]4*,I!*1S*N]9&;W(HRD(L,2S*O"G6268@
MRE)/3U0HRD(I/3W*N];*2RLQ',I+UD5N9-9[,2P:RKM]',I,,3I[,7T<RDPR
MUD9O<BC*0BPQ+,I+*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J]UD5N9-9';W1O
M(%)44T-(2]9,8FP@4E130TA+UDEF(,I25%,]/3$PUD=O=&\@4E13,3#6268@
MRE)44ST],C#61V]T;R!25%,R,-9)9B#*4E13/3TS,-9';W1O(%)44S,PUDEF
M(,I25%,]/30PUD=O=&\@4E13-##6268@RE)44ST]-3#61V]T;R!25%,U,-9)
M9B#*4E13/3TV,-9';W1O(%)44S8PUDEF(,I25%,]/3<PUD=O=&\@4E13-S#6
M268@RE)44ST].##61V]T;R!25%,X,-9)9B#*4E13/3TY,-9';W1O(%)44SDP
MUDEF(,I25%,]/3$P,-9';W1O(%)44S$P,-9,8FP@1DE.25-(1436,!S*03K*
M4T],''C61F]R*,I"+#$LRKPIUG@H,2S*0BDO*"C*5%-44%0K>"@R+,I"*2E>
M>"@S+,I"*2DKRD$<RD'616YDUBAP179A;"C*3E5-+,I44U105"DO<$5V86PH
MRD1%3BS*5%-44%0I*1S*0M9#;$Q#1-9$:7-P(")!;G,]Q@II+RAX*PMI*5X,
M:2+61&ES<"`B("`@(%L*,2P*,BP*,RXN+BXN72+61&ES<"`B("`@(%L+,2P+
M,BP+,RXN+BXN72+61&ES<"`B("`@(%L,,2P,,BP,,RXN+BXN72+686)S("C*
M02W*0BD<RM9)9B#*/G1O;-94:&5NUD]U='!T*#(L,2PB/S\_/R(IUD]U='!T
H*#,L,2PB("`_(BG63W5T<'0H-"PQ+"(@/R+616YDUG@%1G)A8]8A'P``
`
end
----end UUE----   



From rpd@umdsun2.umd.umich.edu Mon Jun  7 19:28:04 1993
Received: from umdsun2.umd.umich.edu by mathserv.mps.ohio-state.edu with SMTP id AA01590
  (5.65c/IDA-1.4.4 for <GRAPH-TI@function.mps.ohio-state.edu>); Mon, 7 Jun 1993 19:28:00 -0400
Received: from umdesun7.umd.umich.edu by umdsun2.umd.umich.edu (4.1/SMI-4.1)
	id AA02983; Mon, 7 Jun 93 19:26:37 EDT
Received: by umdesun7.umd.umich.edu (4.1/SMI-4.1)
	id AA00682; Mon, 7 Jun 93 19:25:29 EDT
Date: Mon, 7 Jun 1993 19:25:09 -0400 (EDT)
From: ravi prasad <rpd@umdsun2.umd.umich.edu>
Subject: 
To: Graph TI bulletin board <GRAPH-TI@math.ohio-state.edu>
Message-Id: <Pine.3.05.9306071909.B674-c100000@umdsun2.umd.umich.edu>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

PUT SERPL.RAV
This program is used by me quite frequently as it quickly 
computes the Equivelent Resistor, Cap, and Inductor values etc.
----begin documentation----
You must first run the uudecode "UUD20" program which will create the
"SerPl.85P" file and then you must run the "LINK85" program to load
the file to your TI85.
                          Running the program.

Simply execute the "SerPl" program by selecting it from the PROG
menu. Since Cappacitors in series along with Conductance in 
series have the same simplification routine as Resistors, 
Inductors, and Impedences in parallel, you can use this 
program to simplify some of the computations for their 
equivelent values.  

Example:        If you have 5 resistors in Parallel, simply 
                type the value of each resistor one at a time.
                When done, type "0" as the last resistor (zero)
                value.  The equivelent resistor value is given.

                Since parallel inductors and Impedence values are 
                calculated in the same manner as resistors in prallel,
                the above technique may again be used except 
                replacing resistor value by the inductor value.

                Since Cappacitors in series and Conductance in 
                series are computed in the same manner as resistors 
                in parallel, simply type the cappacitor values 
                in place of the resistor values.  The same is true for 
                conductance.

                           Req -----> Resistor equivelent
                           Leq -----> Inductor equivelent
                           Zeq -----> Impedence equivelent
                           Ceq -----> Cappacitor equivelent
                           Geq -----> Conductance equivelent

                NOTE: THE PROGRAM WILL ALSO HANDLE COMPLEX 
                      VALUES, AS IT WAS NECESSARY FOR ME TO BE 
                      ABLE TO WORK WITH IMPEDENCE EXPRESSED AS
                      "jwc" or "1/jwl" etc. FOR CAPS AND INDUCTORS 
                      RESPECTIVELY.
        
                      To enter complex numbers such as "1/(jwc)"
                      I usually type "1/(0,w*c)" where omega 
                      "w" is the angular fequency of the input signal 
                        and "c" is the cappacitor value.

I hope this program save someone a little time.  I know it 
saves me a LOT of time.

If any problems exist, feel free to talk to me at my email 
address:   rpd@umdsun2.umd.umich.edu

I have been using this program for over a year without any 
problems.
 
----end documentation----
----begin ASCII----
\START\
\COMMENT=Program file dated 04/17/93, 17:55
\NAME=SerPl
\FILE=SERPL.85P
ClLCD
Disp "This program finds"
Disp "parallel Req,Leq,Zeq"
Disp "or series Ceq,Geq"
Disp "~~~~~~~~~~~~~~~~~~~~":0\->\\UC-Omega\
Lbl \UC-Omega\
Input "LRC:",\UC-Omega\\UC-Omega\
If norm \UC-Omega\\UC-Omega\\<>\0
Then
\UC-Omega\+\UC-Omega\\UC-Omega\\^-1\\->\\UC-Omega\
Goto \UC-Omega\
Else
End
ClLCD:Disp "Circuit Equiv. Value":\UC-Omega\\^-1\
\STOP\       
----end ASCII----
----begin UUE----
begin 644 serpl.85p
M*BI423@U*BH:#`!0<F]G<F%M(&9I;&4@9&%T960@,#0O,S`O.3,L(#$P.C$Y
M```G,<=GK)+!``D`M``2!5-E<E!LM`"R`.QOZ2U4:&ES('!R;V=R86T@9FEN
M9',`;^DM<&%R86QL96P@4F5Q+$QE<2Q:97$`;^DM;W(@<V5R:65S($-E<2Q'
M97$`;^DM?GY^?GY^?GY^?GY^?GY^?GY^?GX`;D0P``LSRF_@R@!OYBU,4D,Z
M`"\TRLIOV+HTRLI51#``;]EO,\I@-,K*20LSRF_A`&;*`&_:;]YO[&[I+4-I
9<F-U:70@17%U:78N(%9A;'5E`&XSRDEP30``
`
end  
----end UUE---- 




----end uue----
