Verify a two-soliton collision
Can a computation reproduce a soliton collision, including its position shifts? This laboratory compares periodic numerical evolution with the full exact two-soliton field on a long interval. Separate refinements expose different errors, and endpoint measurements distinguish numerical inaccuracy from the finite separation of the pulses. The calculation tests this specified finite-time problem; it does not prove a general inverse-scattering theorem.
Required background. The collision lesson derives the interacting field and its signed shifts. The one-soliton numerical laboratory develops Fourier differentiation, dealiasing and integrating-factor RK4. Python and NumPy are needed to execute the experiment; its tables can be interpreted without running code.
Helpful background. The conservation lesson explains why preserved integrals alone do not establish a small solution error.
The exact field through the collision
Section titled “The exact field through the collision”Use the dimensionless, positive-field equation
with smooth decaying fields and no background. For , the target is
Here are phase parameters, not both incoming center intercepts. The Library derivation obtains this field from the two-bound-state Marchenko system, using Aktosun 2009, § IX, equations (9.1)–(9.3) with the opposite field sign translated.
The experiment fixes
These phases give . The pulses are well separated at both endpoints and overlap near zero. See the three exact profiles and their endpoint markers; those curves evaluate the exact formula, independently of numerical time stepping.
Evaluate the field without overflow
Section titled “Evaluate the field without overflow”Large positive make direct exponentiation unsafe even when remains small. Write the four logarithmic terms as
Their -slopes are . Since , differentiation gives the stable formula
This centered variance avoids subtracting nearly equal large moments. Exponent rescaling avoids overflow; sufficiently small tails can still underflow to zero in binary64.
The program tests this evaluator in several independent ways. An exact rational expansion makes all coefficients of the KdV bilinear identity vanish. Analytic derivatives give a sampled PDE residual below . A direct two-by-two Marchenko matrix solve, at moderate positions and times for two unequal parameter pairs, agrees within . These checks test signs, interaction coefficient and normalization before accepting the target. The computation notes define the samples and calculations.
Evolve a periodic approximation
Section titled “Evolve a periodic approximation”The code samples the full exact field at , projects it onto retained Fourier modes, and evolves a periodic field on . This is a different boundary problem from the decaying line. Its usefulness depends on keeping boundary mismatch small throughout the selected time interval.
For equally spaced points, retain integer modes . This strict two-thirds cutoff prevents aliases from the quadratic nonlinearity from entering the retained modes. With spatial wave numbers and Fourier coefficients , evolve
The existing one-soliton solver supplies the integrating-factor RK4 step. It applies classical RK4 to the transformed variable and resets the integrating factor at every step. This is the method described in Kassam and Trefethen 2005, pp. 1215–1216, equations (1.5)–(1.9), PDF. Independent stage, Fourier-convolution and linear-wave checks run again; the old one-soliton inputs and results are not changed.
Define the errors before comparing them
Section titled “Define the errors before comparing them”At each of the nine checkpoint times , compare every spatial sample with the exact field, without shifting the numerical profile to align its peaks. If , use
The tables report the maximum over these nine checkpoints, not a bound at every intermediate time. The saved initial row also records the error introduced by projection.
The exact line integrals are
Their definitions are , and . Numerical drift is measured at every integration step, from the computed initial value, and divided by the corresponding exact line integral. Initial integral error is stored separately. This prevents a poorly resolved initial field from appearing accurate merely because its incorrect integral stays constant.
Refine time, space and interval separately
Section titled “Refine time, space and interval separately”Time steps
Section titled “Time steps”Fix and . The duration is , so the first row uses steps.
| Step | Maximum | Maximum |
|---|---|---|
The observed orders are , and . Report that finite sequence as measured: it is not an independent proof of an exact asymptotic order. The construction has classical fourth order for the fixed smooth semidiscrete problem; error constants, other discretization errors and floating-point effects affect a fitted order.
Spatial resolution
Section titled “Spatial resolution”Fix and . The last column is the largest relative drift among .
| Points | Maximum | Maximum | Largest invariant drift |
|---|---|---|---|
| 128 | |||
| 192 | |||
| 256 | |||
| 384 | |||
| 512 | |||
| 768 |
The coarse run preserves its integrals very well while representing the field poorly. Increasing eventually exposes the time-error floor at this fixed step. The finer time study lowers that floor.
The artificial periodic interval
Section titled “The artificial periodic interval”Fix and , increasing along with . The final column is the largest absolute exact-field value at either boundary, sampled at times.
| Length | Points | Maximum | Sampled boundary magnitude |
|---|---|---|---|
| 40 | 320 | ||
| 48 | 384 | ||
| 64 | 512 | ||
| 80 | 640 |
The saved results also include endpoint value and derivative mismatches. The last two rows are limited by other errors; the table does not establish that the boundary error is exactly zero or bound it between sample times.
The final reference combines , and . It has maximum checkpoint errors and in the two norms. Its largest relative invariant drift is .
Separate two meanings of phase error
Section titled “Separate two meanings of phase error”For an isolated endpoint maximum, locate the zero of near the predicted center. The code brackets each maximum within of its asymptotic position and bisects; it uses the derivative of the Fourier interpolant for numerical data. It does not assign two peak trajectories during the overlap.
For endpoints and , a measured shift is
Even the exact field has finite-separation corrections to this estimate. At :
| Pulse | Asymptotic shift | Exact finite-time estimate | Numerical estimate |
|---|---|---|---|
| Fast | |||
| Slow |
The numerical errors relative to exact finite-time estimates are about and . In contrast, the finite-time biases relative to asymptotic shifts are and . Refining the time step cannot remove those latter biases. The broad slow-pulse tail perturbs the fast maximum more strongly.
Using the exact formula alone, the fast-pulse bias decreases from approximately at to at and at . These are progressively better separated endpoints, not additional PDE solver runs.
Reject an attractive but incorrect approximation
Section titled “Reject an attractive but incorrect approximation”Add two independent one-soliton fields , using their correct incoming intercepts. Each term solves KdV, but their sum has residual
The incoming sum starts close to the exact field: relative error is at . At , its maximum sampled PDE residual is ; by , its relative field error is . It lacks the outgoing position shifts. Good incoming agreement therefore cannot justify replacing the interacting solution by a sum throughout the collision.
Reproduce the saved calculation
Section titled “Reproduce the saved calculation”Download the complete collision experiment ZIP. It includes the shared solver in the correct sibling folder. Extract it and follow the root README; from integrable-kdv-collision/kdv-collision, the command is python3 experiment.py --check with the supplied NumPy dependency installed.
For inspection or individual downloads: collision experiment, inputs, saved results, requirements and notes, plus the shared one-soliton solver. Preserve sibling folders named kdv-collision and kdv; both programs retain their filename experiment.py.
With NumPy installed, a checkout uses:
python3 public/computations/kdv-collision/experiment.py --checkFor separate downloads, run python3 computations/kdv-collision/experiment.py --check from above those folders. The notes give virtual-environment instructions. The recorded calculation uses Python 3.9.6, NumPy 2.0.2 and binary64 arithmetic; last digits can vary across platforms.
The check rejects changed inputs, reruns the independent checks and all refinements, and compares scientific outputs with the stated tolerances. It writes no files. Regenerating results requires the explicit --write option; routine site builds do not execute the solver.
Exercises
Section titled “Exercises”Guided: check the field at maximum overlap
Section titled “Guided: check the field at maximum overlap”
For the stated parameters at , show that and derive . Does that profile imply a single travelling soliton of inverse width ?
Hint
Here and . Differentiate twice. Compare the result with the amplitude–width relation for one soliton.
Solution
The mixed term is , so . Hence
A single soliton with would have height , not . This is an instantaneous collision profile. Its later evolution cannot be inferred by translating this shape rigidly.
Independent: diagnose the coarse calculation
Section titled “Independent: diagnose the coarse calculation”
A colleague accepts the run because its largest invariant drift is below . Assess that decision using the recorded field errors. Which refinement addresses the dominant problem? Would reducing alone establish an accurate continuum solution?
Hint
Compare the first and last spatial rows, and distinguish conservation of the projected field from its agreement with the exact field.
Solution
The relative field errors reach and , despite the small drift. The initial field and its evolution lack sufficient spatial resolution. Increasing at fixed reduces those errors to about , where time error becomes important. Reducing on the coarse grid mainly converges to its inaccurate finite-dimensional evolution. A continuum claim also needs spatial and boundary checks, with the actual norm and finite-time scope stated.
Transfer: request a more accurate phase shift
Section titled “Transfer: request a more accurate phase shift”
You need the fast soliton’s asymptotic shift to absolute accuracy . Is the reference calculation at enough? Propose a changed experiment using the exact endpoint-time evidence, and explain why simply extending the time on an unchanged small periodic box can fail.
Hint
Compare the fast numerical error with its finite-time bias. The fast pulse travels at speed .
Solution
No. Its numerical error is about , but the endpoint bias is about . The exact bias is about , so those endpoints are a promising starting point. Recheck full-field errors, peak errors and the boundary mismatch for a numerical run over ; the existing run does not certify that new experiment.
At , the fast asymptotic center is near . A box of length ends at , so this pulse has reached the periodic seam. Increase the interval as needed while retaining spatial resolution, and refine the time step separately. A smaller time step alone removes neither finite-separation bias nor the wrong boundary problem.
References
Section titled “References”- Aktosun, Tuncay. “Inverse Scattering Transform and the Theory of Solitons.” In Encyclopedia of Complexity and Systems Science, Springer, 2009, pp. 4960–4971. DOI. Author version, arXiv:0905.4746v1, § IX, equations (9.1)–(9.3).
- Kassam, Aly-Khan, and Lloyd N. Trefethen. “Fourth-order time-stepping for stiff PDEs.” SIAM Journal on Scientific Computing 26(4), 2005, pp. 1214–1233. DOI. Author PDF, pp. 1215–1216, equations (1.5)–(1.9).