What happens when two breathers meet?

Pseudospectral simulation of a nonlinear Klein–Gordon equation

A breather combines two behaviours that are usually easier to study separately: it is localised in space and oscillatory in time. I used a nonlinear Klein–Gordon model to investigate a single localised breather, then brought two together and varied their initial separation.

The collision is only part of the story. The computational domain is periodic, so structures leaving one side return through the other. That made it important to distinguish the first interaction from later encounters and to read the space–time plots alongside the numerical method that produced them.

Model and initial data

The equation in my report is

\[u_{tt}-u_{xx}+4u-2u^3=0.\]

For a single breather, the initial displacement is

\[u(x,0)=A\cos(kx)\operatorname{sech}\left(\frac{x}{b}\right),\]

where

\[ A=\frac{2}{\sqrt3}\sqrt{4-\frac{\omega^2}{1-v^2}}, \qquad b=\frac{2}{\sqrt3}\frac{\sqrt{1-v^2}}{A}, \qquad k=\frac{v\omega}{1-v^2}. \]

I used \(\omega=1.98\) and a speed of magnitude \(0.1\). The initial time derivative is not set to zero; it is specified consistently with the travelling profile:

\[ u_t(x,0)=A(\omega+kv)\sin(kx)\operatorname{sech}(x/b) +\frac{Av}{b}\cos(kx)\operatorname{sech}(x/b)\tanh(x/b). \]

This combination sets both the initial shape and its motion. A second-order-in-time PDE requires both pieces of initial data.

The implementation uses a periodic interval \([-L,L]\) with \(L=100\), \(N=512\) spatial points and spacing \(h=2L/N\).

Spectral differentiation, finite-difference time stepping

I computed the spatial second derivative using a discrete Fourier transform. The wavenumber vector is

\[q=\frac{\pi}{L}[0,1,\ldots,N/2-1,-N/2,\ldots,-1],\]

so

\[u_{xx}=\mathcal F^{-1}\{-q^2\mathcal F(u)\}.\]

In MATLAB I took the real part of the inverse transform. The equation then supplies the acceleration

\[u_{tt}=u_{xx}-4u+2u^3.\]

A centred difference in time gives the three-level recurrence

\[ u^{n+1}=2u^n-u^{n-1}+\tau^2\left[(u_{xx})^n-4u^n+2(u^n)^3\right]. \]

The first step needs separate treatment because \(u^{-1}\) is not supplied. I used the Taylor start

\[ u^1=u^0+\tau u_t^0+\frac{\tau^2}{2} \left[(u_{xx})^0-4u^0+2(u^0)^3\right]. \]

The submitted single-breather code uses \(\tau=0.01\) and \(T=100\). The collision figures follow the solutions over longer intervals, as shown on their original axes.

Core MATLAB operations

This extract shows the initialisation and update used in the appendix. Storage and plotting commands are omitted so that the numerical scheme remains visible.

L = 100; N = 512;
h = 2*L/N;
x = (-N/2:N/2-1)*h;
q = (pi/L)*[0:N/2-1 -N/2:-1];
omega = 1.98; v = 0.1;
A = (2/sqrt(3))*sqrt(4-omega^2/(1-v^2));
b = (2/sqrt(3))*sqrt(1-v^2)/A;
k = v*omega/(1-v^2);
u0 = A*cos(k*x).*sech(x/b);
ut0 = A*(omega+k*v)*sin(k*x).*sech(x/b) ...
    + (A*v/b)*cos(k*x).*sech(x/b).*tanh(x/b);
tau = 0.01; T = 100;
nsteps = round(T/tau);
uxx0 = real(ifft(-q.^2.*fft(u0)));
utt0 = uxx0 - 4*u0 + 2*u0.^3;
u_old = u0;
u = u0 + tau*ut0 + (tau^2/2)*utt0;
for n = 1:nsteps
    uxx = real(ifft(-q.^2.*fft(u)));
    u_new = 2*u-u_old + tau^2*(uxx-4*u+2*u.^3);
    u_old = u;
    u = u_new;
end

A single breather

The report describes a breather localised near the centre, primarily within the interval \([-20,20]\), with approximately constant peak and trough magnitudes over the displayed evolution.

Original Figure 1: single-breather evolution, side view.

Original Figure 1: single-breather evolution, side view.

Original Figure 1: single-breather evolution, front view.

Original Figure 1: single-breather evolution, front view.

Constructing the two-breather experiment

I placed the centres at \(x=d\) and \(x=-d\). The initial separation is therefore \(2d\), not \(d\). With parameters \((A_1,b_1,k_1)\) and \((A_2,b_2,k_2)\) calculated from the corresponding velocities, the initial displacement becomes

\[ u(x,0)=A_1\cos(k_1(x-d))\operatorname{sech}\left(\frac{x-d}{b_1}\right) +A_2\cos(k_2(x+d))\operatorname{sech}\left(\frac{x+d}{b_2}\right). \]

The initial velocity is the sum of the two shifted single-breather expressions. More compactly, define

\[ V(x;a,v)=A(\omega+kv)\sin(k(x-a))\operatorname{sech}\left(\frac{x-a}{b}\right) +\frac{Av}{b}\cos(k(x-a))\operatorname{sech}\left(\frac{x-a}{b}\right) \tanh\left(\frac{x-a}{b}\right), \]

with \(A,b,k\) calculated from \(v\). Then

\[ u_t(x,0)=V(x;d,v_1)+V(x;-d,v_2). \]

I set up the two profiles to approach one another with equal speed magnitudes of \(0.1\).

% Parameter assignments in the submitted two-breather appendix:
omega = 1.98;
v1 = -0.1; v2 = 0.1; d = 35;
A1 = (2/sqrt(3))*sqrt(4-omega^2/(1-v1^2));
b1 = (2/sqrt(3))*sqrt(1-v1^2)/A1;
k1 = v1*omega/(1-v1^2);
A2 = (2/sqrt(3))*sqrt(4-omega^2/(1-v2^2));
b2 = (2/sqrt(3))*sqrt(1-v2^2)/A2;
k2 = v2*omega/(1-v2^2);
u0 = A1*cos(k1*(x-d)).*sech((x-d)/b1) ...
   + A2*cos(k2*(x+d)).*sech((x+d)/b2);
ut0 = A1*(omega+k1*v1)*sin(k1*(x-d)).*sech((x-d)/b1) ...
    + (A1*v1/b1)*cos(k1*(x-d)).*sech((x-d)/b1).*tanh((x-d)/b1) ...
    + A2*(omega+k2*v2)*sin(k2*(x+d)).*sech((x+d)/b2) ...
    + (A2*v2/b2)*cos(k2*(x+d)).*sech((x+d)/b2).*tanh((x+d)/b2);

Four separations, four interaction histories

Complete initial overlap: \(d=0\)

At zero separation the two profiles overlap from the start. The report describes a large oscillation localised around the centre of the domain.

Original Figure 2: d = 0, side view.

Original Figure 2: d = 0, side view.

Original Figure 2: d = 0, front view.

Original Figure 2: d = 0, front view.

Separated profiles: \(d=20\)

For \(d=20\), the report places the main collision at approximately \(t=150\). The solution shows the initially distinct structures approaching, interacting and subsequently moving apart.

Original Figure 3: d = 20, side view.

Original Figure 3: d = 20, side view.

Original Figure 3: d = 20, front view.

Original Figure 3: d = 20, front view.

A later encounter: \(d=35\)

Increasing \(d\) delays the interaction. For \(d=35\), I reported an encounter around \(t=300\). The report describes approximately symmetric motion away from the centre after the first collision.

Original Figure 4: d = 35, side view.

Original Figure 4: d = 35, side view.

Original Figure 4: d = 35, front view.

Original Figure 4: d = 35, front view.

Widely separated profiles: \(d=50\)

For \(d=50\), the report places the collision at approximately \(t=500\). The displayed plot starts at \(t=200\), before that encounter.

Original Figure 5: d = 50, side view.

Original Figure 5: d = 50, side view.

Original Figure 5: d = 50, front view.

Original Figure 5: d = 50, front view.

Amplitude versus separation

The final comparison plots the reported maximum amplitude at a time just after the collision against \(d\).

Original Figure 6: reported maximum amplitude against the half-separation d.

Original Figure 6: reported maximum amplitude against the half-separation d.

The report gives an amplitude of approximately \(0.618\) at \(d=0\). As separation increases, the value drops; for \(d\) greater than roughly \(10\), it settles near \(0.465\). The main distinction is between profiles with strong initial overlap and profiles that begin sufficiently far apart. This comparison holds the frequency, speed and domain fixed.

What the simulations show

The simulations show localised oscillatory structures, interactions that depend on the initial arrangement, and repeated encounters introduced by the periodic domain. They also show small oscillations that the report discusses as Gibbs-like numerical effects. The report suggests the boundary conditions may contribute to those oscillations.

Originally completed as part of MAM3042F · Advanced Numerical Methods, University of Cape Town, 2026.