aboutsummaryrefslogtreecommitdiff
path: root/src/hyper/pages/FPARFRAC.ht
blob: 2076f958315b346a6fefba1e4d2908bd891e9a5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
% Copyright The Numerical Algorithms Group Limited 1992-94. All rights reserved.
% !! DO NOT MODIFY THIS FILE BY HAND !! Created by ht.awk.
\newcommand{\FullPartialFractionExpansionXmpTitle}{FullPartialFractionExpansion}
\newcommand{\FullPartialFractionExpansionXmpNumber}{9.29}
%
% =====================================================================
\begin{page}{FullPartialFractionExpansionXmpPage}{9.29 FullPartialFractionExpansion}
% =====================================================================
\beginscroll

The domain \spadtype{FullPartialFractionExpansion} implements
factor-free conversion of quotients to full partial fractions.

\xtc{
Our examples will all involve quotients of univariate polynomials
with rational number coefficients.
}{
\spadpaste{Fx := FRAC UP(x, FRAC INT) \bound{Fx}}
}
\xtc{
Here is a simple-looking rational function.
}{
\spadpaste{f : Fx := 36 / (x**5-2*x**4-2*x**3+4*x**2+x-2) \bound{f}\free{Fx}}
}
\xtc{
We use \spadfunFrom{fullPartialFraction}{FullPartialFractionExpansion}
to convert it to an object of type
\spadtype{FullPartialFractionExpansion}.
}{
\spadpaste{g := fullPartialFraction f \bound{g}\free{f}}
}
\xtc{
Use a coercion to change it back into a quotient.
}{
\spadpaste{g :: Fx \free{g}}
}
\xtc{
Full partial fractions differentiate faster than rational
functions.
}{
\spadpaste{g5 := D(g, 5) \free{g}\bound{g5}}
}
\xtc{
}{
\spadpaste{f5 := D(f, 5) \free{f}\bound{f5}}
}
\xtc{
We can check that the two forms represent the same function.
}{
\spadpaste{g5::Fx - f5 \free{Fx g5 f5}}
}
\xtc{
Here are some examples that are more complicated.
}{
\spadpaste{f : Fx := (x**5 * (x-1)) / ((x**2 + x + 1)**2 * (x-2)**3) \free{Fx}\bound{f2}}
}
\xtc{
}{
\spadpaste{g := fullPartialFraction f \free{f2}\bound{g2}}
}
\xtc{
}{
\spadpaste{g :: Fx - f \free{f2 g2 Fx}}
}
\xtc{
}{
\spadpaste{f : Fx := (2*x**7-7*x**5+26*x**3+8*x) / (x**8-5*x**6+6*x**4+4*x**2-8) \free{Fx}\bound{f3}}
}
\xtc{
}{
\spadpaste{g := fullPartialFraction f \free{f3}\bound{g3}}
}
\xtc{
}{
\spadpaste{g :: Fx - f \free{f3 g3 Fx}}
}
\xtc{
}{
\spadpaste{f:Fx := x**3 / (x**21 + 2*x**20 + 4*x**19 + 7*x**18 + 10*x**17 + 17*x**16 + 22*x**15 + 30*x**14 + 36*x**13 + 40*x**12 + 47*x**11 + 46*x**10 + 49*x**9 + 43*x**8 + 38*x**7 + 32*x**6 + 23*x**5 + 19*x**4 + 10*x**3 + 7*x**2 + 2*x + 1)\free{Fx}\bound{f4}}
}
\xtc{
}{
\spadpaste{g := fullPartialFraction f \free{f4}\bound{g4}}
}
\xtc{
This verification takes much longer than the conversion to
partial fractions.
}{
\spadpaste{g :: Fx - f \free{f4 g4 Fx}}
}

For more information, see the paper:
Bronstein, M and Salvy, B.
``Full Partial Fraction Decomposition of Rational Functions,''
{\it Proceedings of ISSAC'93, Kiev}, ACM Press.
All see \downlink{`PartialFraction'}{PartialFractionXmpPage}\ignore{PartialFraction} for standard partial fraction
decompositions.
\endscroll
\autobuttons
\end{page}
%