Reputation: 1
I'm getting an error for the BC in this equation:
s = NDSolve[{D[h[t, x], t] + Sin[x Degree] h[t, x]^2 D[h[t, x], x] +
2/3 Cos[x Degree] h[t, x]^3 == 0, h[0, x] == 1,
D[h[t, 0], x] == 0}, h, {t, 0, 100}, {x, 0, 90}]
NDSolve::deqn: Equation or list of equations expected instead of True in the first argument {2/3 Cos[[Degree] x] h[t,x]^3+h[t,x]^2 Sin[[Degree] x] (h^(0,1))[t,x]+(h^(1,0))[t,x]==0,h[0,x]==1,True}. >>
Any tips?
Upvotes: 0
Views: 1809
Reputation: 735
The last condition:
D[h[t, 0], x] == 0
is always True as you derivate on a constant. If what you mean is
D[ h[t,x], x] /. x->0
that's something else.
For the time being, just remove it (and possibly find another sensible boundary condition compatible with the order of your equation).
NDSolve[{D[h[t, x], t] + Sin[x] h[t, x]^2 D[h[t, x], x] + 2/3 Cos[x] h[t, x]^3 == 0, h[0, x] == 1}, h, {t, 0, 100}, {x, 0, Pi/2}]
works with a few warnings about the underdetermined system.
Upvotes: 1