The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Variable transformations
Replies: 3   Last Post: Sep 8, 2013 2:52 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Kevin J. McCann

Posts: 147
Registered: 12/7/04
Re: Variable transformations
Posted: Jul 23, 2013 5:14 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Here is some code that I think I found, but may have written, a long
time ago.

First the Function. The key is the Nest, which takes care of the

Clear[COV, DEQ, \[Psi], x, z, f, n]
COV::usage =
"COV[DEQ,\[Psi],x,z,f] changes the independent variable in a \
differential equation from x to z where x=f[z]. \[Psi] is the \
dependent variable or
function we are solving for.";

COV[DEQ_, \[Psi]_, x_, z_,
f_] := (DEQ /. {D[\[Psi][x], {x, n_Integer}] :>
Nest[(D[#, z]/D[f, z]) &, \[Psi][z], n], \[Psi][x] :> \[Psi][z],
x :> f}

Here is an example of the usage:

de = -(\[HBar]^2/(2 m)) \!\(
\*SubscriptBox[\(\[PartialD]\), \({x, 2}\)]\(\[Psi][x]\)\) +
1/2 m \[Omega]^2 x^2 \[Psi][x] - e \[Psi][x]

COV[de, \[Psi], x, z, \[Alpha] z + \[Beta]]

Hope this helps,


On 7/23/2013 4:43 AM, Nicholas Chisholm wrote:
> Say I have some differential equation in terms of the independent variable
> Thanks!

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.