Change variables and expand around new variable (Mathematica)

AI Thread Summary
The discussion centers on expanding a differential expression in Mathematica around a new variable, specifically changing from r to x=1/r for weak-field limits in general relativity. The user encounters errors when attempting this, particularly with Mathematica not recognizing 1/r as a valid variable. Suggestions include creating a simplified example to isolate the issue and exploring whether the problem lies in the variable change or the expression itself. The user notes that Maple can handle this transformation effectively with its dchange function, prompting a search for similar functionality in Mathematica. The conversation highlights the challenges of variable substitution in Mathematica and suggests seeking further assistance in specialized forums.
ramparts
Messages
44
Reaction score
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.)
 
Mathematics news on Phys.org
I don't have Mathematica, but I suggest that you create a simplified example of this situation and see if error happens. If it does, you can post the example. If it doesn't, it might lead to some other aspect of the problem that you failed to capture in the example.
 
I think the problem boils down to this: given a differential expression (like the one I posted) I don't know how, in Mathematica, to change variables and have Mathematica do all the chain rule through. I've since learned that Maple can do this (and indeed I've been using Maple for what I need to do) with its dchange function in the PDETools. I wonder how one can get the same functionality within Mathematica.
 
I can't help with that. I suggest you ask in the forum section Physics Forums > Other Sciences > Computing & Technology. > Math & Science Software
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...

Similar threads

Back
Top