%%%%		-*- 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:      11/29/2022
%%%%
%%%% Purpose:   First-Order Linear PDEs
%%%%

\documentclass[handout,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{First-Order Linear PDEs}
\subtitle{MATH 467 \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 to classify first-order partial differential equations as either
  linear or quasilinear,
\item to solve linear first-order partial
  differential equations,
\end{itemize}

\end{frame}
%%

\begin{frame}\frametitle{Transport Equations}

The general form of a first-order scalar PDE is
\[
u_{x} + \nabla \cdot f(x, y, u, \nabla u) = g(x, y, u)
\]
where
\begin{itemize}
\item $\nabla \cdot f$ denotes the divergence of $f$, and
\item $\nabla u$ denotes the gradient of $u$.
\end{itemize}

\end{frame}
%%

\begin{frame}\frametitle{Classification}

A first-order PDE is \textbf{linear} if it can be written as
\[
a(x, y) u_{x}(x, y) + b(x, y) u_{y}(x, y) = c(x, y) u(x, y) + d(x, y)	.
\]

\vspace*{0.10in}

A first-order PDE is \textbf{semilinear} if it can be written as
\[
a(x, y) u_{x}(x, y) + b(x, y) u_{y}(x, y) = c(x, y, u)	.
\]

\vspace*{0.10in}

A first-order PDE is \textbf{quasilinear} if it can be written as
\[
a(x, y, u) u_{x}(x, y) + b(x, y, u) u_{y}(x, y) = c(x, y, u)	.
\]

\end{frame}
%%

\begin{frame}\frametitle{Simple Case}

Let $c$ be a constant and consider
\begin{align*}
u_{x} + c \, u_{y} &= 0	\\
\uncover<2->{%
\langle u_{x}, u_{y} \rangle \cdot \langle 1, c \rangle &= 0	\\
D_{\langle 1, c \rangle} u(x,t) &= 0	.
}
\end{align*}
\uncover<2->{%
\textbf{Remarks}:
\begin{itemize}
\item This can be interpreted as stating the directional derivative of
$u(x, y)$ in the direction of vector $\langle 1, c \rangle$ is $0$.
\item<3-> Function $u(x, y)$ is constant along lines of the form
$y - c \, x = k$.
\item<4-> Function $u(x, y) \equiv f(k)$ where $f$ is an arbitrary
  differentiable function.
\end{itemize}
}

\end{frame}
%%

\begin{frame}\frametitle{Illustration}

The solutions of
\[
u_{x} + c \, u_{y} = 0
\]
must be constant along lines of the form $y - c \, x = k$.
\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{charlines}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Confirmation of Solution}

Let $u(x, y) = f(y - c \, x)$ then
\begin{align*}
u_{x} &= -c \, f'(y - c \, x)	\\
u_{y} &= f'(y - c \, x)
\end{align*}
\uncover<2->{%
and
\[
u_{x} + c \, u_{y} = -c \, f'(y - c \, x) + c \, f'(y - c \, x) = 0	.
\]
\uncover<3->{%
Functions of the form $u(x, y) = f(y - c \, x)$ are referred to as the
\textbf{general solutions} to this simple PDE.
}
}

\end{frame}
%%

\begin{frame}\frametitle{Initial Conditions}

If the value of $u(x, y)$ along the line where $x = 0$ is specified, then
an initial condition of the form $u(0, y) = \phi(y)$ further specifies
the solution.
\begin{align*}
u(x, y) &= f(y - c \, x)
\mbox{ (general solution)}	\\
u(0, y) &= f(y) = \phi(y)
\mbox{ (initial condition)}	\\
\uncover<2->{%
u(x, y) &= \phi(y - c \, x)
\mbox{ (solution to IVP)}
}
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{General First-Order Linear PDE}

The solution technique used previously can be extended to the
\textbf{general first-order linear PDE} of the form
\[
a(x, y) u_{x} + b(x, y) u_{y} = c(x, y) u + d(x, y)	,
\]
for $(x, y) \in D \subset \mathbb{R}^{2}$.

\end{frame}
%%

\begin{frame}\frametitle{Vector Field (1 of 3)}

Suppose $(x, y) \equiv (x(t), y(t))$ where $t$ is a parameter, then
\[
\frac{d}{dt} \left[ u(x, y) \right] = u_{x} x'(t) + u_{y} y'(t)	.
\]

Consider
\begin{align*}
a(x, y) u_{x} + b(x, y) u_{y} &= c(x, y) u + d(x, y)
\mbox{ as}	\\
\frac{dx}{dt} \, u_{x} + \frac{dy}{dt} \, u_{y} &= c(x, y) u + d(x, y)
\mbox{ where}	\\
\frac{dx}{dt} &= a(x, y)	\\
\frac{dy}{dt} &= b(x, y)	.
\end{align*}
\uncover<2->{%
\textbf{Remark}: the parametric curve $(x(t), y(t))$ is an
\textbf{integral curve} of the
\textbf{vector field} $\langle a(x, y), b(x, y) \rangle$ for all $(x, y) \in D$.
}

\end{frame}
%%

\begin{frame}\frametitle{Vector Field (2 of 3)}

A vector field and integral curves:
\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{planecurves}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Vector Field (3 of 3)}

