I set the following to N=5, and want to do a convergence test on u:
n = 5; u[r_, phi_, n_] :=
Piecewise[{{BesselJ[1.5 r, n]*Exp[I n phi],
0 < r < 1/2}, {(BesselJ[3 r, n] + BesselY[3 r, n])*Exp[I n phi],
1/2 < r < 1}, {HankelH1[r, n]*Exp[I n phi], r > 1}}]
and the convergence test:
SumConvergence[u[r, phi, 5], n]
But the i get:
"SumConvergence::ivar: 5 is not a valid variable."
I try to set a number for it, but that is not accepted either.
How is this done correctly?
5
(therefore notn
), since that is constant. The index should be the second argument ofSumConvergence[]
. $\endgroup$ivar
error with the code in your comment: i.sstatic.net/7ccuO.png -- Is that a successful use? (You didn't give an answer to "what is the index variable?". The constant0
cannot be an index variable, but I'm not sure whether "That is a 0" was meant to be an answer.) $\endgroup$True
: i.sstatic.net/ai4lk.png $\endgroup$