Problem Sheet 1#
Question 1#
Show that the following functions satisfy the Lipschitz condition on \(y\) on the indicated set \(D\):
a. \(f(t,y)=ty^3,\) \(D=\{(t,y);-1\leq t \leq 1, 0\leq y \leq 10\};\)
b. \(f(t,y)=\frac{t^2y^2}{1+t^2},\) \(D=\{(t,y);0\leq t, -10\leq y \leq 10 \}.\)
Question 2#
Apply Euler’s Method to approximate the solution of the given initial value problems using the indicated number of time steps. Compare the approximate solution with the given exact solution, and compare the actual error with the theoretical error
a. \(y'=t-y, \ \ (0\leq t \leq 4)\) with the initial condition \(y(0)=1\), \(N=4\), with the exact solution \(y(t)=2e^{-t}+t-1.\) The Lipschitz constant is determined on \(D=\{(t,y);0\leq t \leq 4, y\in \rm I\!R \}.\)
b. \(y'=y-t, \ \ (0\leq t \leq 2) \) with the initial condition \(y(0)=2,\) \(N=4\), with the exact solution \(y(t)=e^{t}+t+1\). The Lipschitz constant is determined on \( D=\{(t,y);0\leq t \leq 2, y\in \rm I\!R \}. \)
Question 3#
Apply Euler’s Method to approximate the solution of the given initial value problems using the indicated number of time steps.
a. \(y'=0.2y-0.01y^2, \ \ (2000\leq t \leq 2002)\) with the initial condition \(y(2000)=6,\) and \(h=0.5\).
b. \(y'=0.2y-0.01y^2+\sin(2\pi t), \ \ (2000\leq t \leq 2002)\)\ with the initial condition \(y(2000)=6,\) and \(h=0.5\).\
Question 4#
Describe in your own words the theorem below and its proof:
Suppose \(f\) is continuous and satisfies a Lipschitz Condition with constant L on \(D=\{(t,y)|a\leq t \leq b, -\infty < y < \infty \}\) and that a constant \(M\) exists with the property that \( |y^{''}(t)|\leq M. \) Let \(y(t)\) denote the unique solution of the Initial Value Problem
(73)#\[\begin{equation} y^{'}=f(t,y), \ \ \ a\leq t \leq b, \ \ \ y(a)=\alpha, \end{equation}\]and \(w_0,w_1,...,w_N\) be the approx generated by the Euler method for some positive integer \(N\). Then for \(i=0,1,...,N\)
(74)#\[\begin{equation} |y(t_i)-w_i| \leq \frac{Mh}{2L}|e^{L(t_i-a)}-1|. \end{equation}\]
Question 5#
Describe in your own words the Lipschitz Condition and why it is important. A function \(f(t,y)\) is said to satisfy a Lipschitz Condition in the variable \(y\) on the set \(D \subset R^2\) if a constant \(L>0\) exist with the property that
(75)#\[\begin{equation} |f(t,y_1)-f(t,y_2)| < L|y_1-y_2|, \end{equation}\]whenever \((t,y_1),(t,y_2) \in D\). The constant L is call the Lipschitz Condition of \(f\).
Question 6#
Adapt the Python code for the Euler method provided to approximate solution of the integrate and fire differential equation:
(76)#\[\begin{equation} \tau_m\frac{dV}{dt} = -(V-E_L) + R_mI(t), \ \ -50\leq t \leq 400, \end{equation}\]where \(E_L = -75\), \(\tau_m = 10\), \(R_m = 10\) and \(I(t)=0.01t\) and the initial condition \(V(-50) = -75\) using a stepsize of \(h=0.5\).