NDSolve accepts no multiplier in argument


omega = 3. ; smax = 10.; a = 1.  ; b = 1. ;
(* a=1.2;b=1.75 *)
NDSolve[{PH'[s] == omega  Cos[ a  s], X'[s] == Cos[PH[  b  s ]], 
   PH[0] == 0., Y'[s] == Sin[PH[s]], X[0] == 0, Y[0] == 0}, {PH, X, 
   Y}, {s, 0, smax}];
{ph[u_], x[u_], y[u_]} = {PH[u], X[u], Y[u]} /. First[%];
ParametricPlot[{x[s], y[s]}, {s, 0, smax}, PlotStyle -> Thick]

1) Why do non-unity values for $a$ and $b$ not work?

2) If multiplication of arguments is anyhow not allowed, is it possible for a user to write a shorter code using dummy variable, for at least as far as the derivatives ( but not boundary/initial values ) are concerned? Regards.


Posted 2015-02-21T19:37:05.310

Reputation: 2 622

1At least in V9, changing a=1. to a=3. or a=0.5 works. It is changing b that results in "The method currently implemented for delay differential equations does not support delays that depend directly on the time variable or dependent variables." Seems clear, they haven't implemented that. – Bill – 2015-02-21T20:27:54.497

@Bill: Thanks With V8 way behind.. – Narasimham – 2015-02-21T20:35:50.620

I understand not upgrading. Since nothing in your system depends on X could you first solve for PH and Y using NDSolve and then calculate X from PH using Integrate or NIntegrate afterwards? – Bill – 2015-02-21T22:02:25.573

@Bill: Works..didn't think of such possibility! ( so not posted general case in Solve DE system in SE Math running now ) – Narasimham – 2015-02-21T23:33:26.533

@Bill or Narasimham what about an answer? :) – Kuba – 2015-12-09T20:34:26.283

Having no good clue as yet ! :) – Narasimham – 2015-12-12T07:50:44.600

No answers