\documentclass{amsart}
\usepackage[fontsize=12pt]{scrextend}
\usepackage{amssymb, amsmath, amsfonts, amsthm}
\usepackage[abbrev]{amsrefs}
%\usepackage[notref]{showkeys}
\usepackage[margin=0.8 in]{geometry}
\usepackage[colorlinks=true, linkcolor=blue]{hyperref}
        
\def \k {K\"ahler }
\def \s {Szeg\H{o} }
\def \d {\partial}
\def \y {{\tilde{y}}}
\def \dbar {\oo\partial}
\def \dd {\partial}
\def \dt {\frac{\partial}{\partial t}}
\def \eps {\varepsilon}
\DeclareMathOperator{\Tr}{Tr} 
\DeclareMathOperator{\Ric}{Ric}
\DeclareMathOperator{\Real}{Re}
\DeclareMathOperator{\Sym}{Sym}
\DeclareMathOperator{\vol}{vol}
\DeclareMathOperator{\Hess}{Hess}
\DeclareMathOperator{\Rm}{Rm}
\DeclareMathOperator{\osc}{osc}
\DeclareMathOperator{\id}{id}
\DeclareMathOperator{\sn}{sn}
\DeclareMathOperator{\cs}{cs}
\DeclareMathOperator{\tn}{tn}

\newcommand{\oo}[1]{\overline{#1}}
\newcommand{\f}[2]{\frac{#1}{#2}}
\newtheorem{claim}{Claim}

\title{Math 124B: Midterm}
\date{}


\theoremstyle{definition} 
\newtheorem{definition}{Definition}[section]
\newtheorem{conjecture}{Conjecture}[section]
\newtheorem{example}{Example}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{remark}{Remark}[section]
\newtheorem{question}{Question}[section]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}{Corollary}[section]
\newtheorem*{notation}{Notation}
\newtheorem{problem}{Problem}[section]

\begin{document}
\maketitle
\begin{enumerate}
\item Let $X \in C^2$ on $(a,b)$. Assuming symmetric boundary conditions, i.e. $X'(x)X(x)\biggr|^b_a = 0$, prove that the eigenvalue of $X''+\lambda X=0$ on $(a,b)$ is non-negative.

\item Solve the problem
\begin{equation*}
\begin{cases}
u_{tt} = c^2u_{xx} \\
u(0,t) = u(L,t) = 0\\
u(x,0) = x,\\
u_t(x,0) = 0.
\end{cases}
\end{equation*}

\item Find the sum $\displaystyle \sum_{n \text{ odd }}\frac{1}{n^2}$ using any method.

\item Let 
\begin{equation*}
f_n(x) = \frac{n}{1+n^2x^2} - \frac{n-1}{1+(n-1)^2x^2}.
\end{equation*}
Show that $\displaystyle \sum_{n=1}^\infty f_n(x)$ converges point-wise to 0.  Show that it does not converge uniformly and in $L^2$.

\item Solve the equation $u_{xx}+u_{yy} =1$ in the annulus $a <r <b$ with $u =0$ on the boundary $r=a$ and $r=b$.
\end{enumerate}

\section*{Solutions}

\begin{enumerate}
\item Multiplying both sides by $X$ and integrating over $(a,b)$, we have
\begin{align*}
-\lambda \int_a^b X^2 &= \int_a^b X''Xdx \\
&= (X'X)|_a^b - \int_a^b (X')^2dx \\
&=-\int_a^b(X')^2dx
\end{align*}
Isolating $\lambda$, we get
\begin{equation*}
\lambda = \frac{\int_a^b (X')^2dx}{\int_a^b X^2dx} \geq 0
\end{equation*}

\item The general solution for the wave equation with Dirichlet boundary condition is given by
\begin{equation*}
u(x,t) = \sum_{n=1}^\infty\left(A_n\cos\left(\frac{n\pi ct}{L}\right) + B_n\sin\left(\frac{n\pi ct}{L}\right)\right)\sin\left(\frac{n\pi x}{L}\right).
\end{equation*}
Differentiating with respect to time
\begin{equation*}
u_t(x,t) = \sum_{n=1}^\infty \frac{n\pi c}{L}\left(-A_n\sin\left(\frac{n\pi c t}{L}\right) + B_n\cos\left(\frac{n\pi ct}{L}\right)\right)\sin\left(\frac{n\pi x}{L}\right).
\end{equation*}
With the initial condition $u_t(x,0) = 0$, we get
\begin{equation*}
0 = \sum_{n=1}^\infty \frac{n\pi c}{L}B_n\sin\left(\frac{n\pi x}{L}\right)
\end{equation*}
so that all the $B_n= 0$.  Using the initial condition $u(x,0) = x$, we have
\begin{equation*}
x= \sum_{n=1}^\infty A_n\sin\left(\frac{n\pi x}{L}\right).
\end{equation*}
This is a Fourier sine expansion of $x$ on $(0,L)$, so we compute the coefficients:
\begin{align*}
A_n &= \frac{2}{L}\int_0^L x \sin\left(\frac{n\pi x}{L}\right)dx \\
&=-\frac{2x}{n\pi}\cos\left(\frac{n\pi x}{L}\right) + \frac{2L}{n^2\pi^2}\sin\left(\frac{n\pi x}{L}\right)\biggr|_0^L = (-1)^{n+1}\frac{2L}{n\pi}
\end{align*}
hence the solution is
\begin{equation*}
u(x,t) = \frac{2L}{\pi}\sum_{n=1}^\infty \frac{(-1)^{n+1}}{n}\sin\left(\frac{n\pi x}{L}\right)\cos\left(\frac{n\pi ct}{L}\right)
\end{equation*}
\item Using Parseval's identity with $x$ and the Fourier sine series computed in the previous problem, we have
\begin{align*}
\sum_{n=1}\left(\frac{2L}{n\pi}\right)^2 \int_0^L \sin^2\left(\frac{n \pi x}{L}\right)dx = \frac{2L^3}{\pi^2}\sum_{n=1}\frac{1}{n^2}
\end{align*}
and
\begin{equation*}
\int_0^L x^2dx = \frac{L^3}{3} 
\end{equation*}
Therefore, 
\begin{equation*}
\sum_{n=1}\frac{1}{n^2} = \frac{\pi^2}{6}.
\end{equation*}
Now to obtain the odd sums, we split the sum into
\begin{equation*}
\sum_{n \text{ odd }}\frac{1}{n^2} + \sum_{n \text{ even }}\frac{1}{n^2} = \sum_{n=1}^\infty \frac{1}{n^2} = \frac{\pi^2}{6}
\end{equation*}
The even sum can be rewritten as
\begin{equation*}
\sum_{n=1}^\infty \frac{1}{(2n)^2} = \frac{1}{4}\sum_{n=1}^\infty \frac{1}{n^2} = \frac{\pi^2}{24}
\end{equation*}
hence the odd sum is
\begin{equation*}
\sum_{n \text{ odd }}\frac{1}{n^2} = \frac{\pi^2}{6} -\frac{\pi^2}{24} = \frac{\pi^2}{8}.
\end{equation*}

\item The partial sum is given by
\begin{equation*}
\sum_{n=1}^N f_n(x) = \frac{N}{1+N^2x^2} = \frac{1}{N(\frac{1}{N^2} + x^2)}
\end{equation*}
which converges to 0 for $x  > 0$ as $N\to \infty$.

Computing the $L^2$ norm, we have
\begin{equation*}
\int_0^L \frac{N^2}{(1+N^2x^2)^2}dx = N\int_0^{NL}\frac{dy}{(1+y^2)^2} \to \infty
\end{equation*}
as $N\to \infty$ hence does not converge in $L^2$.

Furthermore, we have
\begin{equation*}
\lim_{N\to \infty} \sup_{(0,L)}\frac{N}{1+N^2x^2} = \lim_{N\to \infty}N = \infty
\end{equation*}
hence does not converge uniformly.

\item Solving for the rotationally symmetric solutions, the PDE becomes the ODE
\begin{equation*}
u_{rr}+\frac{1}{r}u_r = 1.
\end{equation*}
Multiplying $r$ to both sides,
\begin{equation*}
(ru_r)_r = r.
\end{equation*}
Integrating twice, we have
\begin{equation*}
u(r) = \frac{1}{4}r^2 + c_1\ln(r) + c_2.
\end{equation*}
Inserting the boundary conditions, we have
\begin{align*}
0 &= \frac{a^2}{4} + c_1\ln(a) + c_2\\
0 &= \frac{b^2}{4} + c_1\ln(b) + c_2.
\end{align*} 
Subtracting one from the other, we get
\begin{equation*}
c_1 = \frac{b^2-a^2}{4(\ln(b)-\ln(a))}.
\end{equation*}
Inserting this and solving for $c_2$, we have
\begin{equation*}
u(r) = \frac{r^2-a^2}{4}-\frac{b^2-a^2}{4}\left(\frac{\ln(r)-\ln(a)}{\ln(b)-\ln(a)}\right).
\end{equation*}
\end{enumerate}
\end{document}