Thanks for responding Aaron. Here is the relevant part of my session for the attempted r substitution. Can you tell me what I'm doing incorrectly and how to do it right?
In [113]: f = j*(3*x**4 + 6*x**2*y**2 - 24*x**2*z**2 + 3*y**4 - 24*y**2*z**2 + 8*z**4)/(2*(x**2 + y**2 + z**2)**(9/2)) In [114]: f Out[114]: j*(x**2 + y**2 + z**2)**(-4.5)*(3*x**4 + 6*x**2*y**2 - 24*x**2*z**2 + 3*y**4 - 24*y**2*z**2 + 8*z**4)/2 In [115]: f.subs(sympy.sqrt(x**2+y**2+z**2),r) Out[115]: j*(x**2 + y**2 + z**2)**(-4.5)*(3*x**4 + 6*x**2*y**2 - 24*x**2*z**2 + 3*y**4 - 24*y**2*z**2 + 8*z**4)/2 -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/ddbe9b1a-6d54-406d-a8c5-d62f2c158bb7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
