2.1 Practice exam from 2017

  2.1.1 Problem 1
  2.1.2 Problem 2
  2.1.3 Problem 3
  2.1.4 Problem 4
  2.1.5 Problem 5
PDF (letter size)
PDF (legal size)

2.1.1 Problem 1

i) Find Laurent series for \(f\left ( z\right ) =\frac{1}{\left ( z^{2}+1\right ) ^{3}}\) around isolated singular pole \(z=i\). What is the order of the pole? ii) Use residues to evaluate the integral \(\int _{0}^{\infty }\frac{dx}{\left ( x^{2}+1\right ) ^{3}}\)

solution

\(z^{2}+1=0\) gives \(z=\pm i\). Hence there is a pole at \(z=i\) of order \(3\) and also a pole at \(z=-i\) of order \(3\). Hence \(g\left ( z\right ) =\left ( z-i\right ) ^{3}f\left ( z\right ) \) is analytic at \(z=i\) and therefore it has a Taylor series expansion around \(z=i\) given by \begin{align} g\left ( z\right ) & =\sum _{n=0}^{\infty }a_{n}\left ( z-i\right ) ^{n}\nonumber \\ \left ( z-i\right ) ^{3}f\left ( z\right ) & =\sum _{n=0}^{\infty }a_{n}\left ( z-i\right ) ^{n} \tag{1} \end{align}

Where \(a_{n}=\left . \frac{\frac{d^{n}}{dz^{n}}g\left ( z\right ) }{n!}\right \vert _{z=i}\). But \begin{align*} g\left ( z\right ) & =\left ( z-i\right ) ^{3}f\left ( z\right ) \\ & =\left ( z-i\right ) ^{3}\frac{1}{\left ( z^{2}+1\right ) ^{3}}\\ & =\left ( z-i\right ) ^{3}\frac{1}{\left ( \left ( z-i\right ) \left ( z+i\right ) \right ) ^{3}}\\ & =\left ( z-i\right ) ^{3}\frac{1}{\left ( z-i\right ) ^{3}\left ( z+i\right ) ^{3}}\\ & =\frac{1}{\left ( z+i\right ) ^{3}} \end{align*}

To find \(a_{n}\) then \(a_{n}=\frac{1}{n!}\frac{d^{n}}{dz^{n}}\frac{1}{\left ( z+i\right ) ^{3}}\) is evaluated for few \(n\) terms. Since order is \(3\), at least \(5\) terms are needed to see the residue and the first term in the analytical part of the series (\(n>0\)). Starting with \(n=0\) \[ a_{0}=\left . \frac{1}{\left ( z+i\right ) ^{3}}\right \vert _{z=i}=\frac{1}{\left ( 2i\right ) ^{3}}=\frac{1}{-8i}=\frac{1}{8}i \] For \(n=1\)\[ a_{1}=\left . \frac{d}{dz}\frac{1}{\left ( z+i\right ) ^{3}}\right \vert _{z=i}=\left . \frac{-3}{\left ( z+i\right ) ^{4}}\right \vert _{z=i}=\frac{-3}{\left ( 2i\right ) ^{4}}=\frac{-3}{16}\] For \(n=2\)\[ a_{2}=\frac{1}{2}\left . \frac{d}{dz}\frac{-3}{\left ( z+i\right ) ^{4}}\right \vert _{z=i}=\frac{1}{2}\left . \frac{-3\left ( -4\right ) }{\left ( z+i\right ) ^{5}}\right \vert _{z=i}=\frac{1}{2}\frac{-3\left ( -4\right ) }{\left ( 2i\right ) ^{5}}=\frac{1}{2}\frac{-3\left ( -4\right ) }{2^{5}i}=\frac{6}{32i}=\frac{3}{16i}=-\frac{3i}{16}\] For \(n=3\)\[ a_{3}=\frac{1}{3!}\left . \frac{d}{dz}\frac{-3\left ( -4\right ) }{\left ( z+i\right ) ^{5}}\right \vert _{z=i}=\frac{1}{6}\left . \frac{-3\left ( -4\right ) \left ( -5\right ) }{\left ( z+i\right ) ^{6}}\right \vert _{z=i}=\frac{1}{6}\frac{-3\left ( -4\right ) \left ( -5\right ) }{\left ( 2i\right ) ^{6}}=\frac{1}{6}\frac{-3\left ( -4\right ) \left ( -5\right ) }{-2^{6}}=\frac{5}{32}\] For \(n=4\) \[ a_{4}=\frac{1}{4!}\left . \frac{d}{dz}\frac{-3\left ( -4\right ) \left ( -5\right ) }{\left ( z+i\right ) ^{6}}\right \vert _{z=i}=\frac{1}{24}\left . \frac{-3\left ( -4\right ) \left ( -5\right ) \left ( -6\right ) }{\left ( z+i\right ) ^{7}}\right \vert _{z=i}=\frac{1}{24}\frac{-3\left ( -4\right ) \left ( -5\right ) \left ( -6\right ) }{\left ( 2i\right ) ^{7}}=\frac{1}{24}\frac{3\left ( 4\right ) \left ( 5\right ) \left ( 6\right ) }{-i2^{7}}=\frac{15}{128}i \] Substituting all these back into (1) gives\begin{align*} \left ( z-i\right ) ^{3}f\left ( z\right ) & =\sum _{n=0}^{\infty }a_{n}\left ( z-i\right ) ^{n}\\ & =a_{0}+a_{1}\left ( z-i\right ) +a_{2}\left ( z-i\right ) ^{2}+a_{3}\left ( z-i\right ) ^{3}+a_{4}\left ( z-i\right ) ^{4}+\cdots \end{align*}

