Hi bgs
Many thanks. This generates the correct coefficients. I am studying
your implementation now. I've not used a dictionary of dictionaries
before so there's a bit of a learning curve going on right now. However
I can see that b[k] holds the relevant info (coefficients and powers)
so I can eas
You could probably use scipy.base.polynomial, but it's easy enough to
implement a polynomial yourself. Just use a dict-- each key represents
the power and each value the coefficient of the polynomial.
You didn't say exactly how efficient you need this. It takes only a
couple seconds to sum 100 o
Hi Bengt
OK, that's right. So I'm curious how you did this. And any comments on
how to collect coefficients of like powers in your result.
Be Well and Happy Always
Chris
--
http://mail.python.org/mailman/listinfo/python-list
Hi Terry
I apprecaite the advice. Briefly I'm familiar with the math (its an
eigenvalue problem in fluid flow) but not so much with python (3 months
on and off), hence my post here. I'm looking for python advice on how
to implement this effectively. I love python and would like to use it
well.
As
Seems You are looking for a generating function of a recurrence
relation. There is a standard text about this topic written by Herbert
S. Wilf downloadable from his homapage:
http://www.cis.upenn.edu/~wilf/
Regards,
Kay
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 27 Apr 2005 11:34:53 GMT, "chris" <[EMAIL PROTECTED]> wrote:
>The problem I have is as follows:
>
>I have a recursive function b(k)
>
>b(k) = -(A/k**2)*(b(k-2) - b(k-5))
>k<0, b(k)=0
>k=0, b(k)=1
>k=1, b(k)=0
>
>eg. b(2) = -A/4
> b(3) = 0
> b(4) = A**2/64
>
>note that as k increa
"chris" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have a recursive function b(k)
>
> b(k) = -(A/k**2)*(b(k-2) - b(k-5))
This is specifically called a recurrence relation/
[snip]
> When this is expanded I get a polynomial F(A). I want to determine the
> coefficients of the
The problem I have is as follows:
I have a recursive function b(k)
b(k) = -(A/k**2)*(b(k-2) - b(k-5))
k<0, b(k)=0
k=0, b(k)=1
k=1, b(k)=0
eg. b(2) = -A/4
b(3) = 0
b(4) = A**2/64
note that as k increases b(k) can itself be a sum of terms in powers of A
rather than a single power of A