NDSolve does not work in shooting method

*To*: mathgroup at smc.vnet.net*Subject*: [mg44107] NDSolve does not work in shooting method*From*: "Alexander Koulidis" <cool at central.ntua.gr>*Date*: Thu, 23 Oct 2003 07:14:49 -0400 (EDT)*Organization*: National Technical University of Athens, Greece*Sender*: owner-wri-mathgroup at wolfram.com

This comes from a newbie in Mathematica, so have some mercy.... I'm trying to reproduce some examples of the shooting method that have been published in this forum, but Mathematica 5.0 shows some strange behavior with NDSolve. In http://forums.wolfram.com/mathgroup/archive/2001/Aug/msg00128.html Brian wrote: The following code implements the shooting technique system[a_] := {y1'[x] == y2[x], y2'[x] == -Sin[y2[x]] + Cos[5x], y1[-1] == 0, y2[-1] == a}; myODEsoln[a_] := NDSolve[system[a], {y1[x], y2[x]}, {x, -1, 1}] yend[a_] := (y1[x] /. myODEsoln[a]) /. x -> 1 bc = FindRoot[First[yend[a]] == 0, {a, -2, 2}]; Plot[Evaluate[y1[x] /. myODEsoln[a /. bc]], {x, -1, 1}, AxesLabel -> {"x", "y1(x)"}]; While the code was working fine in v. 4.2, now it produces warnings of "NDSolve::ndinnt :" or "RuleDelayed::rhs". Can someone test this code in v5.0? Does anyone have some idea of what is happening and should I implement a typical shooting method? Thanks in advance. Alexander Koulidis, Athens, Greece