Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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[1] SphericalBesselJ[l, ρ] + C[2] SphericalBesselY[l, ρ]}} 

But when I add the condition:

R[0] ==0


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

The output is:

{ }

Why is this the case?

share|improve this question
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
up vote 1 down vote accepted

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

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


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[1],C[2] 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] == 0} , R[p], p]

R[p] -> p C[1]

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.)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.