Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Problem with NDSolve' topicStudent Support Forum > General > Archives > "Problem with NDSolve"

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

Subject (listing for 'Problem with NDSolve')
Author Date Posted
Problem with NDSolve David 09/11/10 4:50pm
Re: Problem with NDSolve Forum Modera... 09/11/10 7:22pm
Re: Re: Problem with NDSolve David 09/11/10 10:32pm
Re: Re: Problem with NDSolve Peter Pein 09/13/10 9:13pm
Re: Re: Re: Problem with NDSolve Forum Modera... 09/17/10 11:18am
Next Comment >Help | Reply To Topic