Therefore\begin{align} f\left ( z\right ) & =\frac{1}{\left ( z-i\right ) ^{3}}\left ( a_{0}+a_{1}\left ( z-i\right ) +a_{2}\left ( z-i\right ) ^{2}+a_{3}\left ( z-i\right ) ^{3}+a_{4}\left ( z-i\right ) ^{4}+\cdots \right ) \nonumber \\ & =\frac{1}{\left ( z-i\right ) ^{3}}\left ( \frac{1}{8}i+\frac{-3}{16}\left ( z-i\right ) -\frac{3i}{16}\left ( z-i\right ) ^{2}+\frac{5}{32}\left ( z-i\right ) ^{3}+\frac{15}{128}i\left ( z-i\right ) ^{4}+\cdots \right ) \nonumber \\ & =\frac{1}{8}\frac{i}{\left ( z-i\right ) ^{3}}-\frac{3}{16}\frac{1}{\left ( z-i\right ) ^{2}}-\frac{3}{16}\frac{i}{\left ( z-i\right ) }+\frac{5}{32}+\frac{15}{128}i\left ( z-i\right ) -\cdots \tag{1A} \end{align}

The residue is the coefficient of the term with \(\frac{1}{z-i}\) factor. Hence residue is \(-\frac{3i}{16}\). The order is \(3\) since that is the highest power in \(\frac{1}{z-i}\).

The above method always works, but it means having to evaluate derivatives a number of times. For a pole of high order, it means evaluating the derivative for as many times as the pole order and more to reach the analytical part. Another method is to expand the function using binomial expansion\begin{equation} \,\left ( 1+x\right ) ^{p}=1+pz+\frac{p\left ( p-1\right ) }{2!}x^{2}+\frac{p\left ( p-1\right ) \left ( p-2\right ) }{3!}x^{3}+\cdots \tag{2} \end{equation} The above is valid for real \(p\,\), which can be negative or positive, but only for \(\left \vert x\right \vert <1\). This is now applied to expand \begin{align*} f\left ( z\right ) & =\frac{1}{\left ( z^{2}+1\right ) ^{3}}\\ & =\frac{1}{\left ( z-i\right ) ^{3}\left ( z+i\right ) ^{3}} \end{align*}

Let \(z-i=\xi \), or \(z=\xi +i\) and the above becomes\begin{align} f\left ( z\right ) & =\frac{1}{\xi ^{3}\left ( \xi +2i\right ) ^{3}}\nonumber \\ & =\frac{1}{\xi ^{3}}\frac{1}{\left ( 2i\right ) ^{3}\left ( 1+\frac{\xi }{2i}\right ) ^{3}}\nonumber \\ & =\left ( \frac{i}{\xi ^{3}}\frac{1}{8}\right ) \frac{1}{\left ( 1+\frac{\xi }{2i}\right ) ^{3}}\tag{3} \end{align}

Now the binomial expansion can be used on \(\frac{1}{\left ( 1+\frac{\xi }{2i}\right ) ^{3}}\) term above, which is valid for \(\left \vert \frac{\xi }{2i}\right \vert <1\), which gives\begin{align*} \frac{1}{\left ( 1+\frac{\xi }{2i}\right ) ^{3}} & =1-\left ( 3\right ) \frac{\xi }{2i}+\frac{\left ( -3\right ) \left ( -4\right ) }{2!}\left ( \frac{\xi }{2i}\right ) ^{2}-\frac{\left ( -3\right ) \left ( -4\right ) \left ( -5\right ) }{3!}\left ( \frac{\xi }{2i}\right ) ^{3}+\frac{\left ( -3\right ) \left ( -4\right ) \left ( -5\right ) \left ( -6\right ) }{4!}\left ( \frac{\xi }{2i}\right ) ^{4}+\cdots \\ & =1+\frac{3}{2}i\xi +6\frac{\xi ^{2}}{4i^{2}}+10\frac{\xi ^{3}}{2^{3}i^{3}}+15\frac{\xi ^{4}}{2^{4}i^{4}}+\cdots \\ & =1+\frac{3}{2}i\xi -\frac{3}{2}\xi ^{2}-\frac{10}{8}i\xi ^{3}+\frac{15}{16}\xi ^{4}+\cdots \end{align*}

Therefore (3) becomes\begin{align*} f\left ( z\right ) & =\frac{i}{8\xi ^{3}}\left ( 1+\frac{3}{2}i\xi -\frac{3}{2}\xi ^{2}-\frac{10}{8}i\xi ^{3}+\frac{15}{16}\xi ^{4}+\cdots \right ) \\ & =\left ( \frac{i}{8\xi ^{3}}-\frac{3}{16}\frac{1}{\xi ^{2}}-\frac{3}{16}\frac{i}{\xi }+\frac{10}{64}+\frac{15}{\left ( 16\right ) \left ( 8\right ) }i\xi +\cdots \right ) \end{align*}

But \(z=\xi +i\) or \(\xi =z-i\), and the above becomes\begin{equation} f\left ( z\right ) =\left ( \frac{i}{8\left ( z-i\right ) ^{3}}-\frac{3}{16}\frac{1}{\left ( z-i\right ) ^{2}}-\frac{3}{16}\frac{i}{\left ( z-i\right ) }+\frac{5}{32}+\frac{15}{128}i\left ( z-i\right ) +\cdots \right ) \tag{4} \end{equation} Which is valid for \(\left \vert z-i\right \vert <1\). In other words, inside a disk of radius 2, centered around \(z=i\).

