Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Iteration of Initial Conditions for required Boundary Value with NDSolve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52744] Iteration of Initial Conditions for required Boundary Value with NDSolve
  • From: "Narasimham" <mathma18 at hotmail.com>
  • Date: Sat, 11 Dec 2004 05:22:14 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Attempting  some simulation in Mathematica, there being no Help on the
topic.

To define  a robot position between two end points ((sz,0),(3,2)), (one
variable,one fixed) a Cornu Spiral was chosen. For a non-linear
Boundary Value problem Mathematica does not accept a last value y[smax]
= 2  imposed as NDSolve boundary condition.

So how can then one initial parameter ,say kgi be varied in a to&fro
twoway feedback/ automated interactive simulation cycle to stop at a
pre-defined end point (3,2)?. There's no joy in manual trial and error
procedures.

sz = .02 ; kgi = 3 10^-3; smax = 4.75;
Clear[s, x, y, ph, x2, y2, ph2];
NDSolve[{ph''[s] == ph'[s]/s, ph[sz] == 10^-7, ph'[sz] == kgi,
x'[s] == Cos[ph[s]], x[sz] == 0, y'[s] == Sin[ph[s]], y[sz] == 0},
{ph,x, y}, {s, sz, smax}];
{ph2[u_], x2[u_], y2[u_]} = {ph[u], x[u], y[u]} /. First[%];
Plot[{x2[s], y2[s], ph2[s]}, {s, sz, smax}];
ParametricPlot[{x2[s], y2[s]}, {s, sz, smax}];

Regards
Narasimham


  • Prev by Date: Re: Successive words in different colors?
  • Next by Date: How input stacked characters with vertical bar
  • Previous by thread: Re: Partition of multi dimension list
  • Next by thread: Re: Iteration of Initial Conditions for required Boundary Value with NDSolve