The perturbed sine-Gordon equation.

  • Thread starter Thread starter sigmund
  • Start date Start date
sigmund
Messages
23
Reaction score
0
Well, maybe this is not a mathematics question after all, but however, I ask it here.

I have to implement a semi-difference scheme in Matlab of the perturbed sine-Gordon equation

<br /> u_{1,t}=u_2<br />
<br /> u_{2,t}=u_{1,xx}-\sin(u_1)-\alpha u_2+\gamma.<br />

Here u_1 and u_2 are functions of x and t, and \alpha and \gamma are constants. Solutions are searched in the interval 0\leq x\leq\ell and for t\geq0.

Discretization gives

<br /> u_{1i,t}=u_{2i}<br />
<br /> u_{2i,t}=\frac{1}{(\Delta x)^2}(u_{1(i-1)}-2u_{1i}+u_{1(i+1)})-\sin(u_{1i})-\alpha u_{2i}+\gamma<br />

for i=2,3,\dots,N-1.
For i=1 and i=N we get

<br /> u_{11,t}=u_{21}<br />
<br /> u_{21,t}=\frac{1}{(\Delta x)^2}(2u_{12}-2u_{11}-2\eta\Delta x)-\sin(u_{11})-\alpha u_{21}+\gamma<br />

and

<br /> u_{1N,t}=u_{2N}<br />
<br /> u_{2N,t}=\frac{1}{(\Delta x)^2}(2u_{1(N-1)}-2u_{1N}+2\eta\Delta x)-\sin(u_{1N})-\alpha u_{2N}+\gamma<br />

respectively.
Here, the constant \eta comes from the two boundary conditions u_x(0,t)=\eta and u_x(\ell,t)=\eta.

I have implemented this into Matlab. The implementation is seen in the attached files sineG.m and sineGsol.m. I believe my implementation is correct, but I do not get the correct solution.

I would like to receive some comments on the implementation. Do you see any errors? It might be that I am plotting the wrong values against each other.
 

Attachments

Last edited:
Physics news on Phys.org
Well, after all, everything is correct. It just occurred to me that I did not plot the correct arrays against each other. I've corrected that, and now I have got the correct solutions.
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top