If $\displaystyle \frac{dx}{dt} = a(x, y)$ and $\displaystyle
\frac{dy}{dt} = b(x, y)$ then
\[
\frac{dy}{dx} = \frac{dy/dt}{dx/dt} = \frac{b(x, y)}{a(x, y)}	.
\]
Suppose the implicit form of the solution of this ODE is $\phi(x, y) =
k$ where $k$ is an arbitrary constant.

\vspace*{0.10in}

Along the curves defined by $\phi(x, y) = k$ the general first-order
linear PDE
\[
a(x, y) u_{x} + b(x, y) u_{y} = c(x, y) u + d(x, y)
\]
becomes
\begin{align*}
u_{x} + u_{y} \, \frac{b(x, y)}{a(x, y)}
	&=
\frac{c(x, y) u + d(x, y)}{a(x, y)}	\\
u_{x} + u_{y} \, \frac{dy}{dx}
	&=
\frac{c(x, y) u + d(x, y)}{a(x, y)}
  \\
\frac{du}{dx} &= \frac{c(x, y) u + d(x, y)}{a(x, y)}	.
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Ordinary Differential Equation}

\[
\frac{du}{dx} = \frac{c(x, y) u + d(x, y)}{a(x, y)}
\]
is an ordinary differential equation for $u$ as a function of variable
$x$ (since $y \equiv y(x)$) and arbitrary constant $k$.

\vspace*{0.10in}

Solving this ODE yields $u \equiv u(x, k) \equiv u(x, y)$ since $k = \phi(x, y)$.

\end{frame}
%%

\begin{frame}\frametitle{Characteristics}

\begin{itemize}
\item The ordinary differential equations:
\begin{align*}
\frac{dy}{dx} &= \frac{b(x, y)}{a(x, y)}	\\
\frac{du}{dt} &= c(x, y) u + d(x, y)
\end{align*}
are called the \textbf{characteristic equations}.
\item<2-> The solution curves $(x(t), y(t), u(x(t), y(t)))$ to the
  characteristic equations are called the \textbf{characteristic
    curves}.
\item<3-> The curves in the $xy$-plane of the form $(x(t), y(t))$ are
  called \textbf{characteristics}.
\end{itemize}

\end{frame}
%%

\begin{frame}\frametitle{Characteristic Curves \textit{vs}.
    Characteristics}

\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{charcurves}}
\end{center}
Characteristics are curves in the $xy$-plane and characteristic curves
are curves on the surface $u(x, y)$.

\end{frame}
%%

\begin{frame}\frametitle{Example}

Consider the initial value problem:
\begin{align*}
2 u_{x} + 3 u_{y} - 4 u &= 0	\\
u(x, 0) &= \sin x	.
\end{align*}
\begin{enumerate}
\item Find the general solution to the PDE using the method of characteristics.
\item Find the solution to the IVP.
\end{enumerate}

\end{frame}
%%

\begin{frame}\frametitle{Solution (1 of 2)}

\[
2 u_{x} + 3 u_{y} - 4 u = 0
\]
In this PDE we can let $a(x, y) = 2$ and $b(x, y) = 3$, thus
\[
\frac{dy}{dx} = \frac{3}{2}
\implies
y = \frac{3}{2} x + \hat{k}
\iff
2 y - 3 x = k	.
\]
\textbf{Comment}: 
the characteristics for this PDE are straight lines of the form
$2 y - 3 x = k$.

