\magnification=\magstep1
\centerline{Mathematics 173 -- Applied Mathematics 1}
\centerline{Exam 1 Solutions -- October 14, 1999}
\bigskip
I.
\item{A)}  The boundary of $D$ consists of two pieces.  The 
first, $\alpha_1(t)$, is
the arc of the unit circle $(\cos t, \sin t)$ for 
$t \in [\pi/4, 5\pi/4]$ traced counterclockwise. The second, 
$\alpha_2(t) = (t,t)$, the segment of the line $y = x$ for
$t \in [-\sqrt{2}/2,\sqrt{2}/2]$.  The line integral is:
$$\eqalign{\int_\alpha {\bf F}\cdot {\bf T}\ ds &=
\int_{\alpha_1} {\bf F}\cdot {\bf T}\ ds
+\int_{\alpha_2} {\bf F}\cdot {\bf T}\ ds\cr
&=\int_{\pi/4}^{5\pi/4} (\cos^2 t - \sin t, \cos t + \sin t)\cdot
(-\sin t, \cos t)\ dt \cr
&\quad + \int_{-\sqrt{2}/2}^{\sqrt{2}/2} (t^2 - t, 2t)\cdot (1,1)\ dt\cr
&= \int_{\pi/4}^{5\pi/4} -\cos^2 t\sin t + 1 + \sin t\cos t\ dt
+ \int_{-\sqrt{2}/2}^{\sqrt{2}/2} t^2 + t\ dt\cr
&= [(\cos^3 t)/3 + t - (\cos^2 t)/2]_{\pi/4}^{5\pi/4} + 
[t^3/3 + t^2/2]_{-\sqrt{2}/2}^{\sqrt{2}/2}\cr
&={1\over 3}(-\sqrt{2}/2)^3 + 5\pi/4 - {1\over 2}(-\sqrt{2}/2)^2 + {1\over 3}(\sqrt{2}/2)^3+{1\over 2}(\sqrt{2}/2)^2\cr
&-{1\over 3}(\sqrt{2}/2)^3 - \pi/4 + {1\over 2}(\sqrt{2}/2)^2 - {1\over 3}(-\sqrt{2}/2)^3-{1\over 2}(-\sqrt{2}/2)^2\cr
&=\pi\cr}$$
\bigskip
\item{B)}  First, since ${\bf F} = (x^2 - y, x + y)= (P,Q)$,
we have
$${\partial Q\over \partial x} - {\partial P\over \partial y}=
1 - (-1) = 2$$
For the double integral over $D$, if rectangular 
coordinates are used, then the region must be split into 
two portions, since the equations of the upper and lower 
boundaries of the region are different for $x \in [-1, -\sqrt{2}/2]$
and for $x \in [-\sqrt{2}/2,\sqrt{2}/2]$.  In the first
range, the circle forms the upper and lower boundary; in the 
second, the line is the lower boundary.  The double integral 
is the following sum of iterated integrals:
$$\int_{-1}^{-\sqrt{2}/2}\int_{-\sqrt{1-x^2}}^{\sqrt{1-x^2}} 2\ dy\ dx
+\int_{-\sqrt{2}/2}^{\sqrt{2}/2}\int_{x}^{\sqrt{1-x^2}} 2\ dy\ dx$$
It is simpler to use polar coordinates, since the region of integration
is 
$D = \{(r,\theta) : 0 \le r\le 1, \pi/4 \le \theta\le 5\pi/4\}$.
We have
$$\int\!\!\!\int_D 2\ dA = \int_{\pi/4}^{5\pi/4}\int_0^1 2 r\ dr\ d\theta 
=\pi.$$
(This can also be seen since $\int\!\!\!\int_D 2\ dA$
equals twice the area of $D$, which is $2\cdot \pi/2 =\pi$.)
\bigskip
\noindent
III.  
\item{A)} To verify that $u(x,t) = e^{-kt}\sin x + \cos(x/\sqrt{k})$
is a solution of this boundary value problem, we may simply compute
as follows:
$$\eqalign{u_t &= -ke^{-kt}\sin x\cr
u_{xx} &= -e^{-kt}\sin x - {1\over k}\cos(x/\sqrt{k})\cr}.$$
Hence, 
$$\eqalign{ku_{xx} + \cos(x/\sqrt{k}) &= 
k[-e^{-kt}\sin x - {1\over k}\cos(x/\sqrt{k})] + \cos(x/\sqrt{k})\cr
&=-k e^{-kt}\sin x - \cos(x/\sqrt{k}) + \cos(x/\sqrt{k})\cr 
&= -ke^{-kt} = u_t\cr}.$$
Then
$$\eqalign{
u(x,0) &= e^0 \sin(x) + \cos(x/\sqrt{k}) = \sin(x) + \cos(x/\sqrt{k})\cr
u(0,t) &= e^{-kt}\sin(0) + \cos(0) = 1\cr
u(\pi,t) &= e^{-kt}\sin(\pi) + \cos(\pi/\sqrt{k}) =  \cos(\pi/\sqrt{k})\cr}$$
\bigskip
\item{B)} An equilibrium solution is one where $u_t \equiv 0$, so 
$u = u(x)$.  In this case, the PDE $u_t = ku_{xx} + \cos(x/\sqrt{k})$
becomes the ordinary differential equation:
$${d^2 u\over dx^2} = -{1\over k} \cos(x/\sqrt{k}).$$
This can be solved for $u$ by integrating twice with 
respect to $x$:
$$\eqalign{
{du\over dx} &= \int {d^2 u\over dx^2}\ dx\cr
&=\int  -{1\over k} \cos(x/\sqrt{k})\ dx\cr
&= -{\sqrt{k}\over k}\sin(x/\sqrt{k}) + c_1\cr}$$
Then,
$$\eqalign{
u &= \int -{\sqrt{k}\over k}\sin(x/\sqrt{k}) + c_1\ dx\cr
&= \cos(x/\sqrt{k}) + c_1x + c_2\cr}$$
where $c_1, c_2$ are constants.
Using the boundary conditions, at $x = 0$, 
$u(0) = 0 \Rightarrow 0 = \cos(0) + c_2$.  Hence
$c_2 = -1$.  Then at $x = \pi$, $u(\pi) = 0$ implies
$0 = \cos(\pi/\sqrt{k}) + c_1\pi - 1.$ Solving for $c_1$,
we get 
$$c_1 = {1 - \cos(\pi/\sqrt{k})\over \pi}.$$
\bigskip
\noindent
IV. 
\item{A)}  By the linearity of differentiation and 
the assumption that $(u_n)_t=k(u_n)_{xx}$ for all $n$,
if $u(x,t) = \sum_{n} c_n u_n(x,t)$, then 
$$\eqalign{
u_t &= {\partial \over \partial t}\left(\sum_{n} c_n u_n(x,t)\right)\cr
&= \sum_n c_n (u_n)_t\cr
&= \sum_n c_n k (u_n)_{xx}\cr
&= k {\partial^2\over \partial x^2}\left(\sum_n c_n u_n\right)\cr
&= ku_{xx}\cr}$$
Similarly, if each $u_n$ satisfies $u_n(0,t) = 0 = u_n(L,t)$,
then 
$u(0,t) = \sum_n c_n u_n(0,t) = \sum_n c_n\cdot 0 = 0$
and 
$u(L,t) = \sum_n c_n u_n(L,t) = \sum_n c_n\cdot 0 = 0$.
\bigskip
\item{B)} By ``separation of variables plus superposition''
recipe, if 
$$\eqalign{
u(x,0) &= \sin\left({3\pi x\over L}\right) - 5\sin\left({7\pi x\over L}\right)\cr
&= \sum_{n=1}^\infty d_n \sin\left({n\pi x\over L}\right)\cr}$$
then the solution of this boundary value problem is
$$u(x,t) = \sum_{n=1}^\infty d_n e^{-k\left({n\pi\over L}\right)^2 t}\sin\left({n\pi x\over L}\right)$$
The $d_n$ are found by the formula
$$\eqalign{
d_n &= {2\over L}\int_0^L \left(\sin\left({3\pi x\over L}\right) - 5\sin\left({7\pi x\over L}\right)\right)\sin\left({n\pi x\over L}\right)\ dx\cr
&= {2\over L}\int_0^L \sin\left({3\pi x\over L}\right) \sin\left({n\pi x\over L}\right)\ dx\cr
&-5 {2\over L}\int_0^L \sin\left({7\pi x\over L}\right)\sin\left({n\pi x\over L}\right)\ dx\cr
&=\cases{1& if $n = 3$\cr
         -5& if $n = 7$\cr
          0& otherwise\cr}\cr}$$
by the orthogonality relation.  This shows
$$u(x,t) = u_3(x,t) - 5 u_7(x,t) = 
e^{-k\left({3\pi\over L}\right)^2 t}\sin\left({3\pi x\over L}\right)
-5e^{-k\left({7\pi\over L}\right)^2 t}\sin\left({7\pi x\over L}\right)$$
\bye   
