# Legendre's Equation & Bonnet's Recursion

1. Sep 17, 2007

### BackEMF

This seemed to be the most appropriate forum for this.

I've been doing a bit of self-study of Kreyszig's Advance Engineering Mathematics (which I think is an excellent book). Doing out one of the problems (Chapter 5, 14 (d), pg 181 in the 9th International Edition) I've come across Bonnet's Recursion formula, which goes:

$$(n+1)P_{n+1}(x)=(2n+1)xP_{n}(x)-nP_{n-1}(x)$$

which is fine & makes perfect sense. But then he goes on to say:

"This formula is useful for computations, the loss of significant digits being small (except near zeros). Try [this formula] out for a few computations of your own choice."

This is the bit I can't figure out. How is it useful for computations? What kind of comptations? I can't think of anything that would yield "lossy" computations, I mean it will compute the next Legendre Polynomial EXACTLY from the two previous ones. Whatever computations Kreyszig's talking about, they obviously don't give exact results since he talks about "loss of significant digits".

Can anybody shed any light on this?

Thanks!

2. Sep 17, 2007

### genneth

When using any practical computational device, you will never get infinite precision. The naive way to evaluate polynomials tend to be very badly behaved for larger x, as you end up subtracting very large terms to get a small value. This recursion formula is similar to Horner form for generic polynomials.

3. Sep 17, 2007

### BackEMF

Ah yes, that makes sense. I wasn't thinking about floating point approximations at all, but that clears it up.

Thanks Genneth!