Comparing (4) with (1A), shows they are the same as expected. Which is the better method? After working both, I think the second method is faster, but requires careful transformation, the first method is more direct but requires more computations.

ii) Let \(\int _{0}^{\infty }\frac{dx}{\left ( x^{2}+1\right ) ^{3}}=I\), hence, because \(\frac{1}{\left ( x^{2}+1\right ) ^{3}}\) is even, then

\begin{align*} I & =\frac{1}{2}\int _{-\infty }^{\infty }\frac{dx}{\left ( x^{2}+1\right ) ^{3}}\\ & =\frac{1}{2}\lim _{R\rightarrow \infty }\int _{-R}^{R}\frac{dx}{\left ( x^{2}+1\right ) ^{3}}\\ & =\frac{1}{2}\lim _{R\rightarrow \infty }\left ( \int _{-R}^{R}\frac{dx}{\left ( x^{2}+1\right ) ^{3}}+{\displaystyle \oint \limits _{C}} \frac{dz}{\left ( z^{2}+1\right ) ^{3}}\right ) \end{align*}

The above is valid as long as one can show \({\displaystyle \oint \limits _{C}} \frac{dz}{\left ( z^{2}+1\right ) ^{3}}\rightarrow 0\) as \(R\rightarrow \infty \). The contour \(C\) is from \(R\) to \(-R\) over semicircle, going anticlock wise. The radius of the circle is \(R\). Since the above integration now includes \(z=i\), then by residual theorem, the above is just \(-\frac{3i}{16}\). The residue was found in the first part. In other words

\[ \frac{1}{2}\overset{2\pi i\left ( -\frac{3i}{16}\right ) }{\overbrace{\lim _{R\rightarrow \infty }\left ( \int _{-R}^{R}\frac{dx}{\left ( x^{2}+1\right ) ^{3}}+{\displaystyle \oint \limits _{C}} \frac{dz}{\left ( z^{2}+1\right ) ^{3}}\right ) }}=\frac{1}{2}\left [ 2\pi i\left ( -\frac{3i}{16}\right ) \right ] \] Letting \(z=R\ e^{i\theta }\) and taking \(R\rightarrow \infty \), then \({\displaystyle \oint \limits _{C}} \frac{dz}{\left ( z^{2}+1\right ) ^{3}}\rightarrow 0\) and the above simplifies to\begin{align*} \frac{1}{2}\lim _{R\rightarrow \infty }\int _{-R}^{R}\frac{dx}{\left ( x^{2}+1\right ) ^{3}} & =\frac{1}{2}\left [ 2\pi \frac{3}{16}\right ] \\ \frac{1}{2}\lim _{R\rightarrow \infty }\int _{-R}^{R}\frac{dx}{\left ( x^{2}+1\right ) ^{3}} & =\pi \frac{3}{16}\\ \lim _{R\rightarrow \infty }\int _{0}^{R}\frac{dx}{\left ( x^{2}+1\right ) ^{3}} & =\frac{3\pi }{16} \end{align*}

Therefore\[ \int _{0}^{\infty }\frac{dx}{\left ( x^{2}+1\right ) ^{3}}=\frac{3\pi }{16}\]

2.1.2 Problem 2

Expand \(f\left ( x\right ) =\frac{x}{L}\) as Fourier series for \(0<x<\frac{\pi }{L}\) and \(f\left ( x\right ) =-\frac{x}{L}\) for \(-\frac{\pi }{L}<x<0\).

solution:

This function is even. For example, for \(L=2\), it looks like this

pict

Hence the Fourier series will not have \(\sin \) terms.\begin{align*} f\left ( x\right ) & =\frac{a_{0}}{2}+\sum _{n=1}^{\infty }a_{n}\cos \left ( \frac{2n\pi }{T}x\right ) +\sum _{n=1}^{\infty }b_{n}\sin \left ( \frac{2n\pi }{T}x\right ) \\ & =\frac{a_{0}}{2}+\sum _{n=1}^{\infty }a_{n}\cos \left ( \frac{2n\pi }{T}x\right ) \end{align*}

Where in the above \(T\) is the period of the function. In this problem \(T=\frac{2\pi }{L}\), hence the above becomes\begin{align} f\left ( x\right ) & =\frac{a_{0}}{2}+\sum _{n=1}^{\infty }a_{n}\cos \left ( \frac{2n\pi }{\frac{2\pi }{L}}x\right ) \nonumber \\ & =\frac{a_{0}}{2}+\sum _{n=1}^{\infty }a_{n}\cos \left ( nLx\right ) \tag{1} \end{align}

Where\begin{align*} a_{0} & =\frac{1}{\frac{T}{2}}\int _{-\frac{T}{2}}^{\frac{T}{2}}f\left ( x\right ) dx=\frac{2}{\frac{2\pi }{L}}\int _{-\frac{\pi }{L}}^{\frac{\pi }{L}}f\left ( x\right ) dx=\frac{L}{\pi }\int _{-\frac{\pi }{L}}^{\frac{\pi }{L}}f\left ( x\right ) dx\\ & =\frac{L}{\pi }\left ( 2\right ) \int _{0}^{\frac{\pi }{L}}\frac{x}{L}dx\\ & =\frac{2L}{\pi }\frac{1}{L}\left ( \frac{x^{2}}{2}\right ) _{0}^{\frac{\pi }{L}}\\ & =\frac{1}{\pi }\left ( \frac{\pi ^{2}}{L^{2}}\right ) \\ & =\frac{\pi }{L^{2}} \end{align*}

