4

I have a PDE (1D Schrödinger equation) as follows:

$$iu_t-\frac12 u_{xx}-\left(|u|^2-A\right)u=0$$

Applying the following transformations to the PDE,

$$\operatorname{u}(x,y,t)=\operatorname{u}(\xi) e^{i\theta},\quad \xi=x+y+\alpha t,\;\theta=\alpha x+\beta y+\gamma t$$

we get the following ODE:

$$\frac12 u^{\prime\prime}+\left(\gamma-\frac12\alpha^2\right)u+u\left(u^2-A\right)=0$$

How to achieve the transformation above using DSolveChangeVariables introduced in Mathematica 13.1?

My Try:

eq = 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;
deq = Inactive[DSolve][eq, u, {x, y, t}];
DSolveChangeVariables[deq, 
  U, ξ, {u[x, y, t] == U[ξ]*E^(I*θ), ξ == 
    x + y + α*t, θ == α*x + β*y + γ*t}] // Simplify
J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
RF_1
  • 672
  • 2
  • 7
  • With all due respect, this new question is careless. You don't even update the incorrect DChange code. – xzczd Jul 02 '22 at 06:17
  • Still, the update is careless. Why do you keep pde there while you already have eq? Also, as pointed out in the original post, the given ODE is not correct unless $u(\xi)\geq 0$, but this is not clarified at all. – xzczd Jul 02 '22 at 06:31
  • I think you didn't see the latest update of the post. Since I am on mobile phone, I did a mistake in first version. You are right. Sorry for this. – RF_1 Jul 02 '22 at 06:33
  • Can you help me for reopening the post? – RF_1 Jul 02 '22 at 06:36

1 Answers1

7

The problem can be solved with new-in-13.1 DSolveChangeVariables of course. If you read the document carefully, you'll notice the correct syntax should be

eq = With[{u = u[x, y, t]}, I D[u, t] - 1/2 D[u, {x, 2}] - (Abs[u]^2 - A) u == 0];
deq = Inactive[DSolve][eq, u, {x, y, t}];
DSolveChangeVariables[deq, U, {ξ, y, θ}, 
                      {u[x, y, t] == U[ξ] E^(I θ), 
                       ξ == x + y + α t, θ == α x + β y + γ t}] // 
 Simplify[#, θ ∈ Reals] &
(*
Inactive[DSolve][(2 A + α^2 - 2 γ - 2 Abs[U[ξ]]^2) U[ξ] == U''[ξ], 
                 U, {ξ, y, θ}]
 *)

As we can see, the obtained equation is the same as the one given by DChange.

xzczd
  • 65,995
  • 9
  • 163
  • 468