- #1
ramparts
- 45
- 0
I have a differential expression that I want to expand to some order around infinity (it's for calculating weak-field limits in GR). I have two functions, B(r) and n(r), and some expression involving them along the lines of
n[r] (3 r B'[r]^2 - 4 B[r] (2 B'[r] + r B''[r]))
Basically I want to change variables to x=1/r and expand this expression around x=0 to, say, 5th order. This seems like it would be fairly simple, but I must be doing something wrong because Mathematica keeps giving me errors like
General::ivar: "1/r is not a valid variable."
I've tried several ways of doing this, but I'm still learning Mathematica so I'd appreciate having the right way pointed out! Thanks.
(I've also tried expanding around {r,Infinity,5} and just gotten a symbolic result which wasn't useful.)
n[r] (3 r B'[r]^2 - 4 B[r] (2 B'[r] + r B''[r]))
Basically I want to change variables to x=1/r and expand this expression around x=0 to, say, 5th order. This seems like it would be fairly simple, but I must be doing something wrong because Mathematica keeps giving me errors like
General::ivar: "1/r is not a valid variable."
I've tried several ways of doing this, but I'm still learning Mathematica so I'd appreciate having the right way pointed out! Thanks.
(I've also tried expanding around {r,Infinity,5} and just gotten a symbolic result which wasn't useful.)