On Thu, 2010-05-13 at 20:48 +0200, Nicolas FRANCOIS wrote:
> Hi.
>
> Is there any way to obtain the decomposition in simple elements (don't
> know exactly how to say this in english) of a fraction of the form :
>
> 1
> -------------------
> (1-X)(1-X^2)(1-X^5)
>
> (to obtain its formal series equivalent \sum a_nX^n, a_n being the
> number of ways to pay n? using 1, 2 and 5? corners (no, there
> is no such thing as a 5? corner, but there's a 5? banknote !)).
>
> I'd like to obtain the C-decomposition, what do I have to do ?
Hi Nicolas,
I think you are referring to the "partial fraction expansion", which is
done with the function partfrac, like this:
(%i3) partfrac( 1 /(1-x) / (1-x^2) / (1-x^5), x);
3 2
x + 2 x + x + 1 1 13
(%o3) ------------------------ + --------- - ----------
4 3 2 8 (x + 1) 40 (x - 1)
5 (x + x + x + x + 1)
1 1
+ ---------- - -----------
2 3
4 (x - 1) 10 (x - 1)
If the previous result is unreadable in your mail reader, here it is 1D
form:
(%i4) grind(%);
(x^3+2*x^2+x+1)/(5*(x^4+x^3+x^2+x+1))
+1/(8*(x+1))-13/(40*(x-1))+1/(4*(x-1)^2)-1/(10*(x-1)^3)$
In fact, partfrac was the reason I started using Macsyma 25 years ago.
In my thesis I needed to decompose expression with 8th degree
polynomials in the denominator (correlation functions for a 4-quark
cluster). A still have copies of the several pages that it used to take
to show the complete result.
Regards,
Jaime