3rd Order NonLinear PDE in MATLAB
I am trying to solve the KDV equation using Matlab. The KDV equation, , which is a model of waves on shallow water surfaces.
I have some code that models the Wave Equation:
This code uses the 'hyperbolic' command (line 8 of the code) to define the wave equation.
u0=atan(cos(pi/2*x)); % Initial Condition
ut0=3*sin(pi*x).*exp(sin(pi/2*y)); % Initial Condition
n=500; % List of times
tlist=linspace(0,5,n); % Generates a row vector tlist of n points linearly spaced between and including a and b
uu=hyperbolic(u0,ut0,tlist,'squareb3',p,e,t,1,0,0,1); % Squareb3 is boundary conditions
axis([-1 1 -1 1 umin umax]);...
In Matlab, the general hyperbolic PDE is described by
(call this eqn (a)
Since the wave equation is given by:
then in eqn (a) d = 1, c = 1, a = 0, and f = 0.
Basically what I am trying to do is convert, if possible, the KDV equation into the eqn (a) format and add it to the code.
Can this be done?