# -*- coding: utf-8 -*- """ Created on Mon Mar 8 13:21:01 2021 @author: turinici """ import numpy as np import matplotlib.pyplot as plt T=1.0 N=100 h=T/N #u0=0 u0 = np.sqrt(2.0)**2 - 2.0 u = np.zeros((N+1,1)) u[0]=u0 for k in range(N): u [k+1] = u[k] + 2.0*h*np.sqrt(np.abs(u[k])) plt.figure(1) plt.plot(u) plt.show()