5.1 Exam 1

  5.1.1 problem 3.26 (page 139)
  5.1.2 problem 9.8 (page 480)
  5.1.3 problem 3
PDF (letter size)
PDF (legal size)

5.1.1 problem 3.26 (page 139)

Problem Perform local analysis solution to \(\left ( x-1\right ) y^{\prime \prime }-xy^{\prime }+y=0\) at \(x=1\). Use the result of this analysis to prove that a Taylor series expansion of any solution about \(x=0\) has an infinite radius of convergence. Find the exact solution by summing the series.

solution

Writing the ODE in standard form\begin{align} y^{\prime \prime }\left ( x\right ) +a\left ( x\right ) y^{\prime }\left ( x\right ) +b\left ( x\right ) y\left ( x\right ) & =0\tag{1}\\ y^{\prime \prime }-\frac{x}{\left ( x-1\right ) }y^{\prime }+\frac{1}{\left ( x-1\right ) }y & =0 \tag{2} \end{align}

Where \(a\left ( x\right ) =\frac{-x}{\left ( x-1\right ) },b\left ( x\right ) =\frac{1}{\left ( x-1\right ) }\). The above shows that \(x=1\) is singular point for both \(a\left ( x\right ) \) and \(b\left ( x\right ) \). The next step is to classify the type of the singular point. Is it regular singular point or irregular singular point?\begin{align*} \lim _{x\rightarrow 1}\left ( x-1\right ) a\left ( x\right ) & =\lim _{x\rightarrow 1}\left ( x-1\right ) \frac{-x}{\left ( x-1\right ) }\\ & =-1 \end{align*}

And\begin{align*} \lim _{x\rightarrow 1}\left ( x-1\right ) ^{2}b\left ( x\right ) & =\lim _{x\rightarrow 1}\left ( x-1\right ) ^{2}\frac{1}{\left ( x-1\right ) }\\ & =0 \end{align*}

Because the limit exist, then \(x=1\) is a regular singular point. Therefore solution is assumed to be a Frobenius power series given by\[ y\left ( x\right ) =\sum _{n=0}^{\infty }a_{n}\left ( x-1\right ) ^{n+r}\] Substituting this in the original ODE \(\left ( x-1\right ) y^{\prime \prime }-xy^{\prime }+y=0\) gives\begin{align*} y^{\prime }\left ( x\right ) & =\sum _{n=0}^{\infty }\left ( n+r\right ) a_{n}\left ( x-1\right ) ^{n+r-1}\\ y^{\prime \prime }\left ( x\right ) & =\sum _{n=0}^{\infty }\left ( n+r\right ) \left ( n+r-1\right ) a_{n}\left ( x-1\right ) ^{n+r-2} \end{align*}

In order to move the \(\left ( x-1\right ) \) inside the summation, the original ODE \(\left ( x-1\right ) y^{\prime \prime }-xy^{\prime }+y=0\) is first rewritten as\begin{equation} \left ( x-1\right ) y^{\prime \prime }-\left ( x-1\right ) y^{\prime }-y^{\prime }+y=0 \tag{3} \end{equation} Substituting the Frobenius series into the above gives

Or

Adjusting all powers of \(\left ( x-1\right ) \) to be the same by rewriting exponents and summation indices gives
Collecting terms with same powers in \(\left ( x-1\right ) \) simplifies the above to\begin{equation} \sum _{n=0}^{\infty }\left ( \left ( n+r\right ) \left ( n+r-1\right ) -\left ( n+r\right ) \right ) a_{n}\left ( x-1\right ) ^{n+r-1}-\sum _{n=1}^{\infty }\left ( n+r-2\right ) a_{n-1}\left ( x-1\right ) ^{n+r-1}=0\tag{4} \end{equation} Setting \(n=0\) gives the indicial equation\begin{align*} \left ( \left ( n+r\right ) \left ( n+r-1\right ) -\left ( n+r\right ) \right ) a_{0} & =0\\ \left ( \left ( r\right ) \left ( r-1\right ) -r\right ) a_{0} & =0 \end{align*}

Since \(a_{0}\neq 0\) then the indicial equation is\begin{align*} \left ( r\right ) \left ( r-1\right ) -r & =0\\ r^{2}-2r & =0\\ r\left ( r-2\right ) & =0 \end{align*}

The roots of the indicial equation are therefore\begin{align*} r_{1} & =2\\ r_{2} & =0 \end{align*}

Each one of these roots generates a solution to the ODE. The next step is to find the solution \(y_{1}\left ( x\right ) \) associated with \(r=2\).  (The largest root is used first). Using \(r=2\) in equation (4) gives\begin{align} \sum _{n=0}^{\infty }\left ( \left ( n+2\right ) \left ( n+1\right ) -\left ( n+2\right ) \right ) a_{n}\left ( x-1\right ) ^{n+1}-\sum _{n=1}^{\infty }na_{n-1}\left ( x-1\right ) ^{n+1} & =0\nonumber \\ \sum _{n=0}^{\infty }n\left ( n+2\right ) a_{n}\left ( x-1\right ) ^{n+1}-\sum _{n=1}^{\infty }na_{n-1}\left ( x-1\right ) ^{n+1} & =0\tag{5} \end{align}

At \(n\geq 1\), the recursive relation is found and used to generate the coefficients of the Frobenius power series\begin{align*} n\left ( n+2\right ) a_{n}-na_{n-1} & =0\\ a_{n} & =\frac{n}{n\left ( n+2\right ) }a_{n-1} \end{align*}

Few terms are now generated to see the pattern of the series and to determine the closed form. For \(n=1\)\[ a_{1}=\frac{1}{3}a_{0}\] For \(n=2\)\[ a_{2}=\frac{2}{2\left ( 2+2\right ) }a_{1}=\frac{2}{8}\frac{1}{3}a_{0}=\frac{1}{12}a_{0}\] For \(n=3\)\[ a_{3}=\frac{3}{3\left ( 3+2\right ) }a_{2}=\frac{3}{15}\frac{1}{12}a_{0}=\frac{1}{60}a_{0}\] For \(n=4\)\[ a_{4}=\frac{4}{4\left ( 4+2\right ) }a_{3}=\frac{1}{6}\frac{1}{60}a_{0}=\frac{1}{360}a_{0}\] And so on. From the above, the first solution becomes\begin{align} y_{1}\left ( x\right ) & =\sum _{n=0}^{\infty }a_{n}\left ( x-1\right ) ^{n+2}\nonumber \\ & =a_{0}\left ( x-1\right ) ^{2}+a_{1}\left ( x-1\right ) ^{3}+a_{2}\left ( x-1\right ) ^{4}+a_{3}\left ( x-1\right ) ^{4}+a_{4}\left ( x-1\right ) ^{5}+\cdots \nonumber \\ & =\left ( x-1\right ) ^{2}\left ( a_{0}+a_{1}\left ( x-1\right ) +a_{2}\left ( x-1\right ) ^{2}+a_{3}\left ( x-1\right ) ^{3}+a_{4}\left ( x-1\right ) ^{4}+\cdots \right ) \nonumber \\ & =\left ( x-1\right ) ^{2}\left ( a_{0}+\frac{1}{3}a_{0}\left ( x-1\right ) +\frac{1}{12}a_{0}\left ( x-1\right ) ^{2}+\frac{1}{60}a_{0}\left ( x-1\right ) ^{3}+\frac{1}{360}a_{0}\left ( x-1\right ) ^{4}+\cdots \right ) \nonumber \\ & =a_{0}\left ( x-1\right ) ^{2}\left ( 1+\frac{1}{3}\left ( x-1\right ) +\frac{1}{12}\left ( x-1\right ) ^{2}+\frac{1}{60}\left ( x-1\right ) ^{3}+\frac{1}{360}\left ( x-1\right ) ^{4}+\cdots \right ) \tag{6} \end{align}

To find closed form solution to \(y_{1}\left ( x\right ) \), Taylor series expansion of \(e^{x}\) around \(x=1\) is found first\begin{align*} e^{x} & \approx e+e\left ( x-1\right ) +\frac{e}{2}\left ( x-1\right ) ^{2}+\frac{e}{3!}\left ( x-1\right ) ^{3}+\frac{e}{4!}\left ( x-1\right ) ^{4}+\frac{e}{5!}\left ( x-1\right ) ^{5}+\cdots \\ & \approx e+e\left ( x-1\right ) +\frac{e}{2}\left ( x-1\right ) ^{2}+\frac{e}{6}\left ( x-1\right ) ^{3}+\frac{e}{24}\left ( x-1\right ) ^{4}+\frac{e}{120}\left ( x-1\right ) ^{5}+\cdots \\ & \approx e\left ( 1+\left ( x-1\right ) +\frac{1}{2}\left ( x-1\right ) ^{2}+\frac{1}{6}\left ( x-1\right ) ^{3}+\frac{1}{24}\left ( x-1\right ) ^{4}+\frac{1}{120}\left ( x-1\right ) ^{5}+\cdots \right ) \end{align*}