\vspace*{0.10in}

\uncover<2->{%
Think of $u(x, y) = u(x, y(x))$ so that
\[
\frac{du}{dx} = u_{x} + u_{y} \frac{dy}{dx} =
u_{x} + \frac{3}{2} u_{y} = 2 u
\]
which implies
\[
u(x, y) = f(k) e^{2 x} = f(2 y - 3 x) e^{2 x}
\]
where $f$ is an arbitrary differentiable function.
}

\end{frame}
%%

\begin{frame}\frametitle{Solution (2 of 2)}

In order to satisfy the initial condition:
\begin{align*}
u(x, 0) &= \sin x	\\
f(-3x) e^{2 x} &= \sin x	\\
f(-3x) &= e^{-2 x} \sin x	\\
f(z) &= -e^{2 z/3} \sin (z/3)	.
\end{align*}
Thus the solution to the IVP is
\[
u(x, y) = -e^{2 (2y-3x)/3} \sin((2y-3x)/3) e^{2 x} =
-e^{4 y/3} \sin \left( \frac{2}{3} y - x \right)	.
\]

\end{frame}
%%

\begin{frame}\frametitle{Illustration}

\[
u(x, y) = -e^{4 y/3} \sin \left( \frac{2}{3} y - x \right)
\]
\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{example01}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Example}

Find the general solution to the first-order linear PDE:
\[
-y \, u_{x} + x \, u_{y} = 0	.
\]

\end{frame}
%%

\begin{frame}\frametitle{Solution (1 of 2)}

If we let $a(x, y) = -y$ and $b(x, y) = x$ then the characteristics
satisfy the ODE
\begin{align*}
\frac{dy}{dx} &= -\frac{x}{y}	\\
y \, dy &= - x \, dx	\\
\int y \, dy &= - \int x \, dx	\\
\frac{1}{2} y^{2} &= -\frac{1}{2} x^{2} + \hat{k}	\\
x^{2} + y^{2} &= k	.
\end{align*}
In this example the characteristics are circles of radius $\sqrt{k}$
for $k \ge 0$.

\end{frame}
%%

\begin{frame}\frametitle{Solution (2 of 2)}

Assuming $u(x, y) = u(x, y(x))$ then
\begin{align*}
\frac{du}{dx} &= u_{x} + u_{y} \frac{dy}{dx}	\\
	&= u_{x} - \frac{x}{y} u_{y}	\\
\frac{du}{dx} &= 0	\\
u	&= f(k)	\\
u(x, y) &= f(x^{2} + y^{2})
\end{align*}
where $f$ is an arbitrary differentiable function.

\end{frame}
%%

\begin{frame}\frametitle{Example}

Solve the initial value problem:
\begin{align*}
2 x \, y \, u_{x} + u_{y} - u &= 0	\\
u(x,0) &= x	,
\end{align*}
for $x > 0$ and $y > 0$.

\end{frame}
%%

\begin{frame}\frametitle{Solution (1 of 2)}

Let $a(x, y) = 2 x \, y$ and $b(x, y) = 1$ then
\begin{align*}
\frac{dy}{dx} &= \frac{1}{2 x \, y} 
\mbox{ (separable ODE)}	\\
y \, dy &= \frac{1}{2 x} \, dx	\\
\int y \, dy &= \int \frac{1}{2 x} \, dx	\\
\frac{1}{2} y^{2} &= \frac{1}{2} \ln x + \hat{k}	\\
y^{2} - \ln x &= k	.
\end{align*}
Thus curves of the form $y = \sqrt{k + \ln x}$ are the characteristics of the solution.

\end{frame}
%%

\begin{frame}\frametitle{Solution (2 of 2)}
\fontsize{10pt}{12}\selectfont

