<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\pl}{\partial}
\newcommand{\ud}{\underline}
\newcommand{\lin}{\int_0^\infty}
\parindent=0pt
\begin{document}


{\bf Question}

Find the Green's function for the following boundary value problem
$$y''+y=f(x); \quad y(0)=0, \quad y(b)=0$$ What happens in the
case $b=n\pi$ where $n$ is an integer?

Use the Green's function to obtain the solution to
 $$y''+y=x; \quad y(0)=0, \quad y\left(\frac{\pi}{2}\right)=0$$



\vspace{.5in}

{\bf Answer}

$$y'' + y = 0 \hspace{.2in} y(0)= 0; \hspace{.2in} y(b)=0.$$

Solution is $y = A\sin x + B\cos x$

We want solutions $\begin{array}{c}y_1(x) \\ y_2(x) \end{array}$
which vanishes when $\begin{array}{c} x = b \\ x = 0 \end{array}$

$y_2$ is given by $y_2(x) = \sin x$

For $y_1$ we choose A and B so that \begin{eqnarray*} 0 &amp; = &amp; A
\sin b+ B \cos b \\ {\rm Let\ \ \ } A = \cos b &amp; {\rm and} &amp; B =
-\sin b \\ {\rm Then\ \ \ } y_2(x)  &amp; = &amp; \sin x \cos b - \cos x
\sin b \\  &amp; =  &amp; \sin(x - b) \\ \\ {\rm so \ \ \ }y_1 &amp; = &amp; \sin
(x - b) \\ y_2 &amp; = &amp; \sin x \end{eqnarray*}

\begin{eqnarray*} W = \left| \begin{array}{cc} y_1 &amp; y_ 2 \\ y_1'
&amp; y_2' \end{array} \right| &amp; = &amp; \left| \begin{array}{cc}\sin (x -
b) &amp; \sin x \\ \cos (x - b) &amp; \cos x \end{array} \right| \\ &amp; = &amp;
\sin(x - b)\cos x - \cos (x - b)\sin x \\ &amp; =&amp; \sin(x - b - x) \\
&amp; = &amp; \sin (-b) \\ &amp; = &amp; -\sin b\end{eqnarray*}

Now $\tilde{G}(x,s) = \left\{ \begin{array}{cc}
\ds\frac{y_1(s)y_2(x)}{W(s)} &amp; 0 \leq x \leq s \leq b \\
\ds\frac{y_1(x)y_2(s)}{W(s)} &amp; 0 \leq s \leq x \leq b \end{array}
\right.$

So in this case: $\tilde{G}(x,s) = \left\{ \begin{array}{cc}
\ds\frac{\sin (s - b)\sin(x)}{-\sin(b)} &amp; 0 \leq x \leq s \leq b
\\ \ds\frac{\sin(x-b)\sin(s)}{-\sin(b)} &amp; 0 \leq s \leq x \leq b
\end{array} \right.$

If $b = n\pi$ then $\sin b = 0$ and $\tilde{G}(x,s)$ is not well
defined by the above.

This is because there is no non-trivial solution to the boundary
value problem $y'' + y = 0$ subject to $y(0) = 0 $ and $y(n\pi) =
0$

If $b = \frac{\pi}{2}$ then $\sin( \frac{\pi}{2}) = 1$ and $
\sin(x - \frac{\pi}{2}) = -\cos x$

\begin{eqnarray*} {\rm So\ \ \ } \tilde{G}(x,s)&amp;  = &amp; \left\{ \begin{array}{cc} \cos s
\sin(x) &amp; x \leq s \\ \cos x \sin s &amp; s \leq x \end{array} \right.
\\ {\rm so\ that\ \ } y(x) &amp; = &amp; \int_0^x \cos x \sin s \cdot s \,
ds + \int_x^\frac{\pi}{2}(\sin x)(\cos s)s \, ds
\end{eqnarray*}

Now we integrate by parts: \begin{eqnarray*} \int_0^x(\sin s)s \,
ds &amp; = &amp; [-\cos s \cdot s]_0^x + \int_0^x \cos s \, ds \\ &amp; = &amp; -x
\cos x + \sin x \\ \int_x^\frac{\pi}{2}(\cos s)s \, ds  &amp; = &amp;
[\sin \cdot s]_x^\frac{\pi}{2} - \int_x^\frac{\pi}{2}\sin s \, ds
\\ &amp; = &amp; \frac{\pi}{2} - x \sin x - \cos x \end{eqnarray*}

\begin{eqnarray*} y &amp; =&amp; -x \cos^2 x + \sin x \cos x +
\frac{\pi}{2} \sin x - x \sin^2 x - \cos x \sin x \\ &amp; = &amp; -x +
\frac{\pi}{2} \sin x \end{eqnarray*}

NOTE: there is a sign error in this answer, but not sure where.



\end{document}
</pre></body></html>