And\begin{align*} a_{n} & =\frac{1}{\frac{T}{2}}\int _{-\frac{\pi }{L}}^{\frac{\pi }{L}}f\left ( x\right ) \cos \left ( nLx\right ) dx\\ & =\frac{2}{\frac{2\pi }{L}}\left ( 2\right ) \int _{0}^{\frac{\pi }{L}}f\left ( x\right ) \cos \left ( nLx\right ) dx\\ & =\frac{2L}{\pi }\int _{0}^{\frac{\pi }{L}}\frac{x}{L}\cos \left ( nLx\right ) dx\\ & =\frac{2}{\pi }\int _{0}^{\frac{\pi }{L}}x\cos \left ( nLx\right ) dx \end{align*}

Using integration by parts \(\int udv=uv-\int vdu.\) Let \(u=x,du=1\) and let \(dv=\cos \left ( nLx\right ) ,v=\frac{\sin \left ( nLx\right ) }{nL}\), therefore the above becomes\begin{align*} a_{n} & =\frac{2}{\pi }\left ( \left [ x\frac{\sin \left ( nLx\right ) }{nL}\right ] _{0}^{\frac{\pi }{L}}-\int _{0}^{\frac{\pi }{L}}\frac{\sin \left ( nLx\right ) }{nL}dx\right ) \\ & =\frac{2}{\pi }\left ( \left [ \frac{\pi }{L}\frac{\sin \left ( nL\frac{\pi }{L}\right ) }{nL}-0\right ] -\frac{1}{nL}\int _{0}^{\frac{\pi }{L}}\sin \left ( nLx\right ) dx\right ) \\ & =\frac{2}{\pi }\left ( -\frac{1}{nL}\int _{0}^{\frac{\pi }{L}}\sin \left ( nLx\right ) dx\right ) \\ & =\frac{-2}{\pi nL}\left ( \int _{0}^{\frac{\pi }{L}}\sin \left ( nLx\right ) dx\right ) \\ & =\frac{-2}{\pi nL}\left ( -\frac{\cos \left ( nLx\right ) }{nL}\right ) _{0}^{\frac{\pi }{L}}\\ & =\frac{2}{\pi n^{2}L^{2}}\left ( \cos \left ( nLx\right ) \right ) _{0}^{\frac{\pi }{L}}\\ & =\frac{2}{\pi n^{2}L^{2}}\left ( \cos \left ( nL\frac{\pi }{L}\right ) -1\right ) \\ & =\frac{2}{\pi n^{2}L^{2}}\left ( \cos \left ( n\pi \right ) -1\right ) \\ & =\frac{2}{\pi n^{2}L^{2}}\left ( \left ( -1\right ) ^{n}-1\right ) \\ & =\frac{-2+2\left ( -1\right ) ^{n}}{\pi n^{2}L^{2}} \end{align*}

Therefore from (1) the Fourier series is\begin{align*} f\left ( x\right ) & =\frac{a_{0}}{2}+\sum _{n=1}^{\infty }a_{n}\cos \left ( nLx\right ) \\ & =\frac{\pi }{2L^{2}}+\sum _{n=1}^{\infty }\frac{2}{\pi n^{2}L^{2}}\left ( \left ( -1\right ) ^{n}-1\right ) \cos \left ( nLx\right ) \end{align*}

The convergence is of order \(n^{2}\), so it is fast. Only few terms are needed to obtain very good approximation.

2.1.3 Problem 3

(i) Solve \(xy^{\prime }+3x+y=0\). (ii) Solve \(y^{\prime \prime }-2y^{\prime }+y=e^{x}\)

Solution

(i). This is linear first order ODE.\begin{align*} y^{\prime }+3+\frac{y}{x} & =0\qquad x\neq 0\\ y^{\prime }+\frac{y}{x} & =-3 \end{align*}

Integrating factor is \(\mu =e^{\int \frac{1}{x}dx}=e^{\ln x}=x\). Multiplying both sides of the above by \(\mu \), the left side becomes complete differential and it simplifies to\begin{align*} \frac{d}{dx}\left ( \mu y\right ) & =-3\mu \\ \frac{d}{dx}\left ( xy\right ) & =-3x\\ d\left ( xy\right ) & =-3xdx \end{align*}

Integrating gives\[ xy=-\frac{3}{2}x^{2}+C \] Hence the solution is\[ \fbox{$y=-\frac{3}{2}x+\frac{C}{x}\qquad x\neq 0$}\] (ii) \(y^{\prime \prime }-2y^{\prime }+y=e^{x}\) is linear second order with constant coefficients. The solution to the homogeneous part \(y^{\prime \prime }-2y^{\prime }+y=0\) can be found by first finding the roots of the characteristic equation \(s^{2}-2s+1=0\,\), hence \(s=\frac{-b}{2a}\pm \frac{1}{2a}\sqrt{b^{2}-4ac}\) or, \(s=\frac{2}{2}\pm \frac{1}{2}\sqrt{4-4}=1\). One double root. Therefore\[ y_{h}\left ( x\right ) =C_{1}e^{x}+C_{2}xe^{x}\] To find the particular solution, the method of undetermined coefficients is used. Since the forcing function is \(e^{x}\), then a guess \(y_{p}=ke^{x}\). But \(e^{x}\) is a basis solution. Hence \(y_{p}=kxe^{x}\) is now selected. But  also \(xe^{x}\) is basis solution. Then \(y_{p}=kx^{2}e^{x}\) is finally selected. Substituting this into the original ODE in order to solve for \(k\), gives\[ y_{p}^{\prime \prime }-2y_{p}^{\prime }+y_{p}=e^{x}\] But \(y_{p}^{\prime }=2kxe^{x}+kx^{2}e^{x}\) and \(y_{p}^{\prime \prime }=2ke^{x}+2kxe^{x}+2kxe^{x}+kx^{2}e^{x}\). Hence the above becomes\begin{align*} \left ( 2ke^{x}+2kxe^{x}+2kxe^{x}+kx^{2}e^{x}\right ) -2\left ( 2kxe^{x}+kx^{2}e^{x}\right ) +kx^{2}e^{x} & =e^{x}\\ \left ( 2k+2kx+2kx+kx^{2}\right ) -2\left ( 2kx+kx^{2}\right ) +kx^{2} & =1\\ 2k+4kx+kx^{2}-4kx-2kx^{2}+kx^{2} & =1\\ 2k & =1\\ k & =\frac{1}{2} \end{align*}