Multiplying the above by \(2\) gives\[ 2e^{x}\approx e\left ( 2+2\left ( x-1\right ) +\left ( x-1\right ) ^{2}+\frac{1}{3}\left ( x-1\right ) ^{3}+\frac{1}{12}\left ( x-1\right ) ^{4}+\frac{1}{60}\left ( x-1\right ) ^{5}+\cdots \right ) \] Factoring \(\left ( x-1\right ) ^{2}\) from the RHS results in\begin{equation} 2e^{x}\approx e\left ( 2+2\left ( x-1\right ) +\left ( x-1\right ) ^{2}\left ( 1+\frac{1}{3}\left ( x-1\right ) +\frac{1}{12}\left ( x-1\right ) ^{2}+\frac{1}{60}\left ( x-1\right ) ^{3}+\cdots \right ) \right ) \tag{6A} \end{equation} Comparing the above result with the solution \(y_{1}\left ( x\right ) \) in (6), shows that the (6A) can be written in terms of \(y_{1}\left ( x\right ) \) as\[ 2e^{x}=e\left ( 2+2\left ( x-1\right ) +\left ( x-1\right ) ^{2}\left ( \frac{y_{1}\left ( x\right ) }{a_{0}\left ( x-1\right ) ^{2}}\right ) \right ) \] Therefore\begin{align*} 2e^{x} & =e\left ( 2+2\left ( x-1\right ) +\frac{y_{1}\left ( x\right ) }{a_{0}}\right ) \\ 2e^{x-1} & =2+2\left ( x-1\right ) +\frac{y_{1}\left ( x\right ) }{a_{0}}\\ 2e^{x-1}-2-2\left ( x-1\right ) & =\frac{y_{1}\left ( x\right ) }{a_{0}} \end{align*}

Solving for \(y_{1}\left ( x\right ) \)\begin{align*} y_{1}\left ( x\right ) & =a_{0}\left ( 2e^{x-1}-2-2\left ( x-1\right ) \right ) \\ & =a_{0}\left ( 2e^{x-1}-2-2x+2\right ) \\ & =a_{0}\left ( 2e^{x-1}-2x\right ) \\ & =\frac{2a_{0}}{e}e^{x}-2a_{0}x \end{align*}

Let \(\frac{2a_{0}}{e}=C_{1}\) and \(-2a_{0}=C_{2}\), then the above solution can be written as\[ y_{1}\left ( x\right ) =C_{1}e^{x}+C_{2}x \] Now that \(y_{1}\left ( x\right ) \) is found, which is the solution associated with \(r=2\), the next step is to find the second solution \(y_{2}\left ( x\right ) \) associated with \(r=0\). Since \(r_{2}-r_{1}=2\) is an integer, the solution can be either case \(II(b)\left ( i\right ) \) or case \(II\left ( b\right ) \left ( ii\right ) \) as given in the text book at page 72.

From equation (3.3.9) at page 72 of the text, using \(N=2\) since \(N=r_{2}-r_{1}\) and where \(p\left ( x\right ) =-x\) and \(q\left ( x\right ) =1\) in this problem by comparing our ODE with the standard ODE in (3.3.2) at page 70 given by\[ y^{\prime \prime }+\frac{p\left ( x\right ) }{\left ( x-x_{0}\right ) }y^{\prime }+\frac{q\left ( x\right ) }{\left ( x-x_{0}\right ) ^{2}}y=0 \] Expanding \(p\left ( x\right ) ,q\left ( x\right ) \) in Taylor series\begin{align*} p\left ( x\right ) & =\sum _{n=0}^{\infty }p_{n}\left ( x-1\right ) ^{n}\\ q\left ( x\right ) & =\sum _{n=0}^{\infty }q_{n}\left ( x-1\right ) ^{n} \end{align*}

Since \(p\left ( x\right ) =-x\) in our ODE, then \(p_{0}=-1\) and \(p_{1}=-1\) and all other terms are zero. For \(q\left ( x\right ) \), which is just \(1\) in our ODE, then \(q_{0}=1\) and all other terms are zero. Hence

\begin{align*} p_{0} & =-1\\ p_{1} & =-1\\ q_{0} & =1\\ N & =2\\ r & =0 \end{align*}

The above values are now used to evaluate RHS of 3.3.9 in order to find which case it is. (book uses \(\alpha \) for \(r\))\begin{equation} 0a_{N}=-\sum _{k=0}^{N-1}\left [ \left ( r+k\right ) p_{N-k}+q_{N-k}\right ] a_{k}\tag{3.3.9} \end{equation} Since \(N=2\) the above becomes\[ 0a_{2}=-\sum _{k=0}^{1}\left [ \left ( r+k\right ) p_{2-k}+q_{2-k}\right ] a_{k}\] Using \(r=0\), since this is the second root, gives\begin{align*} 0a_{2} & =-\sum _{k=0}^{1}\left ( kp_{2-k}+q_{2-k}\right ) a_{k}\\ & =-\left ( \left ( 0p_{2-0}+q_{2-0}\right ) a_{0}+\left ( p_{2-1}+q_{2-1}\right ) a_{1}\right ) \\ & =-\left ( \left ( 0p_{2}+q_{2}\right ) a_{0}+\left ( p_{1}+q_{1}\right ) a_{1}\right ) \\ & =-\left ( 0+q_{2}\right ) a_{0}-\left ( p_{1}+q_{1}\right ) a_{1} \end{align*}

Since \(q_{2}=0,p_{1}=-1,q_{1}=1\), therefore\begin{align*} 0a_{2} & =-\left ( 0+0\right ) a_{0}-\left ( -1+1\right ) a_{1}\\ & =0 \end{align*}

The above shows that this is case \(II\left ( b\right ) \left ( ii\right ) \), because the right side of \(3.3.9\) is zero. This means the second solution \(y_{2}\left ( x\right ) \) is also a Fronbenius series. If the above was not zero, the method of reduction of order would be used to find second solution.

Assuming \(y_{2}\left ( x\right ) =\sum b_{n}\left ( x-1\right ) ^{n+r}\), and since \(r=0\), therefore\[ y_{2}\left ( x\right ) =\sum _{n=0}^{\infty }b_{n}\left ( x-1\right ) ^{n}\] Following the same method used to find the first solution, this series is now used in the ODE to determine \(b_{n}\). \begin{align*} y_{2}^{\prime }\left ( x\right ) & =\sum _{n=0}^{\infty }nb_{n}\left ( x-1\right ) ^{n-1}=\sum _{n=1}^{\infty }nb_{n}\left ( x-1\right ) ^{n-1}=\sum _{n=0}^{\infty }\left ( n+1\right ) b_{n+1}\left ( x-1\right ) ^{n}\\ y_{2}^{\prime \prime }\left ( x\right ) & =\sum _{n=0}^{\infty }n\left ( n+1\right ) b_{n+1}\left ( x-1\right ) ^{n-1}=\sum _{n=1}^{\infty }n\left ( n+1\right ) b_{n+1}\left ( x-1\right ) ^{n-1}=\sum _{n=0}^{\infty }\left ( n+1\right ) \left ( n+2\right ) b_{n+2}\left ( x-1\right ) ^{n} \end{align*}

The ODE \(\left ( x-1\right ) y^{\prime \prime }-\left ( x-1\right ) y^{\prime }-y^{\prime }+y=0\) now becomes

Or
Hence\[ \sum _{n=1}^{\infty }\left ( n\right ) \left ( n+1\right ) b_{n+1}\left ( x-1\right ) ^{n}-\sum _{n=1}^{\infty }nb_{n}\left ( x-1\right ) ^{n}-\sum _{n=0}^{\infty }\left ( n+1\right ) b_{n+1}\left ( x-1\right ) ^{n}+\sum _{n=0}^{\infty }b_{n}\left ( x-1\right ) ^{n}=0 \] \(n=0\) gives\begin{align*} -\left ( n+1\right ) b_{n+1}+b_{n} & =0\\ -b_{1}+b_{0} & =0\\ b_{1} & =b_{0} \end{align*}

\(n\geq 1\) generates the recursive relation to find all remaining \(b_{n}\) coefficients\begin{align*} \left ( n\right ) \left ( n+1\right ) b_{n+1}-nb_{n}-\left ( n+1\right ) b_{n+1}+b_{n} & =0\\ \left ( n\right ) \left ( n+1\right ) b_{n+1}-\left ( n+1\right ) b_{n+1} & =nb_{n}-b_{n}\\ b_{n+1}\left ( \left ( n\right ) \left ( n+1\right ) -\left ( n+1\right ) \right ) & =b_{n}\left ( n-1\right ) \\ b_{n+1} & =b_{n}\frac{\left ( n-1\right ) }{\left ( n\right ) \left ( n+1\right ) -\left ( n+1\right ) } \end{align*}

Therefore the recursive relation is\[ b_{n+1}=\frac{b_{n}}{n+1}\] Few terms are generated to see the pattern and to find the closed form solution for \(y_{2}\left ( x\right ) \). For \(n=1\)\[ b_{2}=b_{1}\frac{1}{2}=\frac{1}{2}b_{0}\] For \(n=2\)\[ b_{3}=\frac{b_{2}}{3}=\frac{1}{3}\frac{1}{2}b_{0}=\frac{1}{6}b_{0}\] For \(n=3\)\[ b_{4}=\frac{b_{3}}{3+1}=\frac{1}{4}\frac{1}{6}b_{0}=\frac{1}{24}b_{0}\] For \(n=4\)\[ b_{5}=\frac{b_{4}}{4+1}=\frac{1}{5}\frac{1}{24}b_{0}=\frac{1}{120}b_{0}\] And so on. Therefore, the second solution is\begin{align} y_{2}\left ( x\right ) & =\sum _{n=0}^{\infty }b_{n}\left ( x-1\right ) ^{n}\nonumber \\ & =b_{0}+b_{1}\left ( x-1\right ) +b_{2}\left ( x-1\right ) ^{2}+\cdots \nonumber \\ & =b_{0}+b_{0}\left ( x-1\right ) +\frac{1}{2}b_{0}\left ( x-1\right ) ^{2}+\frac{1}{6}b_{0}\left ( x-1\right ) ^{3}+\frac{1}{24}b_{0}\left ( x-1\right ) ^{4}+\frac{1}{120}b_{0}\left ( x-1\right ) ^{5}+\cdots \nonumber \\ & =b_{0}\left ( 1+\left ( x-1\right ) +\frac{1}{2}\left ( x-1\right ) ^{2}+\frac{1}{6}\left ( x-1\right ) ^{3}+\frac{1}{24}\left ( x-1\right ) ^{4}+\frac{1}{120}\left ( x-1\right ) ^{5}+\cdots \right ) \tag{7A} \end{align}