To find the general solution to the PDE:
\begin{align*}
2 x y \, u_{x} + u_{y} - u &= 0	\\
u_{x} + \frac{1}{2 x y} u_{y} &= \frac{u}{2 x y}	\\
\frac{du}{dx} &= \frac{u}{2 x \sqrt{k + \ln x}}
\mbox{ (separable ODE)}	\\
\frac{1}{u} \, du &= \frac{1}{2 x \sqrt{k + \ln x}} \, dx	\\
\int \frac{1}{u} \, du &= \int \frac{1}{2 x \sqrt{k + \ln x}} \, dx
\mbox{ (substitute $v = k + \ln x$)}  \\
\ln u &= \sqrt{k + \ln x} + \ln f(k)	\\
u(x, y)	&= f(k) e^{\sqrt{k + \ln x}} = f(y^{2} - \ln x) e^{y}
\end{align*}
where $f$ is an arbitrary differentiable function.

\vspace*{0.05in}

\uncover<2->{%
Since $u(x,0) = x$ then
\[
x = f(-\ln x)
\iff f(x) = e^{-x}
\implies
u(x, y) = e^{-y^{2} + \ln x} e^{y} = x \, e^{y - y^{2}}	.
\]
}

\end{frame}
%%

\begin{frame}\frametitle{Illustration}

\[
u(x, y) = x \, e^{y - y^{2}}
\]
\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{example02}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Example}

Show that the problem
\begin{align*}
-y \, u_{x} + x u_{y} &= 0	\\
u(x,0) &= 3 x
\end{align*}
has no solution.

\end{frame}
%%

\begin{frame}\frametitle{Justification}

From a previous example we know the characteristics are the curves of
the form $x^{2} + y^{2} = k$ and the general solution has the form
\[
u(x, y) = f(x^{2} + y^{2})
\]
where $f$ is an arbitrary differentiable function.

\vspace*{0.10in}

\uncover<2->{%
If $x \ne 0$ then
\begin{align*}
u(-x,0) = -3x &\ne 3x = u(x,0)	\\
\mbox{but} &\mathstrut	\\
u(-x,0) = f((-x)^{2}) &= f(x^{2}) = u(x,0)
\end{align*}
which is a contradiction.
}

\end{frame}
%%

\begin{frame}\frametitle{Characteristics}

The side condition is specified on the $x$-axis which intersects each
characteristic curve twice (at $x = -\sqrt{k}$ and $x = \sqrt{k}$).
The side condition specifies two different values of the solution, but
the solution must be constant on each characteristic curve.

\end{frame}
%%

\begin{frame}\frametitle{Example}

Consider the first-order, linear PDE
\[
u_{x} + (\cos x) u_{y} + u = x \, y	.
\]
Find the general solution to this PDE.

\end{frame}
%%

\begin{frame}\frametitle{Solution (1 of 4)}

Let $a(x, y) = 1$ and $b(x, y) = \cos x$, then the characteristics
satisfy the ODE
\begin{align*}
\frac{dy}{dx} &= \cos x	\\
dy &= \cos x \, dx	\\
\int 1 \, dy &= \int \cos x \, dx	\\
y &= \sin x + k	.
\end{align*}
In this example the characteristics are curves of the form
$y - \sin x = k$.

\end{frame}
%%

\begin{frame}\frametitle{Solution (2 of 4)}

Assuming $u(x, y) = u(x, y(x))$ then
\begin{align*}
u_{x} + (\cos x) u_{y} + u &= x \, y	\\
\frac{du}{dx} &= x \, y - u = x (\sin x + k) - u	\\
\frac{du}{dx} + u &= x \sin x + k \, x	.
\end{align*}
This is a first-order, linear ODE which can be solved by multiplying
both sides by the integrating factor $e^{x}$ and integrating.

\end{frame}
%%

\begin{frame}\frametitle{Solution (3 of 4)}

\begin{align*}
\frac{du}{dx} + u &= x \sin x + k \, x	\\
\frac{d}{dx} \left[ u \, e^{x} \right]
	&=
x \, e^{x} \sin x + k \, x \, e^{x}	\\
\int d\left[ u \, e^{x} \right]
	&=
\int ( x \, e^{x} \sin x + k \, x \, e^{x} ) \, dx	\\
u \, e^{x}
	&=
\frac{1}{2} e^{x} \left( 2 k (x-1) - (x-1) \cos x + x \sin x \right) + f(k)	\\
u
	&=
\frac{1}{2} \left( 2 k (x-1) - (x-1) \cos x + x \sin x \right) +
              e^{-x} f(k)
