Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'NDSolve - boundary condition problem' topicStudent Support Forum > General > Archives > "NDSolve - boundary condition problem"

Next Comment >Help | Reply To Topic
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: ,

Subject (listing for 'NDSolve - boundary condition problem')
Author Date Posted
NDSolve - boundary condition problem Luka 03/04/13 06:19am
Re: NDSolve - boundary condition problem yehuda 03/04/13 1:55pm
Re: Re: NDSolve - boundary condition problem Luka 03/04/13 3:52pm
Next Comment >Help | Reply To Topic