On Fri, 2006-11-24 at 11:22 +0100, Hugo Coolens wrote:
> zth[1]:1/(1+s);
> zth[m]:(1+zth(m-1)*s)/(1+s*(1+zth(m-1)));
>
> I hoped that xmaxima would produce (1+2*s)/(1+3*s+s^2) when entering
> zth[2];
>
> but it doesn't, can anyone here explain me why it doesn't and how to
> make
> xmaxima produce the expected result using recursion.
You have two syntax errors:
1. in the definition of zth[m] you must use := instead of :
2. on the right-hand side of the definition of zth[m], you must
use square brackets for zth[m-1], instead of round parenthesis.
Jaime Villate