• Register
0 votes
195 views

Problem :

I am facing an error for the BC in this equation:

a = 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 to resolve it?

7 5 2
3,870 points

1 Answer

0 votes

Solution :

I had also faced the similar issue in the recent past. I did lot of research on it and found the solution on it. This is the very common problem with the people getting started.

The last condition as shown below:

D[h[t, 0], x] == 0

Is always True as you derivate on the constant. If what you mean is

D[ h[t,x], x]  /. x->0

The that's something else.

For the time being, just remove it (and if possible just find another sensible boundary condition compatible with a 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}]

It works for me.

9 7 4
38,600 points

Related questions

0 votes
2 answers 1.3K views
1.3K views
Problem : I am very new to React and so facing this error expected an assignment or function call and instead saw an expression no-unused-expressions
asked Nov 18, 2019 peterlaw 6.9k points
1 vote
1 answer 36 views
36 views
Problem: I have fundamental knowledge of Django. I have learned Django with the help of online tutorials. Recently I have started working on Django. I have recently tried to upgrade my Django to the Django 1.10. Since then I am often facing below error: TypeError: ... ), ] I have only fundamental knowledge about Django so unable to fix the above error. Kindly help me in fixing above Django error.
asked Jun 8 Martin K 6.6k points
0 votes
2 answers 217 views
217 views
Problem : After upgrading it to Django 1.10, I get below error: “TypeError: view must be a callable or a list/tuple in the case of include().” My urls.py is as below : from django.conf.urls import include, url urlpatterns = [     url(r'^$', 'myapp.views.home' ... r'^contact/$', 'myapp.views.contact'),     url(r'^login/$', 'django.contrib.auth.views.login'), ] How can I fix above error?
asked Jan 23 jwilliam 3.9k points