The Taylor series for \(e^{x}\) around \(x=1\) is \begin{align} e^{x} & \approx e+e\left ( x-1\right ) +\frac{e}{2}\left ( x-1\right ) ^{2}+\frac{e}{6}\left ( x-1\right ) ^{3}+\frac{e}{24}\left ( x-1\right ) ^{4}+\frac{e}{120}\left ( x-1\right ) ^{5}+\cdots \nonumber \\ & \approx e\left ( 1+\left ( x-1\right ) +\frac{1}{2}\left ( x-1\right ) ^{2}+\frac{1}{6}\left ( x-1\right ) ^{3}+\frac{1}{24}\left ( x-1\right ) ^{4}+\frac{1}{120}\left ( x-1\right ) ^{5}+\cdots \right ) \tag{7B} \end{align}

Comparing (7A) with (7B) shows that the second solution closed form is\[ y_{2}\left ( x\right ) =b_{0}\frac{e^{x}}{e}\] Let \(\frac{b_{0}}{e}\) be some constant, say \(C_{3}\), the second solution above becomes\[ y_{2}\left ( x\right ) =C_{3}e^{x}\] Both solutions \(y_{1}\left ( x\right ) ,y_{2}\left ( x\right ) \) have now been found. The final solution is\begin{align*} y\left ( x\right ) & =y_{1}\left ( x\right ) +y_{2}\left ( x\right ) \\ & =\overset{y_{1}\left ( x\right ) }{\overbrace{C_{1}e^{x}+C_{2}x}}+\overset{y_{2}\left ( x\right ) }{\overbrace{C_{3}e^{x}}}\\ & =C_{4}e^{x}+C_{2}x \end{align*}

Hence, the exact solution is\begin{equation} y\left ( x\right ) =Ae^{x}+Bx\tag{7} \end{equation} Where \(A,B\,\) are constants to be found from initial conditions if given. Above solution is now verified by substituting it back to original ODE\begin{align*} y^{\prime } & =Ae^{x}+B\\ y^{\prime \prime } & =Ae^{x} \end{align*}

Substituting these into \(\left ( x-1\right ) y^{\prime \prime }-xy^{\prime }+y=0\) gives\begin{align*} \left ( x-1\right ) Ae^{x}-x\left ( Ae^{x}+B\right ) +Ae^{x}+Bx & =0\\ xAe^{x}-Ae^{x}-xAe^{x}-xB+Ae^{x}+Bx & =0\\ -Ae^{x}-xB+Ae^{x}+Bx & =0\\ 0 & =0 \end{align*}

To answer the final part of the question, the above solution (7) is analytic around \(x=0\) with infinite radius of convergence since \(\exp \left ( \cdot \right ) \) is analytic everywhere. Writing the solution as\[ y\left ( x\right ) =\left ( A\sum _{n=0}^{\infty }\frac{x^{n}}{n!}\right ) +Bx \] The function \(x\) have infinite radius of convergence, since it is its own series. And the exponential function has infinite radius of convergence as known, verified by using standard ratio test \[ A\lim _{n\rightarrow \infty }\left \vert \frac{a_{n+1}}{a_{n}}\right \vert =A\lim _{n\rightarrow \infty }\left \vert \frac{x^{n+1}n!}{\left ( n+1\right ) !x^{n}}\right \vert =A\lim _{n\rightarrow \infty }\left \vert \frac{xn!}{\left ( n+1\right ) !}\right \vert =A\lim _{n\rightarrow \infty }\left \vert \frac{x}{n+1}\right \vert =0 \] For any \(x\). Since the ratio is less than \(1\), then the solution \(y\left ( x\right ) \) expanded around \(x=0\) has an infinite radius of convergence.

5.1.2 problem 9.8 (page 480)

Problem Use boundary layer to find uniform approximation with error of order \(O\left ( \varepsilon ^{2}\right ) \) for the problem \(\varepsilon y^{\prime \prime }+y^{\prime }+y=0\) with \(y\left ( 0\right ) =e,y\left ( 1\right ) =1\). Compare your solution to exact solution. Plot the solution for some values of \(\varepsilon \).

solution

\begin{equation} \varepsilon y^{\prime \prime }+y^{\prime }+y=0\tag{1} \end{equation} Since \(a\left ( x\right ) =1>0\), then a boundary layer is expected at the left side, near \(x=0\). Matching will fail if this was not the case. Starting with the outer solution near \(x=1\). Let \[ y^{out}\left ( x\right ) =\sum _{n=0}^{\infty }\varepsilon ^{n}y_{n}\left ( x\right ) \] Substituting this into (1) gives\begin{equation} \varepsilon \left ( y_{0}^{\prime \prime }+\varepsilon y_{1}^{\prime \prime }+\varepsilon ^{2}y_{2}^{\prime \prime }+\cdots \right ) +\left ( y_{0}^{\prime }+\varepsilon y_{1}^{\prime }+\varepsilon ^{2}y_{2}^{\prime }+\cdots \right ) +\left ( y_{0}+\varepsilon y_{1}+\varepsilon ^{2}y_{2}+\cdots \right ) =0\tag{2} \end{equation} Collecting powers of \(O\left ( \varepsilon ^{0}\right ) \) results in the ODE\begin{align} y_{0}^{\prime } & \thicksim -y_{0}\nonumber \\ \frac{dy_{0}}{y_{0}} & \thicksim -dx\nonumber \\ \ln \left \vert y_{0}\right \vert & \thicksim -x+C_{1}\nonumber \\ y_{0}^{out}\left ( x\right ) & \thicksim C_{1}e^{-x}+O\left ( \varepsilon \right ) \tag{3} \end{align}

\(C_{1}\) is found from boundary conditions \(y\left ( 1\right ) =1\). Equation (3) gives\begin{align*} 1 & =C_{1}e^{-1}\\ C_{1} & =e \end{align*}

Hence solution (3) becomes\[ y_{0}^{out}\left ( x\right ) \thicksim e^{1-x}\] \(y_{1}^{out}\left ( x\right ) \) is now found. Using (2) and collecting terms of \(O\left ( \varepsilon ^{1}\right ) \) gives the ODE\begin{equation} y_{1}^{\prime }+y_{1}\thicksim -y_{0}^{\prime \prime }\tag{4} \end{equation} But \begin{align*} y_{0}^{\prime }\left ( x\right ) & =-e^{1-x}\\ y_{0}^{\prime \prime }\left ( x\right ) & =e^{1-x} \end{align*}

Using the above in the RHS of (4) gives\[ y_{1}^{\prime }+y_{1}\thicksim -e^{1-x}\] The integrating factor is \(e^{x}\), hence the above becomes\begin{align*} \frac{d}{dx}\left ( y_{1}e^{x}\right ) & \thicksim -e^{x}e^{1-x}\\ \frac{d}{dx}\left ( y_{1}e^{x}\right ) & \thicksim -e \end{align*}

Integrating both sides gives\begin{align} y_{1}e^{x} & \thicksim -ex+C_{2}\nonumber \\ y_{1}^{out}\left ( x\right ) & \thicksim -xe^{1-x}+C_{2}e^{-x}\tag{5} \end{align}

Applying boundary conditions \(y\left ( 1\right ) =0\) to the above gives\begin{align*} 0 & =-1+C_{2}e^{-1}\\ C_{2} & =e \end{align*}

Hence the solution in (5) becomes\begin{align*} y_{1}^{out}\left ( x\right ) & \thicksim -xe^{1-x}+e^{1-x}\\ & \thicksim \left ( 1-x\right ) e^{1-x} \end{align*}

Therefore the outer solution is\begin{align} y^{out}\left ( x\right ) & =y_{0}+\varepsilon y_{1}\nonumber \\ & =e^{1-x}+\varepsilon \left ( 1-x\right ) e^{1-x}\tag{6} \end{align}

Now the boundary layer (inner) solution \(y^{in}\left ( x\right ) \) near \(x=0\) is found. Let \(\xi =\frac{x}{\varepsilon ^{p}}\) be the inner variable. The original ODE is expressed using this new variable, and \(p\) is found. Since \(\frac{dy}{dx}=\frac{dy}{d\xi }\frac{d\xi }{dx}\) then \(\frac{dy}{dx}=\frac{dy}{d\xi }\varepsilon ^{-p}\). The differential operator is \(\frac{d}{dx}\equiv \varepsilon ^{-p}\frac{d}{d\xi }\) therefore\begin{align*} \frac{d^{2}}{dx^{2}} & =\frac{d}{dx}\frac{d}{dx}\\ & =\left ( \varepsilon ^{-p}\frac{d}{d\xi }\right ) \left ( \varepsilon ^{-p}\frac{d}{d\xi }\right ) \\ & =\varepsilon ^{-2p}\frac{d^{2}}{d\xi ^{2}} \end{align*}

Hence \(\frac{d^{2}y}{dx^{2}}=\varepsilon ^{-2p}\frac{d^{2}y}{d\xi ^{2}}\) and \(\varepsilon y^{\prime \prime }+y^{\prime }+y=0\) becomes\begin{align} \varepsilon \left ( \varepsilon ^{-2p}\frac{d^{2}y}{d\xi ^{2}}\right ) +\varepsilon ^{-p}\frac{dy}{d\xi }+y & =0\nonumber \\ \varepsilon ^{1-2p}y^{\prime \prime }+\varepsilon ^{-p}y^{\prime }+y & =0\tag{7A} \end{align}

The largest terms are \(\left \{ \varepsilon ^{1-2p},\varepsilon ^{-p}\right \} \), balance gives \(1-2p=-p\) or \[ \fbox{$p=1$}\] The ODE (7A) becomes\begin{equation} \varepsilon ^{-1}y^{\prime \prime }+\varepsilon ^{-1}y^{\prime }+y=0\tag{7} \end{equation} Assuming that solution is\[ y_{in}\left ( x\right ) =\sum _{n=0}^{\infty }\varepsilon ^{n}y_{n}=y_{0}+\varepsilon y_{1}+\varepsilon ^{2}y_{2}+\cdots \] Substituting the above into (7) gives\begin{equation} \varepsilon ^{-1}\left ( y_{0}^{\prime \prime }+\varepsilon y_{1}^{\prime \prime }+\cdots \right ) +\varepsilon ^{-1}\left ( y_{0}^{\prime }+\varepsilon y_{1}^{\prime }+\cdots \right ) +\left ( y_{0}+\varepsilon y_{1}+\cdots \right ) =0\tag{8} \end{equation} Collecting terms with \(O\left ( \varepsilon ^{-1}\right ) \) gives the first order ODE to solve\[ y_{0}^{\prime \prime }\thicksim -y_{0}^{\prime }\] Let \(z=y_{0}^{\prime }\), the above becomes\begin{align*} z^{\prime } & \thicksim -z\\ \frac{dz}{z} & \thicksim -d\xi \\ \ln \left \vert z\right \vert & \thicksim -\xi +C_{4}\\ z & \thicksim C_{4}e^{-\xi } \end{align*}

Hence\[ y_{0}^{\prime }\thicksim C_{4}e^{-\xi }\] Integrating \begin{align} y_{0}^{in}\left ( \xi \right ) & \thicksim C_{4}\int e^{-\xi }d\xi +C_{5}\nonumber \\ & \thicksim -C_{4}e^{-\xi }+C_{5}\tag{9} \end{align}

Applying boundary conditions \(y\left ( 0\right ) =e\) gives\begin{align*} e & =-C_{4}+C_{5}\\ C_{5} & =e+C_{4} \end{align*}

Equation (9) becomes\begin{align} y_{0}^{in}\left ( \xi \right ) & \thicksim -C_{4}e^{-\xi }+e+C_{4}\nonumber \\ & \thicksim C_{4}\left ( 1-e^{-\xi }\right ) +e\tag{10} \end{align}

The next leading order \(y_{1}^{in}\left ( \xi \right ) \) is found from (8) by collecting terms in \(O\left ( \varepsilon ^{0}\right ) \), which results in the ODE\[ y_{1}^{\prime \prime }+y_{1}^{\prime }\thicksim -y_{0}\] Since \(y_{0}^{in}\left ( \xi \right ) \thicksim C_{4}\left ( 1-e^{-\xi }\right ) +e\), therefore \(y_{0}^{\prime }\thicksim C_{4}e^{-\xi }\) and the above becomes\[ y_{1}^{\prime \prime }+y_{1}^{\prime }\thicksim -C_{4}e^{-\xi }\] The homogenous solution is found first, then method of undetermined coefficients is used to find particular solution. The homogenous ODE is \[ y_{1,h}^{\prime \prime }\thicksim y_{1,h}^{\prime }\] This was solved above for \(y_{0}^{in}\), and the solution is\[ y_{1,h}\thicksim -C_{5}e^{-\xi }+C_{6}\] To find the particular solution, let \(y_{1,p}\thicksim A\xi e^{-\xi }\), where \(\xi \) was added since \(e^{-\xi }\) shows up in the homogenous solution. Hence\begin{align*} y_{1,p}^{\prime } & \thicksim Ae^{-\xi }-A\xi e^{-\xi }\\ y_{1,p}^{\prime \prime } & \thicksim -Ae^{-\xi }-\left ( Ae^{-\xi }-A\xi e^{-\xi }\right ) \\ & \thicksim -2Ae^{-\xi }+A\xi e^{-\xi } \end{align*}

Substituting these in the ODE \(y_{1,p}^{\prime \prime }+y_{1,p}^{\prime }\thicksim -C_{4}e^{-\xi }\) results in\begin{align*} -2Ae^{-\xi }+A\xi e^{-\xi }+Ae^{-\xi }-A\xi e^{-\xi } & \thicksim -C_{4}e^{-\xi }\\ -A & =-C_{4}\\ A & =C_{4} \end{align*}

Therefore the particular solution is \[ y_{1,p}\thicksim C_{4}\xi e^{-\xi }\] And therefore the complete solution is \begin{align*} y_{1}^{in}\left ( \xi \right ) & \thicksim y_{1,h}+y_{1,p}\\ & \thicksim -C_{5}e^{-\xi }+C_{6}+C_{4}\xi e^{-\xi } \end{align*}

Applying boundary conditions \(y\left ( 0\right ) =0\) to the above gives\begin{align*} 0 & =-C_{5}+C_{6}\\ C_{6} & =C_{5} \end{align*}

Hence the solution becomes\begin{align} y_{1}^{in}\left ( \xi \right ) & \thicksim -C_{5}e^{-\xi }+C_{5}+C_{4}\xi e^{-\xi }\nonumber \\ & \thicksim C_{5}\left ( 1-e^{-\xi }\right ) +C_{4}\xi e^{-\xi }\tag{11} \end{align}

The complete inner solution now becomes\begin{align} y^{in}\left ( \xi \right ) & \thicksim y_{0}^{in}+\varepsilon y_{1}^{in}\nonumber \\ & \thicksim C_{4}\left ( 1-e^{-\xi }\right ) +e+\varepsilon \left ( C_{5}\left ( 1-e^{-\xi }\right ) +C_{4}\xi e^{-\xi }\right ) \tag{12} \end{align}

There are two constants that need to be determined in the above from matching with the outer solution.\begin{align*} \lim _{\xi \rightarrow \infty }y^{in}\left ( \xi \right ) & \thicksim \lim _{x\rightarrow 0}y^{out}\left ( x\right ) \\ \lim _{\xi \rightarrow \infty }C_{4}\left ( 1-e^{-\xi }\right ) +e+\varepsilon \left ( C_{5}\left ( 1-e^{-\xi }\right ) +C_{4}\xi e^{-\xi }\right ) & \thicksim \lim _{x\rightarrow 0}e^{1-x}+\varepsilon \left ( 1-x\right ) e^{1-x}\\ C_{4}+e+\varepsilon C_{5} & \thicksim e+\varepsilon e \end{align*}

The above shows that\begin{align*} C_{5} & =e\\ C_{4}+e & =e\\ C_{4} & =0 \end{align*}

This gives the boundary layer solution \(y^{in}\left ( \xi \right ) \) as \begin{align*} y^{in}\left ( \xi \right ) & \thicksim e+\varepsilon e\left ( 1-e^{-\xi }\right ) \\ & \thicksim e\left ( 1+\varepsilon \left ( 1-e^{-\xi }\right ) \right ) \end{align*}

In terms of \(x\), since \(\xi =\frac{x}{\varepsilon },\) the above can be written as\[ y^{in}\left ( x\right ) \thicksim e\left ( 1+\varepsilon \left ( 1-e^{-\frac{x}{\varepsilon }}\right ) \right ) \] The uniform solution is therefore\begin{align*} y_{\text{uniform}}\left ( x\right ) & \thicksim y^{in}\left ( x\right ) +y^{out}\left ( x\right ) -y_{match}\\ & \thicksim \overset{y^{in}}{\overbrace{e\left ( 1+\varepsilon \left ( 1-e^{-\frac{x}{\varepsilon }}\right ) \right ) }}+\overset{y^{out}}{\overbrace{e^{1-x}+\varepsilon \left ( 1-x\right ) e^{1-x}}}-\left ( e+\varepsilon e\right ) \\ & \thicksim e+e\varepsilon \left ( 1-e^{-\frac{x}{\varepsilon }}\right ) +e^{1-x}+\left ( \varepsilon -\varepsilon x\right ) e^{1-x}-\left ( e+\varepsilon e\right ) \\ & \thicksim e+e\varepsilon -\varepsilon e^{1-\frac{x}{\varepsilon }}+e^{1-x}+\varepsilon e^{1-x}-\varepsilon xe^{1-x}-e-\varepsilon e\\ & \thicksim -\varepsilon e^{1-\frac{x}{\varepsilon }}+e^{1-x}+\varepsilon e^{1-x}-\varepsilon xe^{1-x}\\ & \thicksim e^{1-x}\left ( -\varepsilon e^{-\frac{1}{\varepsilon }}+1+\varepsilon -\varepsilon x\right ) \end{align*}

Or\[ y_{\text{uniform}}\left ( x\right ) \thicksim e^{1-x}\left ( 1+\varepsilon \left ( 1-x-e^{-\frac{1}{\varepsilon }}\right ) \right ) \] With error \(O\left ( \varepsilon ^{2}\right ) \).

The above solution is now compared to the exact solution of \(\varepsilon y^{\prime \prime }+y^{\prime }+y=0\) with \(y\left ( 0\right ) =e,y\left ( 1\right ) =1\). Since this is a homogenous second order ODE with constant coefficient, it is easily solved using characteristic equation.\[ \varepsilon \lambda ^{2}+\lambda +1=0 \] The roots are\begin{align*} \lambda & =\frac{-b}{2a}\pm \frac{\sqrt{b^{2}-4ac}}{2a}\\ & =\frac{-1}{2\varepsilon }\pm \frac{\sqrt{1-4\varepsilon }}{2\varepsilon } \end{align*}

