Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Consider the following substitution

Derivative[2, 0][S][th, ph] /. S -> Function[{th, ph}, SphericalHarmonicY[3, 0, th, ph]]

which gives correct answer. While for some cases, eg.

Derivative[2, 0][S][th, ph] /. S -> Function[{th, ph}, SphericalHarmonicY[3, 3, th, ph]]

will produce the

Infinity::indet: Indeterminate expression (0 24 \[Sqrt]70 E^(-I \[Phi]) ComplexInfinity)/(12 \[Sqrt]35) encountered. >>

error. Of course the command

D[SphericalHarmonicY[3, 3, th, ph], {th, 2}]

will produce the desired output. So the question is what is wrong with the substitution rule?

share|improve this question
    
The problem seems to be caused by the Gamma function generated by the direct derivation. Observe the result of Derivative[2, 0][SphericalHarmonicY[3, 3, #, #2] &] and try Limit[Derivative[2, 0][SphericalHarmonicY[3, 3, #, #2] &] /. Gamma[a_] -> Gamma[a + c], c -> 0][th, ph] // Simplify. Not sure if it's a bug or just the property of SphericalHarmonicY. –  xzczd Mar 11 at 2:32
    
This looks rather as a bug... –  mmal Mar 26 at 20:02

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.