Question: rsolve with f(2m+1)

Hello.

I have a recurrence function that is defined as:

f2m+1(r) = (2m+1)*f2m(r)/a - r2m+1*exp(-a*r)/a
f1( r) = -(1+a*r)*exp(-a*r)/a2

I tried to solve this recurrence considering N=2m+1, since we can not define f(r, 2m+1)...

rsolve({f(r, 1) = -(1+a*r)*exp(-a*r)/a^2, f(r, N) = N*f(r, N-1)/a-r^N*exp(-a*r)/a}, {f})

But when I substitute in the result, the function is not correct.

Can someone help? Thanks!!

This has been branched into the following page(s):
Please Wait...