Therefore \(y_{p}=\frac{1}{2}x^{2}e^{x}\), and the complete general solution is\[ y\left ( x\right ) =y_{h}\left ( x\right ) +y_{p}\left ( x\right ) \] Therefore\[ \fbox{$y\left ( x\right ) =C_1e^x+C_2xe^x+\frac{1}{2}x^2e^x$}\]

2.1.4 Problem 4

pict
Figure 2.1:Problem 4 Statement

solution

Part (1)

\begin{align*} x^{2}y^{\prime \prime }+2xy^{\prime }+x^{2}y & =0\\ y^{\prime \prime }+\frac{2}{x}y^{\prime }+y & =0 \end{align*}

\(x\) is a regular singular point. Becuase \(\lim _{x\rightarrow 0}\left ( x-0\right ) \frac{2}{x}=2\). Since limit exist, then regular singular point.

Part (2)

Let \begin{align*} y & =\sum _{n=0}^{\infty }a_{n}x^{n}\\ y^{\prime } & =\sum _{n=0}^{\infty }na_{n}x^{n-1}\\ y^{\prime \prime } & =\sum _{n=0}^{\infty }n\left ( n-1\right ) a_{n}x^{n-2} \end{align*}

The ODE becomes\begin{align*} x^{2}\sum _{n=0}^{\infty }n\left ( n-1\right ) a_{n}x^{n-2}+2x\sum _{n=0}^{\infty }na_{n}x^{n-1}+x^{2}\sum _{n=0}^{\infty }a_{n}x^{n} & =0\\ \sum _{n=0}^{\infty }n\left ( n-1\right ) a_{n}x^{n}+\sum _{n=0}^{\infty }2na_{n}x^{n}+\sum _{n=0}^{\infty }a_{n}x^{n+2} & =0\\ \sum _{n=0}^{\infty }n\left ( n-1\right ) a_{n}x^{n}+\sum _{n=0}^{\infty }2na_{n}x^{n}+\sum _{n=2}^{\infty }a_{n-2}x^{n} & =0 \end{align*}

Therefore\[ \sum _{n=0}^{\infty }\left ( n\left ( n-1\right ) +2n\right ) a_{n}x^{n}+\sum _{n=2}^{\infty }a_{n-2}x^{n}=0 \] We start from \(n=1\) since \(n=0\) is used to find the indicial equation. For \(n=1\)\begin{align*} 2a_{1} & =0\\ a_{1} & =0 \end{align*}

For \(n\geq 2\)\begin{align*} \left ( n\left ( n-1\right ) +2n\right ) a_{n}+a_{n-2} & =0\\ a_{n}\left ( n\left ( n-1\right ) +2n\right ) & =-a_{n-2}\\ a_{n} & =\frac{-a_{n-2}}{n\left ( n-1\right ) +2n} \end{align*}

For \(n=2\)\begin{align*} a_{2} & =\frac{-a_{0}}{2\left ( 2-1\right ) +4}\\ & =-\frac{1}{6}a_{0} \end{align*}

For \(n=3\)\[ a_{3}=\frac{-a_{1}}{3\left ( 2\right ) +6}\] Since \(a_{1}=0\) then \(a_{3}=0\). All odd terms are therefore zero.

For \(n=4\)\[ a_{n}=\frac{-a_{2}}{\left ( 4\right ) \left ( 3\right ) +8}=-\frac{1}{20}a_{2}=-\frac{1}{20}\left ( -\frac{1}{6}a_{0}\right ) =\frac{1}{120}a_{0}\] Therefore\begin{align*} y_{1}\left ( x\right ) & =\sum _{n=0}^{\infty }a_{n}x^{n}\\ & =a_{0}+a_{2}x^{2}+a_{4}x^{4}+\cdots \\ & =a_{0}-\frac{1}{6}a_{0}x^{2}+\frac{1}{60}a_{0}x^{4}-\cdots \\ & =a_{0}\left ( 1-\frac{1}{6}x^{2}+\frac{1}{1200}x^{4}-\cdots \right ) \end{align*}

Part (3)

setting \(a_{0}=1\) as problem says, and since \(\sin x=x-\frac{x^{3}}{6}+\frac{x^{5}}{120}-\cdots \) then the above is \[ y_{1}\left ( x\right ) =\frac{\sin x}{x}\]

Part (4)

