Message Boards Message Boards

0
|
6469 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

how to find the time taken by a parametric trajectory to reach a point

Posted 11 years ago
I can solve this system of parametric ODE (`u` is the parameter,while `g`,`e` and `zi` are constants depends on the physic of the problem)
     zi = -1/2;
     g = 1;
     e = .2;
     Y[t_] :=  g/(2 zf) y[t] + u z[t];
     Z[t_] := -g + g/zf z[t] - u y[t];
     sol =
       FullSimplify[
         DSolve[{y'[t] == Y[t], z'[t] == Z[t],y[0] == 0 , z[0] == -zf},
           {y[t], z[t]}, t]]
  Then, I make the assignement:
   zsol[t_] := Evaluate[z[t] /. sol[[1]][[2]]]
    ysol[t_] := Evaluate[y[t] /. sol[[1]][[1]]]

My problem is to compare the time `t(u)` taken by trajectories `{y[t,u],z[t,u]}` to reach a neighborhood of `zf` whit radius `e`, with the time `trelax`, relative to `u=0` (`zf` is the fixed point of free dynamic). Not for all `u` the problem has solution: in general, for `u` large enough, trajectories reaches some fixed point in an infinity time following a spiral (as I seen plotting the system for various `u`), cause of the exponential-complex solutions, and there's a set of `u` without solutions (i.e, a set of `u` for which trajectories pass no close to `zf`). Then I have thought to use an iterative costruct, a `do-loop` mixed with an `If`. For simplicity, I've started, in particular, with:
  trelax = Log[(-e/(2 zf))]*zf/g;
    Do[Do[
       If[N[Abs[zsol[T]] <= (zf + e) && N[Abs[ysol[T]] <= e,
         If[Nsolve[ysol[t], t] <= trelax],
           Print[{T, u}]]], {T, 0, .9, .01}], {u, 0, 40, .2}]
   
Remark_1: `trelax` is the correct analytic result of dynamical system for `u=0`.
Remark_2: I expect from this code to obtain a list of couple `{t,u}`, with `t<=trelax` and `u>0`, but really I don't obtain nothing! I think I'm wrong in the definition of the variable in the function...and in many other things!

Finally I ask you if is it possible to change the loop to obtain directly a plot `{t,u}`, i.e. a curve to compare with constant `trelax`...

Thank you

P.S: If you want to see some plots, I attach the ad hoc code:
   
 u = 5;
    ParametricPlot[{y[t] /. sol[[1]][[1]], z[t] /. sol[[1]][[2]]}, {t, 0, 10}, PlotRange-> All]
POSTED BY: mike 84
Without solving the problem of finding the condition where the trajectory lies within a disk.  This modification of your code may help you construct a numerical technique.
sol = DSolve[{y'[t] == g/(2 zf) y[t] + u z[t],
   z'[t] == -g + g/zf z[t] - u y[t], y[0] == 0, z[0] == -zf}, {y[t],
   z[t]}, t]
This is your original equation, but without putting in the defintions for Z, etc.

Extract the solutions and simplify.
{{ysol, zsol}} =
Simplify[{y[t], z[t]} /. sol,
  Assumptions -> Element[u, Reals] && Element[zf, Reals] && t > 0 ]

Explore the solutions...
With[{y = ysol, z = zsol},
Manipulate[ParametricPlot[{y, z}, {t, 0, tend}],
  {{tend, 1}, 0, 100},
  {{g, 1}, 0, 10},
  {{zf, 1}, 0, 10},
  {{u, 1}, 0, 10}
  ]
]
POSTED BY: W. Craig Carter
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract