MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: variable substitution in differential eqns

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61975] Re: variable substitution in differential eqns
  • From: Peter Pein <petsie at dordos.net>
  • Date: Sun, 6 Nov 2005 05:12:30 -0500 (EST)
  • References: <dkhm55$2e8$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Joseph Fagan schrieb:
> For Calculus of Variations, I need to make some hairy variable
> substitutions.
> 
> A simple substitution example is shown here in the first few lines.
> 
> See
> http://mathworld.wolfram.com/Second-OrderOrdinaryDifferentialEquation.html
> 
> If I make the substitution x=1/z how can I get Mathematica to give
> me eqn (2)
> and eqn (5)
> and, being greedy, eqn (6)?
> or point me to where to begin.
> 
> Thanks
> Joe 
> 
> 

Hi Joe,

replace y[x] by y, y'[x] by Dt[y]/Dt[x] and so on:

In[1]:=
expr = y''[x] + p[x]*y'[x] + q[x]*y[x];
In[2]:=
Collect[Expand[Simplify[
   expr /. {Derivative[n_][y][x]:>Nest[Dt[#1]/Dt[x]&, y, n], y[x] -> y}
        /. x -> 1/z /. y -> y[z]]],
   Derivative[_][y][z] ]
Out[2]=
q[1/z]*y[z] + (2*z^3 - z^2*p[1/z])*y'[z] + z^4*y''[z]

the missing handling of p and q can be done by
a) hand
b) more effort, writing a function.

but I hope this helps a little bit.

Peter


  • Prev by Date: Re: Mathematica 1
  • Next by Date: Re: Mathematica GuideBooks
  • Previous by thread: Re: variable substitution in differential eqns
  • Next by thread: Re: variable substitution in differential eqns