The following code is not working for argument nn>1. Hold statement Hold[0.62+v0[1,0]]
come as output for v0[2,0]
.
v0[0, 0] = 0.12; v0[nn_, ll_] = PiecewiseExpand[ Piecewise[{{v0[nn - 1, 0] + 0.02 ll (3 ll + 5) + 1/2,nn != 0 && ll != 0}, {v0[nn - 1, 0] + 1/2,nn != 0 && ll == 0}, {v0[0, 0] + 0.02 ll (3 ll + 5),nn == 0 && ll != 0}, {0.12, nn == 0 && ll == 0}}]]
I have to use this function as V0[nn,ll]
further for example:
vl[x_] := -((4*as)/(3 x)) + (a*x^2) - v0[nn, ll]
I don't know if this requires some loop. Please help. This is my first question here.