MathGroup Archive 2012

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

Search the Archive

Re: NDSolve curve - obtain single value from curve at t:=d

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127682] Re: NDSolve curve - obtain single value from curve at t:=d
  • From: "Kevin J. McCann" <kjm at KevinMcCann.com>
  • Date: Wed, 15 Aug 2012 03:31:25 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <k0d1ta$m0c$1@smc.vnet.net>

You did not give any of the constants, but this should get you started.

d = age + remainingLife;
age = 32.0;
annuityAmt = 100000.0;
startValue = 100000.0;
fundRate = 0.05;
eqn1 = y'[t] == fundRate/100*y[t] - annuityAmt;
Y[t_] = y[t] /.
   NDSolve[{eqn1, y[age] == startValue}, y[t], {t, age, 110}][[1]]

Plot[Y[t], {t, 32, 110}]

Kevin

On 8/14/2012 4:23 AM, design wrote:
> Customized annuity applet;
> I need to find the value of sol1 at t =  d;
> d, age, remaining life, fundrate, (and others) are all sliders;
> Overall apples is working well
>
> d = age + remainingLife;
> eqn1 = y'[t] == fundRate/100*y[t] - annuityAmt;=E2=80=A8sol1 = y[t]/. NDSolve[{eqn1, y[age] == startValue}, y[t], {t, age, 110}];
>
> I have tried the sol1 iteration with {d,d,110} and many other approaches to no avail.
>
> Suggestions appreciated!!
>



  • Prev by Date: Re: Find Position of many elements in a large list.
  • Next by Date: Kick idle users from my Mathematica Serber
  • Previous by thread: NDSolve curve - obtain single value from curve at t:=d
  • Next by thread: Re: NDSolve curve - obtain single value from curve at t:=d