hey everyone. i'm having trouble with an iterative function.
this is it:
f[0, n] = Cos[0.45*Sqrt[n + 1]]^2 + Sin[0.45*Sqrt[n]]^2
f[m_, n] :=
Cos[0.45*Sqrt[n + 1]]^2*f[m - 1, n] +
Sin[0.45*Sqrt[n]]^2*f[m - 1, n - 1]
i want to iterate through m but keep n as a variable for plotting later on.
but mathematica keeps having trouble with the last part where it says "n-1"
i've been to a point, where the function would evaluate but there would be the term f[(...),-1+n] in it, which should not be there...
any suggestions, or am i even getting something basic wrong here?
thanks a lot