# Validating a solution for a differential equation with DiracDelta

For the following differential equation

$$\displaystyle-\frac{∂ ^2\phi2 (x)}{∂ x^2}+λ ~[\phi2 (x)]^3-\mu ^2~\phi2 (x)=\phi2(x)~δ(x)$$

-D[ϕ2[x], {x, 2}] - μ^2*ϕ2[x] + λ*ϕ2[x]^3 == ϕ2[x]*DiracDelta[x]


One possible solution for $$\phi2[x]$$ is given by $$\text{\phi 2}(\text{x})\text{:=}\displaystyle\frac{\mu \tanh \left(\frac{\mu \sqrt{x^2}}{\sqrt{2}}\right)}{\sqrt{λ }}$$

ϕ2[x_] := (μ/Sqrt[λ])*Tanh[(Sqrt[x^2]*μ)/Sqrt[2]]


The following command (hopefully?) validates the solution:

Simplify[-D[ϕ2[x], {x, 2}] - μ^2*ϕ2[x] + λ*ϕ2[x]^3 == ϕ2[x]*DiracDelta[x]]

(*True*)


Apparently, another identity/solution is when the RHS is replaced by $$a~constant~~\times~ δ(x)$$

When trying to validate this in MMa, the following doesn't seem to work:

Simplify[-D[ϕ[x], {x, 2}] - μ^2*ϕ[x] + λ*ϕ[x]^3 == constant1*DiracDelta[x]]

(*0 == constant1*DiracDelta[x]*)


Is there a trick here, or is the earlier "validation" of $$\phi2(x)~δ(x)$$ as a solution itself misleading?

Note that $$\sqrt{x^2}$$ is being used for $$|x|$$, since MMa's Abs[x] didn't work for the validation.

• Up to Wiki en.wikipedia.org/wiki/Distribution_(mathematics), the product $\phi2(x)~\delta(x)$ is defined if $\phi2(x)$ is a smooth function. Therefore, $\text{$\phi $2}(\text{x})\text{:=}\displaystyle\frac{\mu \tanh \left(\frac{\mu \sqrt{x^2}}{\sqrt{2}}\right)}{\sqrt{\lambda }}$, not being smooth at the origin, is not any solution of the ODE under consideration. – user64494 Jun 19 '19 at 17:57
• The solution of this equation is known. You may find it in the review of Khlyustikov I N, Buzdin A I "Localized superconductivity of twin metal crystals" Sov. Phys. Usp. 31 409–433 (1988). Alternatively you may find the solution of a somewhat more complex problem (which can be reduced to your one) published in my paper: A. Bulbich and P. Pumpjan, Nucleation on domain walls near singular phase diagram points, Ferroelectrics v.111, p.111-115 (1990). Have a look. – Alexei Boulbitch Nov 11 '20 at 12:23
• @AlexeiBoulbitch: It's interesting. Can you kindly write down that solution? BTW, the references in Khlyustikov I N, Buzdin A I "Localized superconductivity of twin metal crystals" Sov. Phys. Usp. 31 409–433 (1988) do not include any math one. – user64494 Nov 11 '20 at 15:33
• Why not? Equations (4.2), (4.3) and thereafter including the first integral Eq. (4.6). If you do not like that, take my paper. – Alexei Boulbitch Nov 11 '20 at 16:25
• @AlexeiBoulbitch: Can you present that solution explicitely? I have problems with access to the papers indicated by you. – user64494 Nov 12 '20 at 8:51

I don't think, that it is allowed to check an ode with DiracDelta pointwise. Though the first True of your simplification must be wrong.

The general solution fullfills -D[\[Phi]2[x], {x, 2}] - \[Mu]^2*\[Phi]2[x] + \[Lambda]*\[Phi]2[x]^3==0 , x>0 . Dirac only forces a sudden change of the initial conditions.

Integrate your ode in a small range Element[x, {-\[CurlyEpsilon], \[CurlyEpsilon]}]