Therefore the solution is\begin{align*} y\left ( x\right ) & =Ae^{\lambda _{1}x}+Be^{\lambda _{2}x}\\ & =Ae^{\left ( \frac{-1}{2\varepsilon }+\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }\right ) x}+Be^{\left ( \frac{-1}{2\varepsilon }-\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }\right ) x}\\ & =Ae^{\frac{-x}{2\varepsilon }}e^{\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }x}+Be^{\frac{-x}{2\varepsilon }}e^{\frac{-\sqrt{1-4\varepsilon }}{2\varepsilon }x}\\ & =e^{\frac{-x}{2\varepsilon }}\left ( Ae^{\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }x}+Be^{\frac{-\sqrt{1-4\varepsilon }}{2\varepsilon }x}\right ) \end{align*}

Applying first boundary conditions \(y\left ( 0\right ) =e\) to the above gives\begin{align*} e & =A+B\\ B & =e-A \end{align*}

Hence the solution becomes\begin{align} y\left ( x\right ) & =e^{\frac{-x}{2\varepsilon }}\left ( Ae^{\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }x}+\left ( e-A\right ) e^{\frac{-\sqrt{1-4\varepsilon }}{2\varepsilon }x}\right ) \nonumber \\ & =e^{\frac{-x}{2\varepsilon }}\left ( Ae^{\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }x}+e^{1-\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }x}-Ae^{\frac{-\sqrt{1-4\varepsilon }}{2\varepsilon }x}\right ) \nonumber \\ & =e^{\frac{-x}{2\varepsilon }}\left ( A\left ( e^{\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }x}-e^{\frac{-\sqrt{1-4\varepsilon }}{2\varepsilon }x}\right ) +e^{1-\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }x}\right ) \tag{13} \end{align}

Applying second boundary conditions \(y\left ( 1\right ) =1\) gives\begin{align} 1 & =e^{\frac{-1}{2\varepsilon }}\left ( A\left ( e^{\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }}-e^{\frac{-\sqrt{1-4\varepsilon }}{2\varepsilon }}\right ) +e^{1-\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }}\right ) \nonumber \\ e^{\frac{1}{2\varepsilon }} & =A\left ( e^{\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }}-e^{\frac{-\sqrt{1-4\varepsilon }}{2\varepsilon }}\right ) +e^{1-\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }}\nonumber \\ A & =\frac{e^{\frac{1}{2\varepsilon }}-e^{1-\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }}}{e^{\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }}-e^{\frac{-\sqrt{1-4\varepsilon }}{2\varepsilon }}}\tag{14} \end{align}

Substituting this into (13) results in\[ y^{\text{exact}}\left ( x\right ) =e^{\frac{-x}{2\varepsilon }}\left ( A\left ( e^{\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }x}-e^{\frac{-\sqrt{1-4\varepsilon }}{2\varepsilon }x}\right ) +e^{1-\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }x}\right ) \] Where \(A\) is given in (14). hence\[ y^{\text{exact}}\left ( x\right ) =e^{\frac{-x}{2\varepsilon }}\left ( \left ( \frac{e^{\frac{1}{2\varepsilon }}-e^{1-\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }}}{e^{\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }}-e^{\frac{-\sqrt{1-4\varepsilon }}{2\varepsilon }}}\right ) \left ( e^{\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }x}-e^{\frac{-\sqrt{1-4\varepsilon }}{2\varepsilon }x}\right ) +e^{1-\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }x}\right ) \] In summary



exact solution asymptotic solution




\(e^{\frac{-x}{2\varepsilon }}\left ( \left ( \frac{e^{\frac{1}{2\varepsilon }}-e^{1-\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }}}{e^{\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }}-e^{\frac{-\sqrt{1-4\varepsilon }}{2\varepsilon }}}\right ) \left ( e^{\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }x}-e^{\frac{-\sqrt{1-4\varepsilon }}{2\varepsilon }x}\right ) +e^{1-\frac{\sqrt{1-4\varepsilon }}{2\varepsilon }x}\right ) \) \(e^{1-x}+\varepsilon e^{1-x}\left ( 1-x-e^{-\frac{1}{\varepsilon }}\right ) +O\left ( \varepsilon ^{2}\right ) \)


The following plot compares the exact solution with the asymptotic solution for \(\varepsilon =0.1\)

pict

The following plot compares the exact solution with the asymptotic solution for \(\varepsilon =0.01\). The difference was too small to notice in this case, the plot below is zoomed to be near \(x=0\)

pict

At \(\varepsilon =0.001\), the difference between the exact and the asymptotic solution was not noticeable. Therefore, to better compare the solutions, the following plot shows the relative percentage error given by \[ 100\left \vert \frac{y^{\text{exact}}-y^{\text{uniform}}}{y^{\text{exact}}}\right \vert \% \] For different \(\varepsilon \).

pict

Some observations: The above plot shows more clearly how the difference between the exact solution and the asymptotic solution became smaller as \(\varepsilon \) became smaller. The plot also shows that the boundary layer near \(x=0\) is becoming more narrow are \(\varepsilon \) becomes smaller as expected.  It also shows that the relative error is smaller in the outer region than in the boundary layer region. For example, for \(\varepsilon =0.05\), the largest percentage error in the outer region was less than \(1\%\), while in the boundary layer, very near \(x=0\), the error grows to about \(5\%.\) Another observation is that at the matching location, the relative error goes down to zero. One also notices that the matching location drifts towards \(x=0\) as \(\varepsilon \) becomes smaller because the boundary layer is becoming more narrow. The following table summarizes these observations.




\(\varepsilon \) \(\%\) error near \(x=0\) apparent width of boundary layer






\(0.1\) \(10\) \(0.2\)



\(0.05\) \(5\) \(0.12\)



\(0.01\) \(1\) \(0.02\)



5.1.3 problem 3

   5.1.3.1 Part a
   5.1.3.2 Part b
   5.1.3.3 Part c

Problem (a) Find physical optics approximation to the eigenvalue and eigenfunctions of the Sturm-Liouville problem are \(\lambda \rightarrow \infty \)\begin{align*} -y^{\prime \prime } & =\lambda \left ( \sin \left ( x\right ) +1\right ) ^{2}y\\ y\left ( 0\right ) & =0\\ y\left ( \pi \right ) & =0 \end{align*}

(b) What is the integral relation necessary to make the eigenfunctions orthonormal? For some reasonable choice of scaling coefficient (give the value), plot the eigenfunctions for \(n=5,n=20.\)

(c) Estimate how large \(\lambda \) should be for the relative error of less than \(0.1\%\)

solution

5.1.3.1 Part a

Writing the ODE as\[ y^{\prime \prime }+\lambda \left ( \sin \left ( x\right ) +1\right ) ^{2}y=0 \] Let1 \[ \fbox{$\lambda =\frac{1}{\varepsilon ^2}$}\] Then the given ODE becomes\begin{equation} \varepsilon ^{2}y^{\prime \prime }\left ( x\right ) +\left ( \sin \left ( x\right ) +1\right ) ^{2}y\left ( x\right ) =0\tag{1} \end{equation} Physical optics approximation is obtained when \(\lambda \rightarrow \infty \) which implies \(\varepsilon \rightarrow 0^{+}\). Since the ODE is linear and the highest derivative is now multiplied by a very small parameter \(\varepsilon \), WKB can therefore be used to solve it. WKB starts by assuming that the solution has the form\[ y\left ( x\right ) \thicksim \exp \left ( \frac{1}{\delta }\sum _{n=0}^{\infty }\delta ^{n}S_{n}\left ( x\right ) \right ) \qquad \delta \rightarrow 0 \] Therefore, taking derivatives and substituting back in the ODE results in\begin{align*} y^{\prime }\left ( x\right ) & \thicksim \exp \left ( \frac{1}{\delta }\sum _{n=0}^{\infty }\delta ^{n}S_{n}\left ( x\right ) \right ) \left ( \frac{1}{\delta }\sum _{n=0}^{\infty }\delta ^{n}S_{n}^{\prime }\left ( x\right ) \right ) \\ y^{\prime \prime }\left ( x\right ) & \thicksim \exp \left ( \frac{1}{\delta }\sum _{n=0}^{\infty }\delta ^{n}S_{n}\left ( x\right ) \right ) \left ( \frac{1}{\delta }\sum _{n=0}^{\infty }\delta ^{n}S_{n}^{\prime }\left ( x\right ) \right ) ^{2}+\exp \left ( \frac{1}{\delta }\sum _{n=0}^{\infty }\delta ^{n}S_{n}\left ( x\right ) \right ) \left ( \frac{1}{\delta }\sum _{n=0}^{\infty }\delta ^{n}S_{n}^{\prime \prime }\left ( x\right ) \right ) \end{align*}

Substituting these into (1) and canceling the exponential terms gives\begin{align} \varepsilon ^{2}\left ( \left ( \frac{1}{\delta }\sum _{n=0}^{\infty }\delta ^{n}S_{n}^{\prime }\left ( x\right ) \right ) ^{2}+\frac{1}{\delta }\sum _{n=0}^{\infty }\delta ^{n}S_{n}^{\prime \prime }\left ( x\right ) \right ) & \thicksim -\left ( \sin \left ( x\right ) +1\right ) ^{2}\nonumber \\ \frac{\varepsilon ^{2}}{\delta ^{2}}\left ( S_{0}^{\prime }+\delta S_{1}^{\prime }+\cdots \right ) \left ( S_{0}^{\prime }+\delta S_{1}^{\prime }+\cdots \right ) +\frac{\varepsilon ^{2}}{\delta }\left ( S_{0}^{\prime \prime }+\delta S_{1}^{\prime \prime }+\cdots \right ) & \thicksim -\left ( \sin \left ( x\right ) +1\right ) ^{2}\nonumber \\ \frac{\varepsilon ^{2}}{\delta ^{2}}\left ( \left ( S_{0}^{\prime }\right ) ^{2}+\delta \left ( 2S_{1}^{\prime }S_{0}^{\prime }\right ) +\cdots \right ) +\frac{\varepsilon ^{2}}{\delta }\left ( S_{0}^{\prime \prime }+\delta S_{1}^{\prime \prime }+\cdots \right ) & \thicksim -\left ( \sin \left ( x\right ) +1\right ) ^{2}\nonumber \\ \left ( \frac{\varepsilon ^{2}}{\delta ^{2}}\left ( S_{0}^{\prime }\right ) ^{2}+\frac{2\varepsilon ^{2}}{\delta }S_{1}^{\prime }S_{0}^{\prime }+\cdots \right ) +\left ( \frac{\varepsilon ^{2}}{\delta }S_{0}^{\prime \prime }+\varepsilon ^{2}S_{1}^{\prime \prime }+\cdots \right ) & \thicksim -\left ( \sin \left ( x\right ) +1\right ) ^{2}\tag{2} \end{align}

