# Solution on nonlinear pde with intial condtion

It produces an error. please suggest an alternative solution to the above-coupled pde problem.

 ClearAll[U, V]
System = {D[U[x, t], t] == - U[x, t] D[U[x, t], x]-9.8 D[V[x, t], x],
D[V[x,t],t] == -V[x,t] D[U[x,t],x]-U[x,t] D[V[x,t],x]-(0.2x-20) D[U[x,t],x]-0.2 U[x, t],
V[x, 0] == 2 (Sech[0.0136931 x])^2,
U[x, 0] == 1.4 (Sech[0.0136931 x])^2 };
{U, V} = NDSolveValue[System, {U, V}, {x, 0, 1}, {t, 0, 1}]

• 1. The bcart warning is a serious problem, see this post for more info: mathematica.stackexchange.com/q/73961/1871 2. Please add some background info to the question. Currently we don't even know if the problem itself is correct or not. 2 days ago

It produces an error.

You need boundary conditions. You only have initial conditions. For numerical solver, both are needed.

I put some below, but you need to put the correct ones as you know the problem better.

ClearAll[U, V, x, t]
g = 98/10;
a = 986691840920751/72057594037927936;
pde1 = D[U[x, t], t] == -U[x, t] *D[U[x, t], x] - g *D[V[x, t], x]
pde2 = D[V[x, t], t] == -V[x, t]* D[U[x, t], x] -
U[x, t]* D[V[x, t], x] - (2/10*x - 20) D[U[x, t], x] - 2/10 *U[x, t];
ic = {V[x, 0] == 2 *Sech[a*x]^2, U[x, 0] == 14/10 (Sech[a* x])^2}
bc = {V[0, t] == 0, U[0, t] == 0}
System = {pde1, pde2, bc, ic};
NDSolveValue[System, {U, V}, {x, 0, 1}, {t, 0, 1}]


• I dont have any boundary condition for that problem. would you suggest be the better approach for solving it without bc's using any other solver in mathematica. 2 days ago
• @AnilKumar DSolve can not solve it. So you are pretty much stuck with numerical solution,. But need B.C. for that. 2 days ago
• @AnilKumar b.c. approximating open space is almost always based on the physics background, so once again, please consider adding background info. If you're unwilling to, have a quick search on open boundary condition / numeric solution on unbounded domain, soon you'll get an idea about what you need. yesterday

There are initial values missing.

For an example I assume the following initial values:

U[0, t] == 1.4, V[0, t] == 2


Then there should be a comma instead of a semicolon.

Then you must decrease the initial step size not to run into trouble.

With all these changes:

ClearAll[U, V]
System = {D[U[x, t], t] == -U[x, t] D[U[x, t], x] - 9.8 D[V[x, t], x],
D[V[x, t], t] == -V[x, t] D[U[x, t], x] -
U[x, t] D[V[x, t], x] - (0.2 x - 20) D[U[x, t], x] - 0.2 U[x, t],
V[x, 0] == 2 (Sech[0.0136931 x])^2,
U[x, 0] == 1.4 (Sech[0.0136931 x])^2, U[0, t] == 1.4, V[0, t] == 2};
{U, V} = NDSolveValue[System, {U, V}, {x, 0, 1}, {t, 0, 1},
StartingStepSize -> 0.01]