-\[Phi]2'[\[CurlyEpsilon]]+\[Phi]2'[-\[CurlyEpsilon]]+ 2\[CurlyEpsilon](-\[Mu]^2*\[Phi]2[0] + \[Lambda]*\[Phi]2[0]^3) ==\[Phi]2[0]


Limit \[CurlyEpsilon] -> 0 gives the new initial condition

\[Phi]2'[SuperPlus[0]]==\[Phi]2'[0]-\[Phi]2[0] (*RHS \[Phi][x] DiracDelta[x]*)

\[Phi]2'[SuperPlus[0]]==\[Phi]2'[0]-\[Phi]2[0] (*RHS 1  DiracDelta[x]*)

• Thank you Ulrich. I am trying to trace the exact commands. What would be the command in MMa to perform the following (or the equivalent you suggested), to get from $\int_{-b}^{b} \phi2^{\prime \prime}(x) -a^{2}\int_{-b}^{b} \phi2(x) = k~\int_{-b}^{b} \phi2(x)~\delta(x)$ So that it leads to (LHS) = $\lim_{b\to 0}\,\phi^{\prime}(b) - \phi2^{\prime}(- b)=[\phi2^{\prime}(0)]$ and (RHS) = $k~\int_{-b}^{b} \phi(x)~\delta(x) = k~\phi2(0)$ = $[\phi2^{\prime}(0)]=k\,\phi2(0)$ = $\phi2(x)~=~A~e^{\mp~a~|x|}$ – user58293 Jan 19 '19 at 13:59
• @user58293 Is this a new question/new ode?The initialvalue problem \[Phi]''[x] - a^2 \[Phi][x] == k \[Phi][x] \[Delta][x], \[Phi][0] == \[Phi]0, \[Phi]'[0] == \[Phi]p0 is "equivalent" to \[Phi]''[x] - a^2 \[Phi][x] == 0, \[Phi][0] == \[Phi]0, \[Phi]'[0] == \[Phi]p0+k \[Phi][0] The new initial conditions follows from integrating the ode. – Ulrich Neumann Jan 19 '19 at 14:11
• What's the command to go from integration with limits, and get the "new" initial condition that contains "Superplus"? The modified question in the comment is to try and capture (perhaps) a slightly more common/general case and ensure that my MMa command inputs are exactly as you intended. Thanks again Ulrich! – user58293 Jan 19 '19 at 14:35
• The command is Integrate["ode" ,{x,-b,b},Assumption->b>0 ] with following Limit[...,b->0]. Thereby you have to help MMA a little bit to integrate the LHS. – Ulrich Neumann Jan 19 '19 at 14:37
• My apologies, the steps/commands are still not obvious to me. – user58293 Jan 20 '19 at 0:21

For the second question(see comment) proceed as follows:

initial value problem

 {Derivative[2][ϕ][x] - a^2*ϕ[x] ==  k*ϕ[x]*DiracDelta[x],
ϕ[0]==ϕ0,ϕ'[0]==ϕp0}


integrating the ode in the range -b<x<b, b small

 Derivative[1][ϕ][b]-Derivative[1][ϕ][-b]+  2 b a^2*ϕ[2]
==k*ϕ[0]


Limit b->0

Derivative[1][ϕ][b]-Derivative[1][ϕ][-b] ==k*ϕ[0]


Here you can see the sudden change of Derivative[1][ϕ][x] due to the Dirac-impuls!

The equivalent initial value problem is

{Derivative[2][ϕ][x] - a^2*ϕ[x] ==0 ,
ϕ[0]==ϕ0,ϕ'[0]==ϕp0 +k *ϕ[0]}


can be solved easily

DSolve[{Derivative[2][ϕ][x] - a^2*ϕ[x] ==0, ϕ[0] == ϕ0, ϕ'[0] == ϕp0 +k*ϕ[0]}, ϕ, x][[1]]
(*{ϕ ->Function[{x}, (E^(-a x) (a ϕ0 + a E^(2 a x) ϕ0 - k ϕ0 +E^(2 a x) k ϕ0 - ϕp0 + E^(2 a x) ϕp0))/(2 a)]}*)