# Solving differential equation - initial condition

I want to solve the differential equation:

DSolve[{R''[ρ] + 2 /ρ R'[ρ] + (1 - (l (l + 1))/ρ^2) R[ρ] == 0}, R[ρ], ρ]


This works fine and outputs:

{{R[ρ] -> C SphericalBesselJ[l, ρ] + C SphericalBesselY[l, ρ]}}


But when I add the condition:

R ==0


i.e.

DSolve[{R''[ρ] + 2 /ρ R'[ρ]] + (1 - (l (l + 1))/ρ^2) R[ρ] == 0,
R == SphericalBesselJ[1, 0]}, R[ρ], ρ]


The output is:

{ }


Why is this the case?

• You have syntax errors. DSolve[{R''[ρ] + 2 /ρ R'[ρ]] + is not correct syntax. Did you copy this as is from your notebook? – Nasser May 29 '14 at 20:52

You can see why this happens if you evaluate your general result at zero :

     C SphericalBesselJ[1, 0] + C SphericalBesselY[1, 0]


ComplexInfinity

while of course only one of the solutions is singular:

      {SphericalBesselJ[1, 0], SphericalBesselY[1, 0]}


{0, ComplexInfinity}

So it seems DSolve simply tries to solve for C,C to satisfy the b.c. and fails.

As to why DSolve isnt smart enough to discard the singular solution, that is a good question.

Note that it does solve this related system that shows the same issue with one singular solution that must be discarded.

 DSolve[ { R''[p] + (2 R'[p])/p - (2 R[p])/p^2 == 0 , R == 0} , R[p], p]


R[p] -> p C

Here you get a warning

is possible that some of the conditions have been specified at a singular point for the equation

(For the example I set l=1 by the way. The unspecified parameter presents another potential issue but its not the cause of the problem here.)