\[ W\left ( x\right ) =\begin{vmatrix} y_{1} & y_{2}\\ y_{1}^{\prime } & y_{2}^{\prime }\end{vmatrix} =\begin{vmatrix} \frac{\sin x}{x} & y_{2}\\ \frac{x\cos x-\sin x}{x^{2}} & y_{2}^{\prime }\end{vmatrix} =y_{2}^{\prime }\frac{\sin x}{x}-y_{2}\frac{x\cos x-\sin x}{x^{2}}\] But from Abel’s theorem, \(W\left ( x\right ) =Ce^{\int -p\left ( x\right ) dx}\) where \(p\left ( x\right ) \) is the coefficient in the ODE \(y^{\prime \prime }+p\left ( x\right ) y^{\prime }+q\left ( x\right ) y=0\). Since the ODE is \(y^{\prime \prime }-\frac{2}{x}+y=0\) then \(p=\frac{-2}{x}\) and \(W\left ( x\right ) =e^{\int \frac{-2}{x}dx}=e^{-2\ln x}=x^{-2}\). Hence\begin{align*} y_{2}^{\prime }\frac{\sin x}{x}-y_{2}\frac{x\cos x-\sin x}{x^{2}} & =\frac{C}{x^{2}}\\ x\sin \left ( x\right ) y_{2}^{\prime }-y_{2}\left ( x\cos x-\sin x\right ) & =C\\ y_{2}^{\prime }-y_{2}\left ( \frac{\cos x}{\sin x}-\frac{1}{x}\right ) & =\frac{C}{x\sin x} \end{align*}

Integrating factor is \(\mu =e^{\int -\frac{\cos x}{\sin x}+\frac{1}{x}dx}=e^{\int \frac{-\frac{d}{dx}\left ( \sin x\right ) }{\sin x}dx}e^{\int \frac{1}{x}dx}=e^{\int \frac{-1}{\sin x}d\left ( \sin x\right ) }+e^{\ln x}=e^{-\ln \left ( \sin x\right ) }x=\frac{x}{\sin x}\). Multiplying both sides by this integrating factor gives\[ \frac{d}{dx}\left ( y_{2}\frac{x}{\sin x}\right ) =\frac{C}{\sin ^{2}x}\] Integrating gives\begin{align*} y_{2}\frac{x}{\sin x} & =\frac{C\cos \left ( x\right ) }{-\sin \left ( x\right ) }+C_{2}\\ y_{2}\left ( x\right ) & =-C\frac{\cos x}{x}+C_{2}\frac{\sin x}{x}\\ & =C_{1}\frac{\cos x}{x}+C_{2}\frac{\sin x}{x} \end{align*}

But \(C_{2}\sin x\) is the second solution, so we only keep \(y_{2}\left ( x\right ) =C_{1}\frac{\cos x}{x}\). Hence the final solution is\[ y\left ( x\right ) =C_{1}\frac{\cos x}{x}+C_{2}\frac{\sin x}{x}\]

2.1.5 Problem 5

Find solution to \(\frac{d^{2}}{dx^{2}}G\left ( x,x_{0}\right ) +k^{2}G\left ( x,x_{0}\right ) =\delta \left ( x-x_{0}\right ) \) subject to boundary conditions \(G\left ( 0,x_{0}\right ) =G\left ( L,x_{0}\right ) =0\)

solution

First we obtain the solution to the homogeneous ODE \(y^{\prime \prime }+k^{2}y=0\) with \(y\left ( 0\right ) =0,y\left ( b\right ) =0\) which has the two solutions \(y_{1}\left ( x\right ) =\cos kx,y_{2}\left ( x\right ) =\sin \left ( kx\right ) \).

Therefore the solution to the Green function is

