       Re: variable substitution in differential eqns

• To: mathgroup at smc.vnet.net
• Subject: [mg61980] Re: variable substitution in differential eqns
• From: "Joseph Fagan" <noemailplease at nowhere.ru>
• Date: Sun, 6 Nov 2005 19:46:24 -0500 (EST)
• References: <200511050653.BAA02074@smc.vnet.net> <dkksbu\$rd6\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Thanks all for you help. Lots to absorb here.
Joe

"Carl K. Woll" <carl at woll2woll.com> wrote in message
news:dkksbu\$rd6\$1 at smc.vnet.net...
> Joseph Fagan wrote:
>> 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
>>
>
> The question is how to convert y''[x] to the appropriate expression when
> x -> 1/z. One idea is to use Composition:
>
> In:=
> y''[x] /. y->Composition[y,1/#&] /. x->1/z
>
> Out=
>    3          4
> 2 z  y'[z] + z  y''[z]
>
> The equation to be transformed has the left hand side:
>
> lhs = y''[x] + P[x]y'[x] + Q[x]y[x]
>
> Using the Composition rule, we find:
>
> In:=
> lhs /. y->Composition[y,1/#&] /. x->1/z
>
> Out=
>   1            3          2   1           4
> Q[-] y[z] + 2 z  y'[z] - z  P[-] y'[z] + z  y''[z]
>   z                           z
>
> If we want to have Q and P transformed as well, we should include
> Composition rules for them too:
>
> In:=
> lhs /. h_ /; MemberQ[{P,Q,y},h] -> Composition[h,1/#&] /. x->1/z
>
> Out=
>                3          2               4
> Q[z] y[z] + 2 z  y'[z] - z  P[z] y'[z] + z  y''[z]
>
> This agrees with equation (6) from the MathWorld link.
>
> Carl Woll
> Wolfram Research
>

```

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