The largest term in the left side is \(\frac{\varepsilon ^{2}}{\delta ^{2}}\left ( S_{0}^{\prime }\right ) ^{2}\). By dominant balance, this term has the same order of magnitude as the right side \(-\left ( \sin \left ( x\right ) +1\right ) ^{2}\). This implies that \(\delta ^{2}\) is proportional to \(\varepsilon ^{2}.\) For simplicity (following the book) \(\delta \) can be taken as equal to \(\varepsilon \)\[ \delta =\varepsilon \] Using the above in equation (2) results in\[ \left ( \left ( S_{0}^{\prime }\right ) ^{2}+2\varepsilon S_{1}^{\prime }S_{0}^{\prime }+\cdots \right ) +\left ( \varepsilon S_{0}^{\prime \prime }+\varepsilon ^{2}S_{1}^{\prime \prime }+\cdots \right ) \thicksim -\left ( \sin \left ( x\right ) +1\right ) ^{2}\] Balance of \(O\left ( 1\right ) \) gives\begin{equation} \left ( S_{0}^{\prime }\right ) ^{2}\thicksim -\left ( \sin \left ( x\right ) +1\right ) ^{2}\tag{3} \end{equation} Balance of \(O\left ( \varepsilon \right ) \) gives\begin{equation} 2S_{1}^{\prime }S_{0}^{\prime }\thicksim -S_{0}^{\prime \prime }\tag{4} \end{equation} Equation (3) is solved first in order to find \(S_{0}\left ( x\right ) \). \[ S_{0}^{\prime }\thicksim \pm i\left ( \sin \left ( x\right ) +1\right ) \] Hence\begin{align} S_{0}\left ( x\right ) & \thicksim \pm i\int _{0}^{x}\left ( \sin \left ( t\right ) +1\right ) dt+C^{\pm }\nonumber \\ & \thicksim \pm i\left ( t-\cos \left ( t\right ) \right ) _{0}^{x}+C^{\pm }\nonumber \\ & \thicksim \pm i\left ( 1+x-\cos \left ( x\right ) \right ) +C^{\pm }\tag{5} \end{align}

\(S_{1}\left ( x\right ) \) is now found from (4) and using \(S_{0}^{\prime \prime }=\pm i\cos \left ( x\right ) \) gives\begin{align*} S_{1}^{\prime } & \thicksim -\frac{1}{2}\frac{S_{0}^{\prime \prime }}{S_{0}^{\prime }}\\ & \thicksim -\frac{1}{2}\frac{\pm i\cos \left ( x\right ) }{\pm i\left ( \sin \left ( x\right ) +1\right ) }\\ & \thicksim -\frac{1}{2}\frac{\cos \left ( x\right ) }{\left ( \sin \left ( x\right ) +1\right ) } \end{align*}

Hence the solution is\begin{equation} S_{1}\left ( x\right ) \thicksim -\frac{1}{2}\ln \left ( 1+\sin \left ( x\right ) \right ) \tag{6} \end{equation} Having found \(S_{0}\left ( x\right ) \) and \(S_{1}\left ( x\right ) \), the leading behavior is now obtained from\begin{align*} y\left ( x\right ) & \thicksim \exp \left ( \frac{1}{\delta }\sum _{n=0}^{\infty }\delta ^{n}S_{n}\left ( x\right ) \right ) \\ & \thicksim \exp \left ( \frac{1}{\varepsilon }\left ( S_{0}\left ( x\right ) +\varepsilon S_{1}\left ( x\right ) \right ) +\cdots \right ) \\ & \thicksim \exp \left ( \frac{1}{\varepsilon }S_{0}\left ( x\right ) +S_{1}\left ( x\right ) +\cdots \right ) \end{align*}

The leading behavior is only the first two terms (called physical optics approximation in WKB), therefore\begin{align*} y\left ( x\right ) & \thicksim \exp \left ( \frac{1}{\varepsilon }S_{0}\left ( x\right ) +S_{1}\left ( x\right ) \right ) \\ & \thicksim \exp \left ( \pm \frac{i}{\varepsilon }\left ( 1+x-\cos \left ( x\right ) \right ) +C^{\pm }-\frac{1}{2}\ln \left ( 1+\sin \left ( x\right ) \right ) \right ) \\ & \thicksim \frac{1}{\sqrt{1+\sin x}}\exp \left ( \pm \frac{i}{\varepsilon }\left ( 1+x-\cos \left ( x\right ) \right ) +C^{\pm }\right ) \end{align*}

Which can be written as\[ y\left ( x\right ) \thicksim \frac{C}{\sqrt{1+\sin x}}\exp \left ( \frac{i}{\varepsilon }\left ( 1+x-\cos \left ( x\right ) \right ) \right ) -\frac{C}{\sqrt{1+\sin x}}\exp \left ( \frac{-i}{\varepsilon }\left ( 1+x-\cos \left ( x\right ) \right ) \right ) \] In terms of \(\sin \) and \(\cos \) the above becomes (using the standard Euler relation simplifications)\[ y\left ( x\right ) \thicksim \frac{A}{\sqrt{1+\sin x}}\cos \left ( \frac{1}{\varepsilon }\left ( 1+x-\cos \left ( x\right ) \right ) \right ) +\frac{B}{\sqrt{1+\sin x}}\sin \left ( \frac{1}{\varepsilon }\left ( 1+x-\cos \left ( x\right ) \right ) \right ) \] Where \(A,B\) are the new constants. But \(\lambda =\frac{1}{\varepsilon ^{2}}\), and the above becomes\begin{equation} y\left ( x\right ) \thicksim \frac{A}{\sqrt{1+\sin x}}\cos \left ( \sqrt{\lambda }\left ( 1+x-\cos \left ( x\right ) \right ) \right ) +\frac{B}{\sqrt{1+\sin x}}\sin \left ( \sqrt{\lambda }\left ( 1+x-\cos \left ( x\right ) \right ) \right ) \tag{7} \end{equation} Boundary conditions are now applied to determine \(A,B\).\begin{align*} y\left ( 0\right ) & =0\\ y\left ( \pi \right ) & =0 \end{align*}

First B.C. applied to (7) gives (where now \(\thicksim \) is replaced by \(=\) for notation simplicity)\begin{align*} 0 & =A\cos \left ( \sqrt{\lambda }\left ( 1-\cos \left ( 0\right ) \right ) \right ) +B\sin \left ( \sqrt{\lambda }\left ( 1-\cos \left ( 0\right ) \right ) \right ) \\ 0 & =A\cos \left ( 0\right ) +B\sin \left ( 0\right ) \\ 0 & =A \end{align*}

Hence solution (7) becomes\[ y\left ( x\right ) \thicksim \frac{B}{\sqrt{1+\sin x}}\sin \left ( \sqrt{\lambda }\left ( 1+x-\cos \left ( x\right ) \right ) \right ) \] Applying the second B.C. \(y\left ( \pi \right ) =0\) to the above results in\begin{align*} 0 & =\frac{B}{\sqrt{1+\sin \pi }}\sin \left ( \sqrt{\lambda }\left ( 1+\pi -\cos \left ( \pi \right ) \right ) \right ) \\ 0 & =B\sin \left ( \sqrt{\lambda }\left ( 1+\pi +1\right ) \right ) \\ & =B\sin \left ( \left ( 2+\pi \right ) \sqrt{\lambda }\right ) \end{align*}

Hence, non-trivial solution implies that\begin{align*} \left ( 2+\pi \right ) \sqrt{\lambda _{n}} & =n\pi \qquad n=1,2,3,\cdots \\ \sqrt{\lambda _{n}} & =\frac{n\pi }{2+\pi } \end{align*}

The eigenvalues are\[ \lambda _{n}=\frac{n^{2}\pi ^{2}}{\left ( 2+\pi \right ) ^{2}}\qquad n=1,2,3,\cdots \] Hence \(\lambda _{n}\approx n^{2}\) for large \(n\). The eigenfunctions are\[ y_{n}\left ( x\right ) \thicksim \frac{B_{n}}{\sqrt{1+\sin x}}\sin \left ( \sqrt{\lambda _{n}}\left ( 1+x-\cos \left ( x\right ) \right ) \right ) \qquad n=1,2,3,\cdots \] The solution is therefore a linear combination of the eigenfunctions\begin{align} y\left ( x\right ) & \thicksim \sum _{n=1}^{\infty }y_{n}\left ( x\right ) \nonumber \\ & \thicksim \sum _{n=1}^{\infty }\frac{B_{n}}{\sqrt{1+\sin x}}\sin \left ( \sqrt{\lambda _{n}}\left ( 1+x-\cos \left ( x\right ) \right ) \right ) \tag{7A} \end{align}

This solution becomes more accurate for large \(\lambda \) or large \(n\).

5.1.3.2 Part b

