%%%%		-*- Mode: LaTeX -*-
%%%% Author:    J. Robert Buchanan
%%%% Address:   Department of Mathematics
%%%%		Millersville University
%%%%            P.O. Box 1002
%%%%            Millersville, PA 17551-0302
%%%% Phone:     717-871-7305
%%%% FAX:	717-871-7948
%%%%
%%%% Email:     Robert.Buchanan@millersville.edu
%%%%
%%%% Date:      02/19/2025
%%%%
%%%% Purpose:   Rayleigh Quotient
%%%%

\documentclass[10pt]{beamer}

\mode<presentation>
{
  %\usetheme{Warsaw}
  \usetheme{default}
  %\usetheme{CambridgeUS}
  % or ...

  %\setbeamercovered{transparent}
  % or whatever (possibly just delete it)
}


\usepackage[english]{babel}
% or whatever

\usepackage[latin1]{inputenc}
% or whatever

\usepackage{times}
\usepackage[T1]{fontenc}
% Or whatever. Note that the encoding and the font should match. If T1
% does not look nice, try deleting the line with the fontenc.


\title{Rayleigh Quotient}
\subtitle{\textit{Partial Differential Equations}} % (optional)


\author % (optional, use only with lots of authors)
{J~Robert~Buchanan}
% - Use the \inst{?} command only if the authors have different
%   affiliation.

\institute[Millersville University of Pennsylvania]
% (optional, but mostly needed)
{
  Department of Mathematics
}
% - Use the \inst command only if there are several affiliations.
% - Keep it simple, no one is interested in your street address.

\date{ % (optional)
%Fall
Spring
%Summer
\the\year}

\subject{Talks}
% This is only inserted into the PDF information catalog. Can be left
% out. 



% If you have a file called "university-logo-filename.xxx", where xxx
% is a graphic format that can be processed by latex or pdflatex,
% resp., then you can add a logo as follows:

% \pgfdeclareimage[height=0.5cm]{university-logo}{university-logo-filename}
% \logo{\pgfuseimage{university-logo}}



% Delete this, if you do not want the table of contents to pop up at
% the beginning of each subsection:
\AtBeginSubsection[]
{
  \begin{frame}<beamer>
    \frametitle{Outline}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}


% If you wish to uncover everything in a step-wise fashion, uncomment
% the following command: 

%\beamerdefaultoverlayspecification{<+->}


\begin{document}

\begin{frame}
  \titlepage
\end{frame}

%\begin{frame}
%  \frametitle{Outline}
%  \tableofcontents
  % You might wish to add the option [pausesections]
%\end{frame}


% Since this a solution template for a generic talk, very little can
% be said about how it should be structured. However, the talk length
% of between 15min and 45min and the theme suggest that you stick to
% the following rules:  

% - Exactly two or three sections (other than the summary).
% - At *most* three subsections per section.
% - Talk about 30s to 2min per frame. So there should be between about
%   15 and 30 frames, all told.

%\section{Introduction}

\begin{frame}\frametitle{Objectives}

In this lesson we will learn:
\begin{itemize}
\item the formula for the Rayleigh quotient, and
\item use the Rayleigh quotient to estimate the eigenvalues of a
  Sturm-Liouville boundary value problem.
\end{itemize}

\end{frame}
%%

\begin{frame}\frametitle{Sturm-Liouville BVP}

