Explicit Euler Method applied to dx/dt = -c xc-1(t) with initial condition x(0)=1

Remember that the analytical solution is given by x(t)=(1+c(2-c)t)1/(2-c). Moreover, the function in the right hand side of the ordinary differential equation is minus the gradient of the objective function is xc

 

Insert the constant c (years-1) (c &ge 1)
Insert the Euler step h (0 < h < 1)
Insert the number of steps N (1 ≤ N ≤ 10000)
Largest value of t computed tmax=h*N:
Corresponding value of the obective function x(tmax):