For normalization, the requirement is that\[ \int _{0}^{\pi }y_{n}^{2}\left ( x\right ) \overset{\text{weight}}{\overbrace{\left ( \sin \left ( x\right ) +1\right ) ^{2}}}dx=1 \] Substituting the eigenfunction \(y_{n}\left ( x\right ) \) solution obtained in first part in the above results in\[ \int _{0}^{\pi }\left ( \frac{B_{n}}{\sqrt{1+\sin x}}\sin \left ( \sqrt{\lambda _{n}}\left ( 1+x-\cos \left ( x\right ) \right ) \right ) \right ) ^{2}\left ( \sin \left ( x\right ) +1\right ) ^{2}dx\thicksim 1 \] The above is now solved for constant \(B_{n}\). The constant \(B_{n}\) will the same for each \(n\) for normalization. Therefore any \(n\) can be used for the purpose of finding the scaling constant. Selecting \(n=1\) in the above gives\begin{align} \int _{0}^{\pi }\left ( \frac{B}{\sqrt{1+\sin x}}\sin \left ( \frac{\pi }{2+\pi }\left ( 1+x-\cos \left ( x\right ) \right ) \right ) \right ) ^{2}\left ( \sin \left ( x\right ) +1\right ) ^{2}dx & \thicksim 1\nonumber \\ B^{2}\int _{0}^{\pi }\frac{1}{1+\sin x}\sin ^{2}\left ( \frac{\pi }{2+\pi }\left ( 1+x-\cos \left ( x\right ) \right ) \right ) \left ( \sin \left ( x\right ) +1\right ) ^{2}dx & \thicksim 1\nonumber \\ B^{2}\int _{0}^{\pi }\sin ^{2}\left ( \frac{\pi }{2+\pi }\left ( 1+x-\cos \left ( x\right ) \right ) \right ) \left ( \sin \left ( x\right ) +1\right ) dx & \thicksim 1\tag{8} \end{align}

Letting \(u=\frac{\pi }{2+\pi }\left ( 1+x-\cos \left ( x\right ) \right ) \), then\[ \frac{du}{dx}=\frac{\pi }{2+\pi }\left ( 1+\sin \left ( x\right ) \right ) \] When \(x=0\), then \(u=\frac{\pi }{2+\pi }\left ( 1+0-\cos \left ( 0\right ) \right ) =0\) and when \(x=\pi \) then \(u=\frac{\pi }{2+\pi }\left ( 1+\pi -\cos \left ( \pi \right ) \right ) =\frac{\pi }{2+\pi }\left ( 2+\pi \right ) =\pi \), hence (8) becomes\begin{align*} B^{2}\int _{0}^{\pi }\sin ^{2}\left ( u\right ) \frac{2+\pi }{\pi }\frac{du}{dx}dx & =1\\ \frac{2+\pi }{\pi }B^{2}\int _{0}^{\pi }\sin ^{2}\left ( u\right ) du & =1 \end{align*}

But \(\sin ^{2}\left ( u\right ) =\frac{1}{2}-\frac{1}{2}\cos 2u\), therefore the above becomes\begin{align*} \frac{2+\pi }{\pi }B^{2}\int _{0}^{\pi }\left ( \frac{1}{2}-\frac{1}{2}\cos 2u\right ) du & =1\\ \frac{1}{2}\frac{2+\pi }{\pi }B^{2}\left ( u-\frac{\sin 2u}{2}\right ) _{0}^{\pi } & =1\\ \frac{2+\pi }{2\pi }B^{2}\left ( \left ( \pi -\frac{\sin 2\pi }{2}\right ) -\left ( 0-\frac{\sin 0}{2}\right ) \right ) & =1\\ \frac{2+\pi }{2\pi }B^{2}\pi & =1\\ B^{2} & =\frac{2}{2+\pi } \end{align*}

Therefore\begin{align*} B & =\sqrt{\frac{2}{\pi +2}}\\ & =0.62369 \end{align*}

Using the above for each \(B_{n}\) in the solution obtained for the eigenfunctions in (7A), and pulling this scaling constant out of the sum results in\begin{equation} y^{\text{normalized}}\thicksim \sqrt{\frac{2}{\pi +2}}\sum _{n=1}^{\infty }\frac{1}{\sqrt{1+\sin x}}\sin \left ( \sqrt{\lambda _{n}}\left ( 1+x-\cos \left ( x\right ) \right ) \right ) \tag{9} \end{equation} Where \[ \sqrt{\lambda _{n}}=\frac{n\pi }{2+\pi }\qquad n=1,2,3,\cdots \] The following are plots for the normalized \(y_{n}\left ( x\right ) \) for \(n\) values it asks to show.

pict

The following shows  the \(y\left ( x\right ) \) as more eigenfunctions are added up to \(55\).

pict
5.1.3.3 Part c

Since approximate solution is\begin{align} y\left ( x\right ) & \thicksim \exp \left ( \frac{1}{\delta }\sum _{n=0}^{\infty }\delta ^{n}S_{n}\left ( x\right ) \right ) \qquad \delta \rightarrow 0\nonumber \\ & \thicksim \exp \left ( \frac{1}{\delta }S_{0}\left ( x\right ) +S_{1}\left ( x\right ) +\delta S_{2}\left ( x\right ) +\cdots \right ) \tag{1} \end{align}

And the physical optics approximation includes the first two terms in the series above, then the relative error between physical optics and exact solution is given by \(\delta S_{2}\left ( x\right ) \). But \(\delta =\varepsilon \). Hence (1) becomes\[ y\left ( x\right ) \thicksim \exp \left ( \frac{1}{\varepsilon }S_{0}\left ( x\right ) +S_{1}\left ( x\right ) +\varepsilon S_{2}\left ( x\right ) +\cdots \right ) \] Hence the relative error must be such that\begin{equation} \left \vert \varepsilon S_{2}\left ( x\right ) \right \vert _{\max }\leq 0.001\tag{1A} \end{equation}

Now \(S_{2}\left ( x\right ) \) is found. From (2) in part(a)\begin{align*} \frac{\varepsilon ^{2}}{\delta ^{2}}\left ( S_{0}^{\prime }+\delta S_{1}^{\prime }+\delta ^{2}S_{2}^{\prime }+\cdots \right ) \left ( S_{0}^{\prime }+\delta S_{1}^{\prime }+\delta ^{2}S_{2}^{\prime }+\cdots \right ) +\frac{\varepsilon ^{2}}{\delta }\left ( S_{0}^{\prime \prime }+\delta S_{1}^{\prime \prime }+\delta ^{2}S_{2}^{\prime \prime }+\cdots \right ) & \thicksim -\left ( \sin \left ( x\right ) +1\right ) ^{2}\\ \frac{\varepsilon ^{2}}{\delta ^{2}}\left ( \left ( S_{0}^{\prime }\right ) ^{2}+\delta \left ( 2S_{1}^{\prime }S_{0}^{\prime }\right ) +\delta ^{2}\left ( 2S_{0}^{\prime }S_{2}^{\prime }+\left ( S_{1}^{\prime }\right ) ^{2}\right ) +\cdots \right ) +\frac{\varepsilon ^{2}}{\delta }\left ( S_{0}^{\prime \prime }+\delta S_{1}^{\prime \prime }+\delta ^{2}S_{2}^{\prime \prime }+\cdots \right ) & \thicksim -\left ( \sin \left ( x\right ) +1\right ) ^{2}\\ \left ( \left ( S_{0}^{\prime }\right ) ^{2}+\varepsilon \left ( 2S_{1}^{\prime }S_{0}^{\prime }\right ) +\varepsilon ^{2}\left ( 2S_{0}^{\prime }S_{2}^{\prime }+\left ( S_{1}^{\prime }\right ) ^{2}\right ) +\cdots \right ) +\left ( \varepsilon S_{0}^{\prime \prime }+\varepsilon ^{2}S_{1}^{\prime \prime }+\varepsilon ^{3}S_{2}^{\prime \prime }+\cdots \right ) & \thicksim -\left ( \sin \left ( x\right ) +1\right ) ^{2} \end{align*}

A balance on \(O\left ( \varepsilon ^{2}\right ) ~\) gives the ODE to solve to find \(S_{2}\)\begin{equation} 2S_{0}^{\prime }S_{2}^{\prime }\thicksim -\left ( S_{1}^{\prime }\right ) ^{2}-S_{1}^{\prime \prime }\tag{2} \end{equation} But \begin{align*} S_{0}^{\prime } & \thicksim \pm i\left ( 1+\sin \left ( x\right ) \right ) \\ \left ( S_{1}^{\prime }\right ) ^{2} & \thicksim \left ( -\frac{1}{2}\frac{\cos \left ( x\right ) }{\left ( \sin \left ( x\right ) +1\right ) }\right ) ^{2}\\ & \thicksim \frac{1}{4}\frac{\cos ^{2}\left ( x\right ) }{\left ( 1+\sin \left ( x\right ) \right ) ^{2}}\\ S_{1}^{\prime \prime } & \thicksim -\frac{1}{2}\frac{d}{dx}\left ( \frac{\cos \left ( x\right ) }{\left ( 1+\sin \left ( x\right ) \right ) }\right ) \\ & \thicksim \frac{1}{2}\left ( \frac{1}{1+\sin \left ( x\right ) }\right ) \end{align*}

