# How can I solve this KdV equation numerically by Mathematica?

I have been trying to solve the following Korteweg-de Vries (KdV) equation using NDSolve but nothing went right!

\begin{align} 6 U_{t} + \frac{9}{2} U_{xxx} + 9 U U_{x} - 6 a U_{x} = 0\\ U_{xx} + \frac{9}{2} U^2-6a =0 \end{align}

with initial condition: \begin{align} U_{0}(x) = 2 a \sec^2\left(\sqrt{(3a/2)}x \right) \end{align}

and the boundary conditions are:

$$U=U_{x}=U_{xx}=U_{xxx}=0$$ as $$x$$ goes to $$0$$ and $$a = 0.2$$

• Could you provide the actual Mathematic code you're using instead of the LaTeX format? Also in terms of LaTeX formatting you can use that directly here by putting it in  – b3m2a1 Feb 4 at 6:40
• I just edited your formulas using „common sense“ (unfortuntely usually not helpful in Physics), please check. Also there is \begin{align} … \\ … end{align} for equations in MathJax. This tutorial on using MathJax will leave no question unanswered regarding LaTex in this environment. – gwr Feb 4 at 7:47
• Thank you so much Sir. – Ali Joohy Feb 4 at 14:52
• I fail to undrestand..how you can have two equations and one unknown? Am I missing somthing? – zhk Feb 10 at 15:42
• These two equations refer to two separate questions, each main equations deeded to be solved along with the boundary and initial conditions, thanks – Ali Joohy Feb 13 at 7:28