\(AN\ EXPLICIT\ SOLUTION\ TO\ THE\ KdV\ EQUATION\ ON\ THE\ HALF\ LINE\)

\(The\ solution\ \ u[x, t, e, g, eta, kappa1, c1, kappa2, 
                c2]\ \ is\ a\ solution\ to\ the\ KdV\ equation\ \ \ u\_t + 
            eta\ u\_x - 6\ u\ u\_x + u\_xxx = 
          0\ \ \ when\ \ \ x > 
            0. \ \ It\ contains\ two\ solitons . 

The\ parameter\ \ eta\ \ can\ be\ chosen\ as\ any\ nonnegative\ constant\ in\ the\ interval\ [0, 
                    8] . 
The\ parameters\ \ \ e\ \ and\ \ \ g\ \ \ are\ positive\ constants\ that\ satisy\ \ \ \ e\^2 + g\^2 < 4/9. \)

The parameters  kappa1,kappa2,c1,  and  c2  must be positive.

An animation of   u[x, t, 1/2, 1/2, 1, 1, 3, 2, 1]   is given for   x∈[0, 10]  and  t∈[0,  .7].

Evaluate  u[x,t,e,g,eta,kappa1,c1,kappa2,c2]  as in (13) of  [Aktosun and van der Mee, An explicit solution to the KdV equation on the half line, 2006], and display the result.

Off[General::spell];
c = 2 {g, e, c1/2, c2/2};
b = {{0}, {1}, {1}, {1}};
bc = {{0, 0, 0, 0}, {2 g,  2 e, c1, c2}, {2 g,  2 e, c1, 
              c2}, {2 g,  2 e, c1, c2}};
a = {{1/2, -Sqrt[3]/2, 0, 0}, {Sqrt[3]/2, 1/2, 0, 0}, {0, 
              0, kappa1, 0}, {0, 0, 0, kappa2}};
kminusia =  
          k {{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}} - 
            I a;
kminusiainv = Inverse[kminusia];
integrand = 
          Simplify[
            MatrixExp[-y a] . bc . MatrixExp[-y a]  .  
              MatrixExp[8 t a . a . a + 2 t eta a]];
integrand11 = integrand[[1, 1]];
integrand12 = integrand[[1, 2]];
integrand13 = integrand[[1, 3]];
integrand14 = integrand[[1, 4]];
integrand21 = integrand[[2, 1]];
integrand22 = integrand[[2, 2]];
integrand23 = integrand[[2, 3]];
integrand24 = integrand[[2, 4]];
integrand31 = integrand[[3, 1]];
integrand32 = integrand[[3, 2]];
integrand33 = integrand[[3, 3]];
integrand34 = integrand[[3, 4]];
integrand41 = integrand[[4, 1]];
integrand42 = integrand[[4, 2]];
integrand43 = integrand[[4, 3]];
integrand44 = integrand[[4, 4]];
gamma11 = 
          1 + Integrate[integrand11, {y, x, Infinity}, 
              Assumptions -> {kappa1 > 0, c1 > 0, kappa2 > 0, 
                  c2 > 0}];
gamma12 = 
          Integrate[integrand12, {y, x, Infinity}, 
            Assumptions -> {kappa1 > 0, c1 > 0, kappa2 > 0, c2 > 0}];
gamma13=Integrate[integrand13,{y, x, Infinity},Assumptions -> {kappa1 > 0, c1 > 0, kappa2 > 0, 
                    c2 > 0}];
gamma14=Integrate[integrand14,{y, x, Infinity},Assumptions -> {kappa1 > 0, c1 > 0, kappa2 > 0, 
                    c2 > 0}];
gamma21 = 
          Integrate[integrand21, {y, x, Infinity}, 
            Assumptions -> {kappa1 > 0, c1 > 0, kappa2 > 0, c2 > 0}];
gamma22 = 
          1 + Integrate[integrand22, {y, x, Infinity}, 
              Assumptions -> {kappa1 > 0, c1 > 0, kappa2 > 0, 
                  c2 > 0}];
gamma23 = 
          Integrate[integrand23, {y, x, Infinity}, 
            Assumptions -> {kappa1 > 0, c1 > 0, kappa2 > 0, c2 > 0}];
gamma24 = 
          Integrate[integrand24, {y, x, Infinity}, 
            Assumptions -> {kappa1 > 0, c1 > 0, kappa2 > 0, c2 > 0}];
gamma31=Integrate[integrand31,{y, x, Infinity},Assumptions -> {kappa1 > 0, c1 > 0, kappa2 > 0, 
                    c2 > 0}];
gamma32=Integrate[integrand32,{y, x, Infinity},Assumptions -> {kappa1 > 0, c1 > 0, kappa2 > 0, 
                    c2 > 0}];
gamma33 = 
          1 + Integrate[integrand33, {y, x, Infinity}, 
              Assumptions -> {kappa1 > 0, c1 > 0, kappa2 > 0, 
                  c2 > 0}];
gamma34=Integrate[integrand34,{y, x, Infinity},Assumptions -> {kappa1 > 0, c1 > 0, kappa2 > 0, 
                    c2 > 0}];
gamma41=Integrate[integrand41,{y, x, Infinity},Assumptions -> {kappa1 > 0, c1 > 0, kappa2 > 0, 
                    c2 > 0}];
gamma42=Integrate[integrand42,{y, x, Infinity},Assumptions -> {kappa1 > 0, c1 > 0, kappa2 > 0, 
                    c2 > 0}];
gamma43=Integrate[integrand43,{y, x, Infinity},Assumptions -> {kappa1 > 0, c1 > 0, kappa2 > 0, 
                    c2 > 0}];
gamma44=1+Integrate[integrand44,{y, x, Infinity},Assumptions -> {kappa1 > 0, c1 > 0, 
                      kappa2 > 0, c2 > 0}];
gamma = {{gamma11, gamma12, gamma13, gamma14}, {gamma21, 
              gamma22, gamma23, gamma24}, {gamma31, gamma32, gamma33, 
              gamma34}, {gamma41, gamma42, gamma43, gamma44}};
det[x_, t_, e_, g_, eta_, kappa1_, c1_, kappa2_, c2_] = 
          Det[gamma];
u[x_, t_, e_, g_, eta_, kappa1_, c1_, kappa2_, 
          c2_] = -2 D[
            D[det[x, t, e, g, eta, kappa1, c1, kappa2, c2], x]/
              det[x, t, e, g, eta, kappa1, c1, kappa2, c2], x]

Animate u[x,t,1/2,1/2,1,1,3,2,1] for x∈[0,10] and t∈[0,.7].

<< Graphics`Animation`;
Animate[
        Plot[u[x, t, 1/2, 1/2, 1, 1, 3, 2, 1], {x, 0, 10},  
          PlotRange -> {-8, 1}], {t, 0,  .7,  .01}, 
        AxesLabel -> "t" t]