\end{align*}
where $f$ is an arbitrary differentiable function.

\end{frame}
%%

\begin{frame}\frametitle{Solution (4 of 4)}

\begin{align*}
u
	&=
\frac{1}{2} \left( 2 k (x-1) - (x-1) \cos x + x \sin x \right) +
              e^{-x} f(k)	\\
u(x, y)
	&=
(x-1) (y - \sin x) - \frac{x-1}{2} \cos x + \frac{x}{2} \sin x + e^{-x} f(y - \sin x)
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Example}

Consider the first-order, linear PDE and side condition
\begin{align*}
y \, u_{x} - 4 x \, u_{y} &= 2 x \, y	\\
u(x,0) &= x^{4}
\end{align*}
Find a particular solution to this PDE which satisfies the side condition.

\end{frame}
%%

\begin{frame}\frametitle{Solution (1 of 3)}

Let $a(x, y) = y$ and $b(x, y) = -4 x$, then the characteristics
satisfy the ODE
\begin{align*}
\frac{dy}{dx} &= -\frac{4x}{y}
\mbox{ (separable ODE)}	\\
y \, dy &= -4 x \, dx	\\
\int y \, dy &= -\int 4 x \, dx	\\
\frac{1}{2} y^{2} &= -2 x^{2} + \hat{k}	.
\end{align*}
In this example the characteristics are curves of the form $y^{2} + 4
x^{2} = k$.

\end{frame}
%%

\begin{frame}\frametitle{Solution (2 of 3)}

Assuming $u(x, y) = u(x, y(x))$ then
\begin{align*}
y \, u_{x} - 4 x \, u_{y} &= 2 x \, y	\\
u_{x} - \frac{4 x}{y} \, u_{y} &= 2 x	\\
\frac{du}{dx} &= 2 x
\mbox{ (separable ODE)}	\\
du &= 2 x \, dx	\\
\int 1 \, du &= \int 2 x \, dx	\\
u &= x^{2} + f(k)	\\
u(x, y) &= x^{2} + f(4 x^{2} + y^{2})
\end{align*}
where $f$ is an arbitrary differentiable function.

\end{frame}
%%

\begin{frame}\frametitle{Solution (3 of 3)}

To satisfy the side condition we need
\begin{align*}
u(x,0) &= x^{2} + f(4 x^{2})	\\
x^{4} &= x^{2} + f(4 x^{2})	\\
f(4 x^{2}) &= x^{4} - x^{2}	\\
f(z) &= \frac{z^{2}}{16} - \frac{z}{4}	\\
u(x, y) &= x^{2} + \frac{(4 x^{2} + y^{2})^{2}}{16} - \frac{4 x^{2} + y^{2}}{4}
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Illustration}

\[
u(x, y) = x^{2} + \frac{(4 x^{2} + y^{2})^{2}}{16} - \frac{4 x^{2} + y^{2}}{4}
\]
\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{example05}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Example}

Consider the first-order, linear PDE and side condition
\begin{align*}
y \, u_{x} - 4 x \, u_{y} &= 2 x \, y	\\
u(x,0) &= x^{3}
\end{align*}
Show there is no solution to this PDE which satisfies the side condition.

\end{frame}
%%

\begin{frame}\frametitle{Justification}

From the work done previously we know the general solution to the PDE
takes the form
\[
u(x, y) = x^{2} + f(4 x^{2} + y^{2})
\]
where $f$ is an arbitrary differentiable function.

\vspace*{0.10in}

\uncover<2->{%
Suppose $u(x, y)$ is such that $u(x,0) = x^{3}$, then for any $x$
\[
u(-x, 0) = (-x)^{2} + f(4 (-x)^{2} + 0^{2}) = x^{2} + f(4 x^{2} +
0^{2}) = u(x, 0)
\]
However, when $x \ne 0$,
\[
u(-x,0) = (-x)^{3} \ne x^{3} = u(x,0)
\]
which is a contradiction.
}

\end{frame}
%%

\begin{frame}\frametitle{Homework}

\begin{itemize}
\item Read Section $2.1$
\item Exercises: 1--5
\end{itemize}

\end{frame}
%%

%%%
\end{document}

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