Message Boards Message Boards

0
|
4515 Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

having trouble using NDsolve function

Posted 10 years ago
given a equation
NDSolve[{c' == -0.1*(c - 0.2)/(
5*10^-6 (1 + 4*6*2.5*0.2^2.5*c^1.5)/(0.2^2.5 + c^2.5)^2),  c[0] == 1}, c, {x, 0, 0.001}]
i get a error message
NDSolve::dvnoarg: The function c appears with no arguments. >>
i am not quite sure how to use NDSolve function
can u help me?
POSTED BY: chriskwangtun
2 Replies
Posted 10 years ago
THANK YOU SO MUCH Nasser!
with your help , i have finished my assignment.
you are very pro!
POSTED BY: chriskwangtun
(*You need to use c[x] and not just "c" in the differential equation*)

ClearAll[x, c]
sol = First@NDSolve[{c'[x] == -0.1*(c[x] - 0.2)/(5*10^-6 (1 + 4*6*2.5*0.2^2.5*c[x]^1.5)/(0.2^2.5 + c[x]^2.5)^2), c[0] == 1},
   c[x], {x, 0, 0.001}]
Plot[Evaluate[c[x] /. sol], {x, 0, 0.001}]
POSTED BY: Nasser M. Abbasi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract