MathGroup Archive 2005

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

Search the Archive

Re: NDSolve and InterpolatingFunction

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56118] Re: NDSolve and InterpolatingFunction
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Sat, 16 Apr 2005 03:51:51 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <d3o06i$blo$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

zz = z[t] /. sol[[1]];

FindRoot[zz == 0, {t, 0, 25}]

??

Regards

  Jens

"Virgil Stokes" <virgil.stokes at it.uu.se> schrieb 
im Newsbeitrag news:d3o06i$blo$1 at smc.vnet.net...
>I am solving the following system of ODE's
>
>   g = 9.81 ; (* acceleration of gravity [m/s^2] 
> *)
>   d = 0.063; (* diameter of ball [m] *)
>   m = 0.05; (* mass in kg *)
>   \[Rho] = 1.29; (* air density, [kg/m^3] *)
>   \[Alpha] = \[Rho]  Pi  d^2/(8  m)
>
>   h = 1; (* initial height [m] *)
>   v0 = 25; (* magnitude of ball velocity [m/s] 
> *)
>   \[Theta] = 15  (* initial angle of release [15 
> degrees] *)
>
>   vars = {x[t], vx[t], z[t], vz[t]}
>
>   initc = {x[0] == 0, vx[0] == v0*Cos[\[Theta] 
> Degree], z[0] == h,
>    vz[0] == v0*Sin[\[Theta] Degree]}
>
>   v[t] = Sqrt[vx[t]^2 + vz[t]^2];
>
>   eq1  = x'[t] == vx[t];
>   eq2 = vx'[t] == -0.508 \[Alpha] vx[t] v[t];
>   eq3 = z'[t] == vz[t];
>   eq4 = vz'[t] == -g - 0.508 \[Alpha] vz[t] 
> v[t];
>   eqns = {eq1, eq2, eq3, eq4}
>
>   sol = NDSolve[Join[eqns, initc], vars, {t, 0, 
> 25}]
>
> which works fine; but how can I find (e.g. using 
> Solve) the value of t
> such that z[t] is 0; i.e, where, z[t] (in the
> form of an InterpolatingFunction) is zero.
>
> --V. Stokes
> 



  • Prev by Date: Re: Eigensystem Bug? OS-X
  • Next by Date: Re: NDSolve and InterpolatingFunction
  • Previous by thread: NDSolve and InterpolatingFunction
  • Next by thread: Re: NDSolve and InterpolatingFunction