Paper 2, Section II, 5C5 \mathrm{C}

Differential Equations | Part IA, 2019

Consider the problem of solving

d2ydt2=t\frac{d^{2} y}{d t^{2}}=t

subject to the initial conditions y(0)=dydt(0)=0y(0)=\frac{d y}{d t}(0)=0 using a discrete approach where yy is computed at discrete times, yn=y(tn)y_{n}=y\left(t_{n}\right) where tn=nh(n=1,0,1,,N)t_{n}=n h(n=-1,0,1, \ldots, N) and 0<h=1/N1.0<h=1 / N \ll 1 .

(a) By using Taylor expansions around tnt_{n}, derive the centred-difference formula

yn+12yn+yn1h2=d2ydt2t=tn+O(hα)\frac{y_{n+1}-2 y_{n}+y_{n-1}}{h^{2}}=\left.\frac{d^{2} y}{d t^{2}}\right|_{t=t_{n}}+O\left(h^{\alpha}\right)

where the value of α\alpha should be found.

(b) Find the general solution of yn+12yn+yn1=0y_{n+1}-2 y_{n}+y_{n-1}=0 and show that this is the discrete version of the corresponding general solution to d2ydt2=0\frac{d^{2} y}{d t^{2}}=0.

(c) The fully discretized version of the differential equation (1) is

yn+12yn+yn1h2=nh for n=0,,N1\frac{y_{n+1}-2 y_{n}+y_{n-1}}{h^{2}}=n h \quad \text { for } \quad n=0, \ldots, N-1

By finding a particular solution first, write down the general solution to the difference equation (2). For the solution which satisfies the discretized initial conditions y0=0y_{0}=0 and y1=y1y_{-1}=y_{1}, find the error in yNy_{N} in terms of hh only.

Typos? Please submit corrections to this page on GitHub.