\begin{align*} G\left ( x,x_{0}\right ) & =\left \{ \begin{array} [c]{cc}A_{1}y_{1}\left ( x\right ) +A_{2}y_{2}\left ( x\right ) & 0<x<x_{0}\\ B_{1}y_{1}\left ( x\right ) +B_{2}y_{2}\left ( x\right ) & x<x_{0}<b \end{array} \right . \\ & =\left \{ \begin{array} [c]{cc}A_{1}\cos \left ( kx\right ) +A_{2}\sin \left ( kx\right ) & 0<x<x_{0}\\ B_{1}\cos \left ( kx\right ) +B_{2}\sin \left ( kx\right ) & x<x_{0}<b \end{array} \right . \end{align*}

Where \(A_{i},B_{i}\) are constants to be found. From the condition \(G\left ( 0,x_{0}\right ) =0\) then the first solution above gives \(A_{1}\cos \left ( 0\right ) =0\rightarrow A_{1}=0\). And from \(G\left ( L,x_{0}\right ) =0\) the second solution above gives \(B_{1}\cos \left ( kL\right ) +B_{2}\sin \left ( kLb\right ) =0\) or \(B_{1}=-\frac{B_{2}\sin \left ( kL\right ) }{\cos \left ( kLb\right ) }\), hence the solution now becomes

\begin{align*} G\left ( x,x_{0}\right ) & =\left \{ \begin{array} [c]{cc}A_{2}\sin \left ( kx\right ) & 0<x<x_{0}\\ B_{1}\cos \left ( kx\right ) +B_{2}\sin \left ( kx\right ) & x<x_{0}<L \end{array} \right . \\ & =\left \{ \begin{array} [c]{cc}A_{2}\sin \left ( kx\right ) & 0<x<x_{0}\\ -\frac{B_{2}\sin \left ( kL\right ) }{\cos \left ( kL\right ) }\cos \left ( kx\right ) +B_{2}\sin \left ( kx\right ) & x<x_{0}<L \end{array} \right . \\ & =\left \{ \begin{array} [c]{cc}A_{2}\sin \left ( kx\right ) & 0<x<x_{0}\\ \frac{B_{2}}{\cos \left ( kL\right ) }\left ( \sin \left ( kx\right ) \cos \left ( kL\right ) -\sin \left ( kL\right ) \cos \left ( kx\right ) \right ) & x<x_{0}<L \end{array} \right . \end{align*}

Using \(\sin \left ( a-b\right ) =\sin a\cos b-\cos a\sin b\), then \(\sin \left ( kx\right ) \cos \left ( kL\right ) -\sin \left ( kL\right ) \cos \left ( kx\right ) =\sin \left ( kx-kL\right ) =\sin \left ( k\left ( x-L\right ) \right ) \) and the above becomes

\begin{equation} G\left ( x,x_{0}\right ) =\left \{ \begin{array} [c]{cc}A_{2}\sin \left ( kx\right ) & 0<x<x_{0}\\ \frac{B_{2}}{\cos \left ( kL\right ) }\sin \left ( k\left ( x-L\right ) \right ) & x<x_{0}<L \end{array} \right . \tag{1A} \end{equation}

Now from continuity condition \(G\left ( x,x_{0}\right ) _{x=x_{0}-\varepsilon }=G\left ( x,x_{0}\right ) _{x=x_{0}+\varepsilon }\) i.e. at \(x=x_{0}\), then (from now on, we switch to \(x_{0}\)). \begin{equation} A_{2}\sin \left ( kx_{0}\right ) =\frac{B_{2}}{\cos \left ( kL\right ) }\sin \left ( k\left ( x_{0}-L\right ) \right ) \tag{1} \end{equation}

Now we find the derivative of \(G\) at \(x=x_{0}\) gives

\[ \left . \frac{d}{dx}G\left ( x,x_{0}\right ) \right \vert _{x=x_{0}}=\left \{ \begin{array} [c]{cc}kA_{2}\cos \left ( kx_{0}\right ) & 0<x<x_{0}\\ \frac{kB_{2}}{\cos \left ( kL\right ) }\cos \left ( k\left ( x_{0}-L\right ) \right ) & x<x_{0}<L \end{array} \right . \]

And from jump discontinuty in derivative of \(G\) at \(x=x_{0}\) would obtain, since \(G_{x>x_{0}+\varepsilon }^{\prime }-G_{x<x_{0}-\varepsilon }^{\prime }=\frac{-1}{p\left ( x\right ) }\), then

\[ \frac{kB_{2}}{\cos \left ( kb\right ) }\cos \left ( k\left ( x_{0}-L\right ) \right ) -kA_{2}\cos \left ( kx_{0}\right ) =\frac{-1}{p\left ( x\right ) }\]

But since the ODE is \(y^{\prime \prime }+k^{2}y=0\) then in SL form this is \(-\left ( y^{\prime }\right ) ^{\prime }+k^{2}y=0\), and comparing to \(-\left ( py^{\prime }\right ) ^{\prime }+k^{2}y=0\) we see that \(p=-1\). Then above becomes

\begin{equation} \frac{kB_{2}}{\cos \left ( kL\right ) }\cos \left ( k\left ( x_{0}-L\right ) \right ) -kA_{2}\cos \left ( kx_{0}\right ) =1\tag{2} \end{equation}

From (1,2) we solve for \(A_{1},B_{2}\). From (1)

\begin{equation} A_{2}=\frac{B_{2}}{\cos \left ( kb\right ) \sin \left ( kx_{0}\right ) }\sin \left ( k\left ( x_{0}-L\right ) \right ) \tag{3} \end{equation}

Substituting into (2) gives

\begin{align} \frac{kB_{2}}{\cos \left ( kL\right ) }\cos \left ( k\left ( x_{0}-L\right ) \right ) -k\left ( \frac{B_{2}}{\cos \left ( kL\right ) \sin \left ( kx_{0}\right ) }\sin \left ( k\left ( x_{0}-L\right ) \right ) \right ) \cos \left ( kx_{0}\right ) & =1\nonumber \\ kB_{2}\cos \left ( k\left ( x_{0}-L\right ) \right ) -kB_{2}\sin \left ( k\left ( x_{0}-L\right ) \right ) \frac{\cos \left ( kx_{0}\right ) }{\sin \left ( kx_{0}\right ) } & =\cos \left ( kL\right ) \nonumber \\ kB_{2}\left ( \sin \left ( kx_{0}\right ) \cos \left ( k\left ( x_{0}-L\right ) \right ) -\sin \left ( k\left ( x_{0}-L\right ) \right ) \cos \left ( kx_{0}\right ) \right ) & =\cos \left ( kL\right ) \sin \left ( kx_{0}\right ) \tag{4} \end{align}

Using \(\sin \left ( a-b\right ) =\sin a\cos b-\cos a\sin b\), then \begin{align*} \sin \left ( kx_{0}\right ) \cos \left ( k\left ( x_{0}-L\right ) \right ) -\sin \left ( k\left ( x_{0}-L\right ) \right ) \cos \left ( kx_{0}\right ) & =\sin \left ( kx_{0}-k\left ( x_{0}-L\right ) \right ) \\ & =\sin \left ( kL\right ) \end{align*}

Then (3) becomes

\begin{align*} kB_{2}\sin \left ( kL\right ) & =\cos \left ( kL\right ) \sin \left ( kx_{0}\right ) \\ B_{2} & =\frac{\cos \left ( kL\right ) \sin \left ( kx_{0}\right ) }{k\sin \left ( kL\right ) } \end{align*}

Substituing the above in (3) gives

\begin{align*} A_{2} & =\frac{\cos \left ( kL\right ) \sin \left ( kx_{0}\right ) }{k\sin \left ( kL\right ) \cos \left ( kL\right ) \sin \left ( kx_{0}\right ) }\sin \left ( k\left ( x_{0}-L\right ) \right ) \\ & =\frac{\sin \left ( k\left ( x_{0}-L\right ) \right ) }{k\sin \left ( kL\right ) } \end{align*}

Using \(A_{2},B_{2}\) found above in (1A) gives

\begin{align*} G\left ( x,x_{0}\right ) & =\left \{ \begin{array} [c]{cc}\frac{\sin \left ( k\left ( x_{0}-L\right ) \right ) }{k\sin \left ( kL\right ) }\sin \left ( kx\right ) & 0<x<x_{0}\\ \frac{\cos \left ( kL\right ) \sin \left ( kx_{0}\right ) }{k\sin \left ( kL\right ) \cos \left ( kb\right ) }\sin \left ( k\left ( x-L\right ) \right ) & x<x_{0}<L \end{array} \right . \\ & =\frac{1}{k\sin \left ( kL\right ) }\left \{ \begin{array} [c]{cc}\sin \left ( k\left ( x_{0}-L\right ) \right ) \sin \left ( kx\right ) & 0<x<x_{0}\\ \sin \left ( kx_{0}\right ) \sin \left ( k\left ( x-L\right ) \right ) & x<x_{0}<L \end{array} \right . \end{align*}

The following approach seems faster.

second solution

Instead of starting from

\[ G\left ( x,x_{0}\right ) =\left \{ \begin{array} [c]{cc}A_{1}y_{1}\left ( x\right ) +A_{2}y_{2}\left ( x\right ) & 0<x<x_{0}\\ B_{1}y_{1}\left ( x\right ) +B_{2}y_{2}\left ( x\right ) & x<x_{0}<b \end{array} \right . \]

We first find the eigenfunction \(\Phi _{n}\left ( x\right ) \) that solves \(y^{\prime \prime }+k^{2}y=0\) which satisfies the boundary conditions \(y\left ( 0\right ) =0,y\left ( L\right ) =0\). Then write

\[ G\left ( x,x_{0}\right ) =\left \{ \begin{array} [c]{cc}A\Phi _{n}\left ( x\right ) & 0<x<x_{0}\\ B\Phi _{n}\left ( x-L\right ) & x<x_{0}<b \end{array} \right . \]

So now we have only \(2\) unknowns to find, \(A,B\) using the continutity and jump conditions on \(G\). Let see how this works on this same problem.  The solution to \(y^{\prime \prime }+k^{2}y=0\) is \(y\left ( x\right ) =A\cos kx+B\sin kx\). At \(y\left ( 0\right ) =0\) implies \(A=0\), so the solution becomes \(y\left ( x\right ) =B\sin kx\) and at \(x\left ( L\right ) =0\) this gives \(0=B\sin \left ( kL\right ) \), which implies \(kL=n\pi \) or \(k=\frac{n\pi }{L}\). Hence the solution is \(\Phi _{n}\left ( x\right ) =\sin \left ( \frac{n\pi }{L}x\right ) \). Therefore we set up the Green function as

\[ G\left ( x,x_{0}\right ) =\left \{ \begin{array} [c]{cc}A\sin \left ( \frac{n\pi }{L}x\right ) & 0<x<x_{0}\\ B\sin \left ( \frac{n\pi }{L}\left ( x-L\right ) \right ) & x<x_{0}<b \end{array} \right . \]

Or by letting \(k_{n}=\frac{n\pi }{L}\)

\begin{equation} G\left ( x,x_{0}\right ) =\left \{ \begin{array} [c]{cc}A\sin \left ( k_{n}x\right ) & 0<x<x_{0}\\ B\sin \left ( k_{n}\left ( x-L\right ) \right ) & x<x_{0}<L \end{array} \right . \tag{1} \end{equation}

Now continutity says \begin{equation} A\sin \left ( k_{n}x_{0}\right ) =B\sin \left ( k_{n}\left ( x_{0}-L\right ) \right ) \tag{2} \end{equation}

Taking derivative of (1) at \(x=x_{0}\) gives

\[ G^{\prime }\left ( x,x_{0}\right ) =\left \{ \begin{array} [c]{cc}Ak_{n}\cos \left ( k_{n}x_{0}\right ) & 0<x<x_{0}\\ Bk_{n}\cos \left ( k_{n}\left ( x_{0}-L\right ) \right ) & x<x_{0}<L \end{array} \right . \]

Then jump discontinutiy gives

\begin{equation} Bk_{n}\cos \left ( k_{n}\left ( x_{0}-L\right ) \right ) -Ak_{n}\cos \left ( k_{n}x_{0}\right ) =1\tag{3} \end{equation}

Solving (2,3) for \(A,B\) gives, as we did earlier

\begin{align*} A & =\frac{\sin \left ( k\left ( x_{0}-L\right ) \right ) }{k\sin \left ( kL\right ) }\\ B & =\frac{\sin \left ( kx_{0}\right ) }{k\sin \left ( kL\right ) } \end{align*}

Using these in (1) gives

\[ G\left ( x,x_{0}\right ) =\frac{1}{k\sin \left ( kL\right ) }\left \{ \begin{array} [c]{cc}\sin \left ( k\left ( x_{0}-L\right ) \right ) \sin \left ( k_{n}x\right ) & 0<x<x_{0}\\ \sin \left ( kx_{0}\right ) \sin \left ( k_{n}\left ( x-L\right ) \right ) & x<x_{0}<Lb \end{array} \right . \]

Which is the same result obtained earlier.