1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Change variables and expand around new variable (Mathematica)

  1. Aug 10, 2012 #1
    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.)
     
  2. jcsd
  3. Aug 12, 2012 #2

    Stephen Tashi

    User Avatar
    Science Advisor

    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.
     
  4. Aug 12, 2012 #3
    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.
     
  5. Aug 13, 2012 #4

    Stephen Tashi

    User Avatar
    Science Advisor

    I can't help with that. I suggest you ask in the forum section Physics Forums > Other Sciences > Computing & Technology. > Math & Science Software
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Change variables and expand around new variable (Mathematica)
  1. Variable Change (Replies: 69)

Loading...