<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<font face="Courier New">Dear All,<br>
<br>
I'm wonderig whether there is a standard method to obtain the
partial fraction expansion of a rational function.<br>
<br>
Searching, I've found the function pfss(), which purportedly is
meant for that, but I find it doesn't give a complete solution.
For instance:<br>
<br>
// Poles and zeros<br>
p = [-8:-1];<br>
z = [0 0 0 0];<br>
<br>
// Numerator and denominator<br>
N = prod(%s - z)<br>
D = prod(%s - p)<br>
<br>
// Rational function<br>
H = N/D<br>
<br>
// Partial fractions<br>
HH = pfss(H)<br>
<br>
The result is <br>
<br>
HH = <br>
HH(1)<br>
<br>
-8 -5.7428571s -3.9515873s² +0.2960317s³ -0.0946429s⁴
-0.006746s⁵ -0.0001984s⁶ <br>
------------------------------------------------------------------------------
<br>
40320 +69264s +48860s² +18424s³ +4025s⁴ +511s⁵ +35s⁶
+s⁷ <br>
<br>
HH(2)<br>
<br>
0.0001984 <br>
--------- <br>
1 +s <br>
<br>
The second component in the list is indeed one of the partial
fractions, but the first one is not an irreductible version.
Computing HH(1) + HH(2) yields H with good approximation.<br>
<br>
I guess I could proceed iteratively with HH(1), but it would be
nice to have a function performing this automatically. I couldn't
find such a function <br>
<br>
Regards,<br>
<br>
Federico Miyara<br>
<br>
</font>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br /> <table style="border-top: 1px solid #D3D4DE;">
<tr>
<td style="width: 55px; padding-top: 18px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
<td style="width: 470px; padding-top: 17px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Libre de virus. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avast.com</a> </td>
</tr>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>