human
Can you provide a the Python program you requested given the following:
I am working on the file "SC4/Chapter 1 - Intro IVP.ipynb".
The first task is:
Hints:
I strongly suggest to review the following jupyter notebook:
- [Intro to ODE] https://github.com/tclaudioe/Scientific-Computing/blob/master/SC1v2/11_ODE.ipynb
1.2 Ordinary differential equations
A differential equation, in this case a scalar initial value problem (IVP), can be defined as follows:
$$\begin{align}
    \dfrac{\mathrm{d}x}{\mathrm{d}t}(t) &= f(t,x(t)),\
    x(0) &= x_0.
\end{align}$$
For a known function $f(t,x)$ and $x_0$.
Particularly one could integrate both sides of the first equation as follows,
$$\begin{align}
    \int_0^{h} \dfrac{\mathrm{d}x}{\mathrm{d}t}(t)\,\mathrm{d}t & = \int_0^{h} f(t,x(t))\,\mathrm{d}t,\
    x(h)-x(0) &= \int_0^{h} f(t,x(t))\,\mathrm{d}t,
\end{align}$$
where the Fundamental Theorem of Calculus was used.
Now, we solve for the unknow value $x(h)$:
$$\begin{align}
    x(h) &= x_0 + \int_0^{h} f(t,x(t))\,\mathrm{d}t.
\end{align}$$
Up to this point, we have not made any approximation.
From this point, one can derive several numerical method, depending how you approximate the integral. 
For instance, if we consider $h=\Delta t$ and we use a Reimann sum from the left (only one interval from $0$ to $\Delta t$), we obtain the method called Forward Euler.
But if we do the same but with the Reimann sum from the right, we obtain backward Euler.
Another two options that are easy to see are the midpoint rule and the trapezoidal rule.
Notice that in some cases mentioned, you would need a non-linear equation (or a system in higher dimension) for each time step.
Example 1
Considers the following IVP:
$$\begin{align}
\dfrac{\mathrm{d}x}{\mathrm{d}t}(t) &= -\alpha\,x(t),\
x(0) &= x_0,
\end{align}$$
for which we know the solution:
$$\begin{align}
x(t) &= x_0\,\exp(-\alpha\,t)
\end{align}$$
Can you write Python program for it?
assistant
#Here is the Python program you requested.

# Warning: In general, we will use \dot{y}=f(t,y), y(0)=y_0, 
# so don't get mixed up with the notation from the textbook.

def f_example_1_interact(alpha_input=1,T_max=5,p=2):
    # Example 1, numerically.
    def f_example_1(t, y, alpha):
        return -alpha*y

    # Initial condition
    y0=1
    # time where we want your solution
    t = np.linspace(0, T_max, 100)

    sol = solve_ivp(f_example_1, [0,T_max], (y0,), t_eval=t, args=(alpha_input,))

    plt.figure()
    plt.plot(t, sol.y[0], 'b', label='y(t)')
    for i in np.arange(1,np.ceil(T_max/(np.log(p)/alpha_input))):
        plt.axvline(x=i*np.log(p)/alpha_input)
        print('t: ',i*np.log(p)/alpha_input,', exp(t): ',np.exp(-alpha_input*i*np.log(p)/alpha_input))
    plt.legend(loc='best')
    plt.xlabel('t')
    plt.ylabel(r'$\exp(-\alpha\,t)$')
    plt.title('What are the red lines?')
    plt.grid(True)
    plt.show()
interact(f_example_1_interact,alpha_input=(0.1,10,0.1),T_max=(0.1,100,0.1),p=(2,10,1))