4
$\begingroup$

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
$\endgroup$
4
  • $\begingroup$ With all due respect, this new question is careless. You don't even update the incorrect DChange code. $\endgroup$
    – xzczd
    Jul 2, 2022 at 6:17
  • $\begingroup$ 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. $\endgroup$
    – xzczd
    Jul 2, 2022 at 6:31
  • $\begingroup$ 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. $\endgroup$
    – RF_1
    Jul 2, 2022 at 6:33
  • $\begingroup$ Can you help me for reopening the post? $\endgroup$
    – RF_1
    Jul 2, 2022 at 6:36

1 Answer 1

7
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.