• Register
0 votes
427 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

Please log in or register to answer this question.

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
0 answers 1 view
1 view
Problem: I have a function F = a*kt, where t is a subscript for k. Basically it is Subscript [k,t]. How to write a function in mathematica?
asked 2 hours ago muktaa 1.3k points
0 votes
1 answer 13 views
13 views
Problem: I need someone’s help to fix it... how to plot a vertical line in mathematica
asked Mar 25 Ifra 24.4k points
0 votes
1 answer 17 views
17 views
Problem: Hello! I am a noob. I came to know about optional parameters in C++. My concept of optional parameters is not clear. Moreover, I read somewhere that in a function definition, an optional parameter must be placed first in the argument list. Is this true? Can anybody explain the concept of default arguments to me? Thank you.
asked Dec 4, 2020 Code Learner 9.2k points
0 votes
1 answer 9 views
9 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 Mar 14 Wafa Abu Yousef 6.1k points
0 votes
2 answers 1.9K views
1.9K 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
0 votes
1 answer 39 views
39 views
Problem: I was working on creating a registration form and here is my view file <%= form_for @user do |f| %> <fieldset> <legend>Registration</legend> <div class="reg_form"> <label for="first_name">First Name</label> <%= f.text_field :first_name %> </div> <div ... on the server, I get an error The first argument on the form cannot contain nil or be empty on line 1 Any help is appreciated! thanks
asked Dec 1, 2020 sasha 16.2k points
0 votes
1 answer 417 views
417 views
Problem: Hello kodlogs, I am not good in the object oriented programming just know the few concepts about the java object-oriented like inheritance, polymorphism operator overloading, method overloading and super function.But when it comes to python object it is difficult to me ... list(range(0,5)) d_e = defaultdict(lst) O Error: TypeError: first argument must be callable or None Please Help !
asked Jun 17, 2020 Gavin 15.3k points
0 votes
1 answer 3 views
3 views
Problem: Why this happened: How To Solve "valueerror: expected 2d array, got 1d array instead:"
asked Mar 19 Wafa Abu Yousef 6.1k points