# DChange fails to change variables for 1D Schrödinger equation

I have a PDE (1D Schrödinger equation) as follows: Applying the following transformations to the PDE, we get the following ODE: I am trying to use @Kuba 's DChange package in the link. But I can't get the results.

 pde = I *D[u[x, y, t], t] -
1/2 D[u[x, y, t], {x, 2}] - ( Abs[u[x, y, t]]^2 - A)*u[x, y, t] == 0;

DChange[pde, {u[x, y, t] == U[ξ]*E^(I*θ), ξ ==
x + y + α*t, θ == α*x + β*y + γ*t}, {x, y, t}, {ξ}, {u[x, y, t]}]

• Maple 2021 answers $$u\! \left(x,t\right)=-\frac{\tanh\! \left(\frac{3 \,\mathrm{I} A t}{4}-\frac{\sqrt{-A}\, x}{2}-\textit{_}\mathit{C1}\right) \mathrm{\sqrt{A}}}{2}-\frac{\sqrt{A}}{2}$$ and that was verified for $A=1$. Jun 17, 2021 at 15:42
• @RF_1 Try to use u = U[\[Xi]]* E^(I*\[Theta]) /. {\[Xi] -> x + y + \[Alpha]*t, \[Theta] -> \[Alpha]*x + \[Beta]* y + \[Gamma]*t}; and I*D[u, t] - 1/2 D[u, {x, 2}] - (Abs[u]^2 - A)* u /. {Im[x \[Alpha] + y \[Beta] + t \[Gamma]] -> 0, (x \[Alpha] + y \[Beta] + t \[Gamma]) -> 0} // FullSimplify Jun 17, 2021 at 16:22
• How to achieve the transformation above using DSolveChangeVariables introduced in Mathematica 13.1? please make this separate question. Jul 2, 2022 at 5:35
• I have shared a new question
– RF_1
Jul 2, 2022 at 6:13
• The new question is here: mathematica.stackexchange.com/q/270262/1871 Jul 2, 2022 at 6:46

If you read the description of DChange carefully, you'll find DChange owns 3 usages:

Usage:

DChange[expresion, {transformations}, {oldVars}, {newVars}, {functions}]

DChange[expresion, "Coordinates1"->"Coordinates2", ...]

DChange[expresion, {functionsSubstitutions}]


You can also skip {} if a list has only one element.

The first 2 are for change of independent variables, the last 1 for dependent variables, but you've mixed up 1st and 3rd. The correct usage should be:

DChange[pde, {ξ == x + y + α t, θ == α x + β y + γ t}, {x, t}, {ξ, θ}, u[x, y, t]]

DChange[%, u[ξ, y, θ] == U[ξ] E^(I θ)]

Assuming[{θ ∈ Reals}, Simplify@%]
(* (2 A + α^2 - 2 γ - 2 Abs[U[ξ]]^2) U[ξ] == U''[ξ] *)


Not exactly the same as the one in the picture, but I think it's obvious mine is correct, unless you forgot to mention $$u(\xi)>0$$ in the question.

BTW, given the example is relatively simple, it's not too bad a choice to transform without DChange:

func[x_, y_, t_] = With[{ξ = x + y + α t, θ = α x + β y + γ t}, U[ξ] E^(I θ)]

Assuming[{{x, y, t, α, β, γ} ∈ Reals}, pde /. u -> func // Simplify] /. x + y + α t -> ξ