Hence (2) becomes\begin{align*} 2S_{0}^{\prime }S_{2}^{\prime } & \thicksim -\left ( S_{1}^{\prime }\right ) ^{2}-S_{1}^{\prime \prime }\\ S_{2}^{\prime } & \thicksim -\frac{\left ( \left ( S_{1}^{\prime }\right ) ^{2}+S_{1}^{\prime \prime }\right ) }{2S_{0}^{\prime }}\\ & \thicksim -\frac{\left ( \frac{1}{4}\frac{\cos ^{2}\left ( x\right ) }{\left ( 1+\sin \left ( x\right ) \right ) ^{2}}+\frac{1}{2}\left ( \frac{1}{1+\sin \left ( x\right ) }\right ) \right ) }{\pm 2i\left ( 1+\sin \left ( x\right ) \right ) }\\ & \thicksim \pm \frac{i\left ( \frac{1}{4}\frac{\cos ^{2}\left ( x\right ) }{\left ( \sin \left ( x\right ) +1\right ) ^{2}}+\frac{1}{2}\left ( \frac{1}{1+\sin \left ( x\right ) }\right ) \right ) }{2\left ( \sin \left ( x\right ) +1\right ) }\\ & \thicksim \pm \frac{i\frac{1}{4}\left ( \frac{\cos ^{2}\left ( x\right ) +2\left ( 1+\sin \left ( x\right ) \right ) }{\left ( \sin \left ( x\right ) +1\right ) ^{2}}\right ) }{2\left ( \sin \left ( x\right ) +1\right ) }\\ & \thicksim \pm \frac{i}{8}\frac{\cos ^{2}\left ( x\right ) +2\left ( 1+\sin \left ( x\right ) \right ) }{\left ( 1+\sin \left ( x\right ) \right ) ^{3}} \end{align*}

Therefore\begin{align} S_{2}\left ( x\right ) & \thicksim \pm \frac{i}{8}\int _{0}^{x}\frac{\cos ^{2}\left ( t\right ) +2\left ( 1+\sin \left ( t\right ) \right ) }{\left ( 1+\sin \left ( t\right ) \right ) ^{3}}dt\nonumber \\ & \thicksim \pm \frac{i}{8}\left ( \int _{0}^{x}\frac{\cos ^{2}\left ( t\right ) }{\left ( 1+\sin \left ( t\right ) \right ) ^{3}}dt+2\int _{0}^{x}\frac{1}{\left ( 1+\sin \left ( t\right ) \right ) ^{2}}dt\right ) \tag{3} \end{align}

To do \(\int _{0}^{x}\frac{\cos ^{2}\left ( t\right ) }{\left ( 1+\sin \left ( t\right ) \right ) ^{3}}dt\), I used a lookup integration rule from tables which says \(\int \cos ^{p}\left ( t\right ) \left ( a+\sin t\right ) ^{m}dt=\frac{1}{\left ( a\right ) \left ( m\right ) }\cos ^{p+1}\left ( t\right ) \left ( a+\sin t\right ) ^{m}\), therefore using this rule the integral becomes, where now \(m=-3,p=2,a=1\),\begin{align*} \int _{0}^{x}\frac{\cos ^{2}t}{\left ( 1+\sin t\right ) ^{3}}dt & =\frac{1}{-3}\left ( \frac{\cos ^{3}t}{\left ( 1+\sin t\right ) ^{3}}\right ) _{0}^{x}\\ & =\frac{1}{-3}\left ( \frac{\cos ^{3}x}{\left ( 1+\sin x\right ) ^{3}}-1\right ) \\ & =\frac{1}{3}\left ( 1-\frac{\cos ^{3}x}{\left ( 1+\sin x\right ) ^{3}}\right ) \end{align*}

And for \(\int \frac{1}{\left ( 1+\sin \left ( x\right ) \right ) ^{2}}dx\), half angle substitution can be used. I do not know what other substitution to use. Using CAS for little help on this, I get \begin{align*} \int _{0}^{x}\frac{1}{\left ( 1+\sin t\right ) ^{2}}dt & =\left ( -\frac{\cos t}{3\left ( 1+\sin t\right ) ^{2}}-\frac{1}{3}\frac{\cos t}{1+\sin t}\right ) _{0}^{x}\\ & =\left ( -\frac{\cos x}{3\left ( 1+\sin x\right ) ^{2}}-\frac{1}{3}\frac{\cos x}{1+\sin x}\right ) -\left ( -\frac{1}{3}-\frac{1}{3}\right ) \\ & =\frac{2}{3}-\frac{\cos x}{3\left ( 1+\sin x\right ) ^{2}}-\frac{1}{3}\frac{\cos x}{1+\sin x} \end{align*}

Hence from (3)\begin{align*} S_{2}\left ( x\right ) & \thicksim \pm \frac{i}{8}\left ( \frac{1}{3}\left ( 1-\frac{\cos ^{3}\left ( x\right ) }{\left ( 1+\sin \left ( x\right ) \right ) ^{3}}\right ) +2\left ( \frac{2}{3}-\frac{\cos x}{3\left ( 1+\sin x\right ) ^{2}}-\frac{1}{3}\frac{\cos x}{1+\sin x}\right ) \right ) \\ & \thicksim \pm \frac{i}{8}\left ( \frac{1}{3}-\frac{1}{3}\frac{\cos ^{3}\left ( x\right ) }{\left ( 1+\sin \left ( x\right ) \right ) ^{3}}+\frac{4}{3}-\frac{2\cos x}{3\left ( 1+\sin x\right ) ^{2}}-\frac{2}{3}\frac{\cos x}{1+\sin x}\right ) \\ & \thicksim \pm \frac{i}{24}\left ( 1-\frac{\cos ^{3}\left ( x\right ) }{\left ( 1+\sin \left ( x\right ) \right ) ^{3}}+4-\frac{2\cos x}{\left ( 1+\sin x\right ) ^{2}}-\frac{2\cos x}{1+\sin x}\right ) \end{align*}

Therefore, from (1A)\begin{align} \left \vert \varepsilon S_{2}\left ( x\right ) \right \vert _{\max } & \leq 0.001\nonumber \\ \left \vert \varepsilon \frac{i}{24}\left ( 1-\frac{\cos ^{3}\left ( x\right ) }{\left ( 1+\sin \left ( x\right ) \right ) ^{3}}+4-\frac{2\cos x}{\left ( 1+\sin x\right ) ^{2}}-\frac{2\cos x}{1+\sin x}\right ) \right \vert _{\max } & \leq 0.001\nonumber \\ \frac{1}{24}\left \vert \varepsilon \left ( 1-\frac{\cos ^{3}\left ( x\right ) }{\left ( 1+\sin \left ( x\right ) \right ) ^{3}}+4-\frac{2\cos x}{\left ( 1+\sin x\right ) ^{2}}-\frac{2\cos x}{1+\sin x}\right ) \right \vert _{\max } & \leq 0.001\nonumber \\ \left \vert \varepsilon \left ( 1-\frac{\cos ^{3}\left ( x\right ) }{\left ( 1+\sin \left ( x\right ) \right ) ^{3}}+4-\frac{2\cos x}{\left ( 1+\sin x\right ) ^{2}}-\frac{2\cos x}{1+\sin x}\right ) \right \vert _{\max } & \leq 0.024\tag{2} \end{align}

The maximum value of \(\left ( 1-\frac{\cos ^{3}\left ( x\right ) }{\left ( 1+\sin \left ( x\right ) \right ) ^{3}}+4-\frac{2\cos x}{\left ( 1+\sin x\right ) ^{2}}-\frac{2\cos x}{1+\sin x}\right ) \) between \(x=0\) and \(x=\pi \) is now found and used to find \(\varepsilon \). A plot of the above shows the maximum is maximum at the end, at \(x=\pi \) (Taking the derivative and setting it to zero to determine where the maximum is can also be used).

pict

Therefore, at \(x=\pi \) \begin{align*} \left ( 1-\frac{\cos ^{3}x}{\left ( 1+\sin x\right ) ^{3}}+4-\frac{2\cos x}{\left ( 1+\sin x\right ) ^{2}}-\frac{2\cos x}{1+\sin x}\right ) _{x=\pi } & =\left ( 1-\frac{\cos ^{3}\left ( \pi \right ) }{\left ( 1+\sin \pi \right ) ^{3}}+4-\frac{2\cos \pi }{\left ( 1+\sin \pi \right ) ^{2}}-\frac{2\cos \pi }{1+\sin \pi }\right ) \\ & =10 \end{align*}

Hence (2) becomes\begin{align*} 10\varepsilon & \leq 0.024\\ \varepsilon & \leq 0.0024 \end{align*}

But since \(\lambda =\frac{1}{\varepsilon ^{2}}\) the above becomes\begin{align*} \frac{1}{\sqrt{\lambda }} & \leq 0.0024\\ \sqrt{\lambda } & \geq \frac{1}{0.0024}\\ \sqrt{\lambda } & \geq 416.67 \end{align*}

Hence \[ \fbox{$\lambda \geq 17351.1$}\] To find which mode this corresponds to, since \(\lambda _{n}=\frac{n^{2}\pi ^{2}}{\left ( 2+\pi \right ) ^{2}}\), then need to solve for \(n\)\begin{align*} 17351.1 & =\frac{n^{2}\pi ^{2}}{\left ( 2+\pi \right ) ^{2}}\\ n^{2}\pi ^{2} & =\left ( 17351.1\right ) \left ( 2+\pi \right ) ^{2}\\ n & =\sqrt{\frac{\left ( 17351.1\right ) \left ( 2+\pi \right ) ^{2}}{\pi ^{2}}}\\ & =215.58 \end{align*}

Hence the next largest integer is used\[ \fbox{$n=216$}\] To have relative error less than \(0.1\%\) compared to exact solution. Therefore using the result obtained in (9) in part (b) the normalized solution needed is\begin{equation} y^{\text{normalized}}\thicksim \sqrt{\frac{2}{\pi +2}}\sum _{n=1}^{216}\frac{1}{\sqrt{1+\sin x}}\sin \left ( \frac{n\pi }{2+\pi }\left ( 1+x-\cos \left ( x\right ) \right ) \right ) \nonumber \end{equation}

The following is a plot of the above solution adding all the first \(216\) modes for illustration.

pict