Once again, the setting of this discussion is the regular
Sturm-Liouville boundary value problem:
\begin{align*}
[ p(x) y'(x) ]' + (q(x) + \lambda r(x)) y(x)
	&= 0
\mbox{ for $a < x < b$}	\\
\alpha_{1} y(a) + \beta_{1} y'(a)
	&= 0	\\
\alpha_{2} y(b) + \beta_{2} y'(b)
	&= 0
\end{align*}
where $\alpha_{1}^{2} + \beta_{1}^{2} \ne 0$ and $\alpha_{2}^{2} +
\beta_{2}^{2} \ne 0$.

\end{frame}
%%

\begin{frame}\frametitle{Rayleigh Quotient Formula}

Multiply both sides of the ODE by an eigenfunction $\phi(x)$ and
integrate over $[a, b]$.
\begin{align*}
[ p(x) \phi'(x) ]' + (q(x) + \lambda r(x)) \phi(x)
	&= 0	\\
[ p(x) \phi'(x) ]' \phi(x) + (q(x) + \lambda r(x)) (\phi(x))^{2}
	&= 0	\\
\int_{a}^{b} [ p(x) \phi'(x) ]' \phi(x) + (q(x) + \lambda r(x))
  (\phi(x))^{2} \, dx
	&= 0
\end{align*}
Expand the integrand and solve for eigenvalue $\lambda$.

\end{frame}
%%

\begin{frame}\frametitle{Eigenvalue}
\fontsize{8pt}{9.6}\selectfont

\begin{align*}
0
	&= \int_{a}^{b} [ p(x) \phi'(x) ]' \phi(x) + (q(x) + \lambda r(x))
  (\phi(x))^{2} \, dx	\\
	&= \int_{a}^{b} [ p(x) \phi'(x) ]' \phi(x) \, dx +
   \int_{a}^{b} q(x) (\phi(x))^{2} \, dx + \lambda \int_{a}^{b} r(x) (\phi(x))^{2} \, dx	\\
\lambda \int_{a}^{b} r(x) (\phi(x))^{2} \, dx
	&= -\int_{a}^{b} [ p(x) \phi'(x) ]' \phi(x) \, dx - \int_{a}^{b} q(x) (\phi(x))^{2} \, dx	\\
{}	&= -\left[ p(x) \phi(x) \phi'(x) \right]_{x=a}^{x=b} + \int_{a}^{b} p(x)
     (\phi'(x))^{2} \, dx - \int_{a}^{b} q(x) (\phi(x))^{2} \, dx	\\
\lambda
	&= \frac{\left[ -p(x) \phi(x) \phi'(x) \right]_{x=a}^{x=b} +
   \int_{a}^{b} \left( p(x) (\phi'(x))^{2} - q(x) (\phi(x))^{2}
   \right) \, dx}{\int_{a}^{b} r(x) (\phi(x))^{2} \, dx}
\end{align*}
\textbf{Remarks}:
\begin{itemize}
\item Note the use of integration by parts.
\item This is not an effective way to calculate the eigenvalue
  $\lambda$ since we must know the eigenfunction $\phi$.
\end{itemize}

\end{frame}
%%

\begin{frame}\frametitle{Positivity of Eigenvalues}

\begin{theorem}
%\label{thm:SL:RQBC}
All eigenvalues of the Sturm-Liouville boundary value problem
are nonnegative provided $q(x) \le 0$ on $[a, b]$ and
\[
%\label{eq:SL:RQBC}
p(b) \phi(b) \frac{d\phi}{dx}(b) - p(a) \phi(a) \frac{d\phi}{dx}(a)
	\le 0	.
\]
\end{theorem}
\[
\lambda
	= \frac{\left[ -p(x) \phi(x) \phi'(x) \right]_{x=a}^{x=b} +
   \int_{a}^{b} \left( p(x) (\phi'(x))^{2} - q(x) (\phi(x))^{2}
   \right) \, dx}{\int_{a}^{b} r(x) (\phi(x))^{2} \, dx}
\]

\end{frame}
%%

\begin{frame}\frametitle{Rayleigh Quotient Functional}

Define the Rayleigh quotient functional as
\[
%\label{eq:SL:RQoperator}
R[y]
	= \frac{-\int_{a}^{b} y(x) ([p(x) y'(x)]' + q(x) y(x)) \,
          dx}{\int_{a}^{b} r(x) (y(x))^{2} \, dx}	.
\]
Note if $\phi_{n}(x)$ is the eigenfunction corresponding to eigenvalue
$\lambda_{n}$ then $R[\phi_{n}] = \lambda_{n}$.

\vspace*{0.10in}

Later we will see that every Sturm-Liouville BVP has a smallest
eigenvalue $\lambda_{1}$.

\vspace*{0.10in}

The functional $R[\cdot]$ can be applied to functions $y(x)$ that are
not eigenfunctions.
Such a function $y(x)$ will be called a \textbf{trial function}.

\end{frame}
%%

\begin{frame}\frametitle{Result}

\begin{theorem}
%\label{thm:SL:RQmin}
Suppose $y(x)$ is piecewise smooth on $[a, b]$ such that $R[y]$ is
well-defined and $y(x)$ satisfies the boundary
conditions of the Sturm-Liouville BVP.
Then $R[y] \ge \lambda_{1}$ where $\lambda_{1}$ is the smallest
eigenvalue the Sturm-Liouville BVP.
Equality is achieved only when $y(x) = \phi_{1}(x)$, the eigenfunction
corresponding to $\lambda_{1}$.
\end{theorem}

\end{frame}
%%

\begin{frame}\frametitle{Example}

Consider the following boundary value problem:
\begin{align*}
y'' + \lambda y
	&= 0
\mbox{ for $0 < x < 1$}	\\
y'(0)
	&= y'(1)
	= 0	.
\end{align*}
Use trial functions to estimate the smallest eigenvalue of this
problem.

\end{frame}
%%

\begin{frame}<handout:0>\frametitle{Solution (1 of )}

Note that $[a, b] = [0,1]$, $p(x) = 1$, $r(x) = 1$, $q(x) = 0$, and for
any function satisfying these boundary conditions the Rayleigh
quotient simplifies to
\[
R[y]
	= \frac{\int_{0}^{1} (y'(x))^{2} \, dx}{\int_{0}^{1} (y(x))^{2} \, dx}	.
\]
One trial function is $y_{1}(x) = (x-1)^{2} + \frac{2}{3} (x-1)^{3}$

\vspace*{0.10in}

Applying the Rayleigh quotient produces
\[
R[y_{1}]
	= \frac{\int_{0}^{1} \left( 2(x-1) + 2(x-1)^{2} \right)^{2}
  \, dx}{\int_{0}^{1} \left( (x-1)^{2} + \frac{2}{3} (x-1)^{3}
  \right)^{2} \, dx}
	= \frac{2/15}{13/315}
	= \frac{42}{13}
	\approx 3.23077	.
\]
Hence we know the smallest eigenvalue $\lambda_{1} \le \frac{42}{13}$.

\end{frame}
%%

\begin{frame}<handout:0>\frametitle{Solution (2 of )}

Another trial function is $y_{2}(x) = \cos \pi x$.
\[
R[y_{2}]
	= \frac{\int_{0}^{1} \left( -\pi \sin \pi x \right)^{2} \,
  dx}{\int_{0}^{1} \left( \cos \pi x \right)^{2} \, dx}
	= \frac{\pi^{2}/2}{1/2}
	= \pi^{2}
	\approx 9.86960
\]

\vspace*{0.10in}

\uncover<2->{%
\textbf{Remark}: $y_{2}(x)$ is an eigenfunction of the boundary value
problem corresponding to $\lambda = \pi^{2}$.
}

\end{frame}
%%

\begin{frame}<handout:0>\frametitle{Solution (3 of )}

A third trial function is $y_{3}(x) = 1$.
\[
R[y_{3}]
	= R[1]
	= 0
\]

\vspace*{0.10in}

\uncover<2->{%
\textbf{Remark}: $y_{3}(x)$ is actually the
first eigenfunction for the boundary value problem and corresponds to
the smallest eigenvalue $\lambda_{1} = 0$.
}

\end{frame}
%%

\begin{frame}\frametitle{Additional Remarks}

\begin{itemize}
\item Minimizing the Rayleigh quotient over the appropriate vector space of
smooth functions $y(x)$ defined on $[a, b]$ yields $\lambda_{1}$ and
$\phi_{1}(x)$.
\item Repeating the process of minimizing $R[y]$ over the functions
orthogonal to $\phi_{1}(x)$ produces $\lambda_{2}$ and $\phi_{2}(x)$.
\item This process can be iterated to yield numerical estimates of
  additional eigenvalues and eigenfunctions for the Sturm-Liouville boundary value
problem.
\end{itemize}

\end{frame}
%%

%\begin{frame}\frametitle{Homework}

%\begin{itemize}
%\item Read Section $x.y$
%\item Exercises: 
%\end{itemize}

%\end{frame}
%%

%%%
\end{document}

%%%%
%%%% EOF
%%%%
