I have this question that I am not sure how to finish. I started computing it, but I just couldn`t finish it.
Assume the following first ODE
$y'=f(x,y)$ for $x\in[a,b]$ with $y(x_0)=y_0$
has a unique solution.
Noting that the function $f$ is Lipschitz continuous with respect to the second variable $y$ with Lipschitz constant $L$. Recall that, the approximate solution $y_{n+1}$ of $y(x_{n+1})$ obtained using $\theta$-method for the above equation where $\theta \in [0,1]$ , is defined by: $$ y_{n+1} = y_n + h[(1-\theta) f(x_n , y_n) +\theta f(x_{n+1}, y_{n+1})] , n=0,1,...,N-1$$ $y_0$ is given , where $h=\frac{b-a}{h}$ and $x_n=a+nh$ for $n=1,...,N$
the question is :
let $e_n=y(x_n)-y_n$. For smooth $y$ show that $$ {e_n} \le Ch( \vert{\frac{1}{2}-\theta}\vert + h)$$
please any help would be appreciated. I tried to use Taylor's expansion, but I'm not sure what did I do wrong.
Thanks in advanced
By Taylor we know that $$ y(x+θh)=y(x)+y'(x)θh+\tfrac12y''(x)(θh)^2+O(h^3) $$ and $$ y(x+θh)=y(x+h)-y'(x+h)(1-θ)h+\tfrac12y''(x+h)((1-θ)h)^2+O(h^3) $$ so that in the difference \begin{align} y(x+h)-y(x) &= \begin{aligned}[t] &\bigl[θy'(x)+(1-θ)y'(x+h)\bigr]h \\&- \tfrac12\bigl[(1-θ)^2y''(x+h)-θ^2y''(x)\bigr]h^2\\&+O(h^3) \end{aligned} \\ &=\begin{aligned}[t] &\bigl[θf(x,y(x))+(1-θ)f(x+h,y(x+h))\bigr]h \\&- \tfrac12(1-2θ)y''(x+\tilde θh)h^2\\&+O(h^3) \end{aligned} \end{align} Now compare this to $$ y_{n+1}-y_n=\bigl[θf(x_n,y_n)+(1-θ)f(x_n+h,y_{n+1})\bigr]h $$ to get $$ e_{n+1}-e_n=\begin{aligned}[t] &[θ\partial_yf(x_n,y(x_n))e_n+(1-θ)\partial_yf(x_{n+1},y(x_{n+1}))e_{n+1}]h\\& - (\tfrac12-θ)y''(x+\tilde θh)h^2\\&+O(h^3,he_n^2,he_{n+1}^2) \end{aligned} $$ Now solve this recursion. If $L$ is a bound for $ \partial_yf$ and $M_2$ a bound of $y''$, then $$ (1-(1-θ)Lh)|e_{n+1}|\le (1+θLh)|e_n|+|\tfrac12-θ|M_2h^2+M_3h^3 \\ |e_{n+1}|\le e^{Lh+(\tfrac12-θ)h^2+ h^3 }|e_n|+e^{(1-θ)Lh+h^2}(|\tfrac12-θ|M_2h^2+M_3h^3) $$ which indeed has a result like $$ e_n\le Ch\frac{e^{L(nh)}-1}{L}(|\tfrac12-θ|+h) $$ where the higher order term are absorbed into the constant $C$, which is about $C=\max(M_2,M_3)+1$.