Hello,
I am trying to run maple file for k=1, k=2 ....
My do-loop did not work. What I would like to do is to solve the ODE then have new inc and solve it again.
I should have U(405) then U(770) ....
> restart;
> with(DEtools); with(plots);
> lambda := 0.1; delta := .5;
tau := 40;
> for k to 3 do 365*k end do;
> ode := diff(U(t), t) = -lambda(t)*U(t)*U(t);
> inc1 := U(0) = 100;
> sol1 := dsolve({inc1, ode}, U(t), numeric);
> F := proc (t) options operator, arrow; rhs(sol1(t)[2]) end proc;
F(365*k+tau+0);
Z := (1-delta)*F(365*k+tau+0);
inc2 := U(365*k+tau+0) = Z;
> sol2 := dsolve({inc2, ode}, U(t), numeric);
Please any help or advice.
Thank you