| Author |
Comment/Response |
Luka
|
03/04/13 06:19am
Hi!
I am trying to solve a simple eguation with NDSolve and get the following error message:
NDSolve::deqn: Equation or list of equations expected instead of True in the first argument {5-3 (-1.5+n[x])+2 (n^\[Prime]\[Prime])[x]==0,{True,n[0]==1.5}}. >>
My code is:
eq = Gx + D[Dif*\!\(
\*SubscriptBox[\(\[PartialD]\), \(x\)]\(n[x]\)\), x] -
Kr (n[x] - n0) == 0;
bcs = {D[n[10], x] == 0, n[0] == n0};
Gx = 5;
Dif = 2;
Kr = 3;
n0 = 1.5;
NDSolve[{eq, bcs}, n[x],{x, 0, 10}]
Output:
NDSolve[{5 - 3 (-1.5 + n[x]) + 2 (n^\[Prime]\[Prime])[x] == 0, {True,
n[0] == 1.5}}, n[x], {x, 0, 10}]
The values are not real. I am asking why does my first boundary condition evaluate to True? I have to solve much more complicated differential equation but there is unexpected problem in the beginning.
Thank you! Best regards,
Luka
URL: , |
|