Question: Why this error ?

Hi all,

I have those functions

M:=n->piecewise(And(n::integer,(n/p)::odd),((4*Br)/(mu0*Pi*(n/p)))*sin((Pi/2)*(n/p)),0);

W:=(n,r)->piecewise(And(n::integer,(n/p)::odd),(M(n)*r)/(mu1*(1-n^2)),0);

u1:=(r,theta)->sum((r^n*AI[n]+r^(-n)*BI[n]+W(n,r)*sin(n*theta0))*sin(n*theta)+(r^n*CI[n]+r^(-n)*DI[n]+W(n,r)*cos(n*theta0))*cos(n*theta),n = 1 .. nn);

diff(u1(r,theta),r);

Error, (in type/polynom) too many levels of recursion

Why this error in diff ?

Thanks in advance

Please Wait...