| Author |
Comment/Response |
David
|
09/11/10 4:50pm
Hi, totally new Mathematica user here. I am running into some really basic problems with NDSolve. Here's my code and results:
[quote]f[x_] := sin[x]
S = NDSolve[{x'[t] == f[t], x[0] == 5}, x[t], {t, 0, 1}]
Plot[x[t] /. S, {t, 0, 1}, Frame -> True, PlotRange -> {-5, 5}]
$IterationLimit::itlim: Iteration limit of 4096 exceeded. >>
NDSolve::ndnum: Encountered non-numerical value for a derivative at t == 0.`. >>[/quote]
I mean, come on, the diff eq is trivially solvable by hand. And the code works fine if I replace sin with some simple function like the identity function. Anyone have any idea what I'm doing wrong here? Thanks a lot in advance!
URL: , |
|