Can Plot, can't FindRoot - what gives?

*To*: mathgroup at smc.vnet.net*Subject*: [mg97718] Can Plot, can't FindRoot - what gives?*From*: Aaron Fude <aaronfude at gmail.com>*Date*: Thu, 19 Mar 2009 02:13:37 -0500 (EST)

Hi, Here's my code for a model problem. I do not need a solution to this simple problem, of course - I just need to understand why Mathematica is giving me an error. f[c_] := ( s = NDSolve[{ y'[x] == c - 1, y[0] == 0}, y, {x, 0, 2*Pi}]; (Evaluate[y[x] /. s] /. x -> 2*Pi)[[1]] ) Plot[f[c], {c, 0, 10}] f[1] FindRoot[f[c] == 0, {c, 1}] I get a series of errors, the first of which is NDSolve::ndnum: Encountered non-numerical value for a derivative at x \== 0.` I'm on Win32 version 6. Many thanks in advance, Aaron