• Register
0 votes
319 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
1 answer 9 views
9 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 5.2k points
0 votes
1 answer 13 views
13 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 5.3k points
0 votes
2 answers 1.6K views
1.6K 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 12 views
12 views
Problem: Hi! I am a beginner and while attempting an exam of Java, I came across a multiple choice question which was as follows: In a project, 2 classes must contain main method (True/False) I chose False because as far as I know, if two or more classes have main ... . I want to know the correct answer with proper reason. If any of you can tell me the correct answer, I would be grateful. Thanks
asked Nov 29, 2020 Code Learner 5.2k points
0 votes
1 answer 7 views
7 views
My project needs to populate the drop down list when I opened the page. <label for="country">Country</label> <select name="country" id="country"> <option>United States</option> <option>Australia</option> <option>Malaysia</option> </select> And then populate the second drop down list when I choose a ... >Sydney</td> <td>-33.8650</td> <td>151.2094</td> <td>5312163</td> </tr> </tbody> </table> </div>
asked Oct 30, 2020 RJ Lam 650 points
0 votes
1 answer 235 views
235 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 352 views
352 views
Problem: I am totally new to C programming, but I must code this English - French text translator by next week. It should replace the words with a given word or phrases.My texts are the following "Hello", "What" and "How are you?" and I am trying to ... the argument types testtranslator C2664 'size_t strlen(const char *)': cannot convert argument 1 from 'const char *[2]' to 'const char *'
asked Aug 29, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 24 views
24 views
Problem : When I try to connect to the MySQL server from PHP, I see a below error: &ldquo;Deprecated: The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /path/to/filename.php on line 123&rdquo; The code on a referenced ... that my arguments are correct, and also exact code has been working for many years without a problem. So how can I fix my code?
asked Feb 3, 2020 jwilliam 3.9k points