Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #11341

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

From "Kevin J. McCann" <kjm@KevinMcCann.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: NDSolve curve - obtain single value from curve at t:=d
Date 2012-08-15 07:31 +0000
Message-ID <k0fj8l$q64$1@smc.vnet.net> (permalink)
References <k0d1ta$m0c$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


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!!
>

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

NDSolve curve - obtain single value from curve at t:=d design <design@rcn.com> - 2012-08-14 08:23 +0000
  Re: NDSolve curve - obtain single value from curve at t:=d "Kevin J. McCann" <kjm@KevinMcCann.com> - 2012-08-15 07:31 +0000
  Re: NDSolve curve - obtain single value from curve at t:=d Peter Pein <petsie@dordos.net> - 2012-08-15 07:34 +0000
    Re: NDSolve curve - obtain single value from curve at t:=d design <design@rcn.com> - 2012-08-17 07:45 +0000

csiph-web