\documentclass[12pt]{article}
\newcommand{\tf}{\begin{description}\item[a)]true\item[b)]false
\end{description}}
\newcommand{\bd}{\begin{description}}
\newcommand{\ed}{\end{description}}
\newcommand{\alta}{ a)~~~}
\newcommand{\altb}{ b)~~~}
\newcommand{\altc}{ c)~~~}
\newcommand{\altd}{ d)~~~}
\newcommand{\alte}{ e)~~~}
\newcommand{\altf}{ f)~~~}
\newcommand{\altg}{ g)~~~}
\newcommand{\alth}{ h)~~~}
\newcommand{\alti}{ i)~~~}
\newcommand{\altj}{ j)~~~}
\newcommand{\ds}{\displaystyle}
\newcommand{\starttest}{\begin{enumerate}}
\newcommand{\nextpage}{\vspace*{\fill}\newpage}
\newcommand{\bigfrac}[2]{\frac{\textstyle #1}{\textstyle #2}}
\newcommand{\mat}[2]{\left( \begin{array}{*{#1}{c}}#2\end{array}\right)}
\newcommand{\answer}{\hspace*{\fill}\fbox{\rule[-.85in]{0in}{1in}Answer:\hspace{2in}}}
%this is a command to create horizontal lines. It is used in the form
% \blunder{n}    This produces a horizontal line n inches long.
\newcommand{\blunder}[1]{\rule[-1mm]{#1 in}{.01in}}
\oddsidemargin 0in 
\evensidemargin 0in 
\topmargin 0in 
\footskip .5in 
\textwidth 6.5in
\textheight 9in
\usepackage{amsmath}   
\usepackage{amssymb}
\usepackage{framed}
\begin{document}
\begin{center}

{\Large MATH 421\\Homework 1 solution  \\}

\vspace{.2in}

\end{center}
\begin{enumerate}
\item(a) {\bf First Order} because of $u_t$. {\bf Non-Linear} because of the presence of $u_x^2$. {\bf Homogeneous} as there are no terms independent of $u$ and its derivative.

(b) {\bf Second Order} because of $u_{xx}$. {\bf Linear} as every term with $u$ and its derivative has coefficients independent of $u$. {\bf Homogeneous} as there are no terms independent of $u$ and its derivative.

(c) {\bf Fourth Order} because of $u_{xxxx}$. {\bf Non-Linear} because of the presence of $uu_{xxxx}$. {\bf Non-Homogeneous} because of the presence of $e^{-t}$.

\item(a) {\bf Parabolic}. This is because $B^2-4AC= (-2)^2 - 4 \cdot 1 \cdot 1 = 0$.

(b) {\bf Elliptic}. This is because $B^2-4AC= (1)^2 - 4 \cdot 3 \cdot 1 = -11<0$.

(c) {\bf Hyperbolic}. This is because $B^2-4AC= (-5)^2 - 4 \cdot 1 \cdot (-1) = 29>0$.

\item Integrating with respect to $y$, we have,
\begin{equation*}
u_x = \frac{xy^2}{2} + f(x)
\end{equation*}
Integrating with respect to $x$, we have,
\begin{equation*}
u(x, y) = \frac{x^2y^2}{4} + \int f(x) \, dx + g(y)
\end{equation*}
Consider $\displaystyle \int f(x) \, dx = h(x)$. Therefore, the solution is,
\begin{framed}
$$u(x, y) = \frac{x^2y^2}{4} + h(x) + g(y)$$
\end{framed}

\item $u_t = cA'(x+ct) -cB'(x-ct)$ and $u_{tt} = c^2A''(x+ct) +c^2B''(x-ct)$.

Similarly, $u_x = A'(x+ct) +B'(x-ct)$ and $u_{xx} = A''(x+ct) +B''(x-ct)$.

Therefore, 
\begin{eqnarray*}
u_{tt} + c^2u_{xx} &=& c^2(A''(x+ct) +B''(x-ct)) + c^2(A''(x+ct) +B''(x-ct))\\
&=& 2c^2(A''(x+ct) +B''(x-ct))\\
&\neq & 0 \text{ unless } c = 0.
\end{eqnarray*}

Hence, $u(x, y) = A(x+ct) +B(x-ct)$ is not a solution unless $c = 0$.

\item $u_x = ke^{kx}\sin(ky)$ and $u_{xx} = k^2e^{kx}\sin(ky)$.

Similarly, $u_y = ke^{kx}\cos(ky)$ and $u_{yy} = -k^2e^{kx}\sin(ky)$.
Since $u_{xx} + u_{yy} = k^2e^{kx}\sin(ky) -k^2e^{kx}\sin(ky) = 0$, therefore $u(x, y) = e^{kx}\sin(ky)$ is solution to $u_{xx} + u_{yy} = 0$.

\item(a) $u_{x} = -e^t\sin x$ and $u_{xx} = -e^t \cos x = -u$. Therefore, a PDE that satisfies this solution would be $u_{xx} + u = 0$.

(b) $u_x = 2x$ and $u_{xx} = 2$. Similarly, $u_y = 2y$ and $u_{yy} = 2 = u_{xx}$. Therefore, a PDE that satisfies this solution would be $u_{xx} - u_{yy} = 0$.

(c) $u_{x} = \dfrac{2x}{x^2+y^2}$ and $u_y = \dfrac{2y}{x^2+y^2}$. Hence, $yu_x = xu_y$. Therefore, a PDE that satisfies this solution would be $yu_x - xu_y = 0$.

\item(a) Integrating with respect to $x$ we have,
$$u(x, y) = x\sin y + f(y)$$
Using the boundary condition,
$u(0, y) = f(y) = 0$. Therefore the solution to the equation is 
\begin{framed}
$$u(x, y) = x\sin y$$
\end{framed}

(b) Integrating with respect to $x$ we have,
$$u_y(x, y) = 2x^2y+e^x +g(y)$$
Using the first boundary condition we have,
$u_y(0, y) = 1+g(y) = y$. Therefore, $g(y) = y-1$. So $u_y(x, y) = 2x^2y+e^x + y-1$. Integrating this function with respect to $y$ we have,
$$u(x, y) = x^2y^2+e^x y+ \frac{y^2}{2} -y + f(x)$$
Using the second boundary condition we have,
$u(x, 0) = f(x) = 2$. Hence, our solution is 
\begin{framed}
$$u(x, y) = x^2y^2+e^x y+ \frac{y^2}{2} -y + 2$$
\end{framed}

\item We use the 1D heat equation, $u_t = k u_{xx}$ with $Q=0$. Since we have equilibrium temperature distribution, therefore $u_t = 0$. Hence $u_xx = 0$, i.e. $u'' = 0$, since $u$ is a function of only $x$. Integrating once with respect to $x$ we have, 
$$u'(x) = C_1, \text{ where } C_1 \text{ is a constant.}$$
Integrating again with respect to $x$ we have,
$$u(x) = C_1 x + C_2 \text{ where } C_2 \text{ is a constant.}$$
Using the boundary condition, $u(0) = C_2 = 0$. Therefore, $u(x) = C_1x$. Using the other boundary condition we have, $u(L) = C_1 L = T$. Therefore, $C_1 = T/L$. Putting this together we have our solution,
\begin{framed}
$$u(x) = \frac{Tx}{L} $$
\end{framed}

\item We use the 1D heat equation, $u_t = k u_{xx}$ with $Q=0$. Since we have equilibrium temperature distribution, therefore $u_t = 0$. Hence $u_xx = 0$, i.e. $u'' = 0$, since $u$ is a function of only $x$. Integrating once with respect to $x$ we have, 
$$u'(x) = C_1, \text{ where } C_1 \text{ is a constant.}$$
Using the first boundary condition we have, $u'(0) = 0 = C_1$. Therefore, $u'(x) = 0$.
Integrating again with respect to $x$ we have,
$$u(x) = C_2 \text{ where } C_2 \text{ is a constant.}$$
Using the other boundary condition we have, $u(L) = C_2 = T$. Therefore, our solution is,
\begin{framed}
$$u(x) = T $$
\end{framed}

\item We use the 1D heat equation, $u_t = k u_{xx}$ with $Q=0$. Since we have equilibrium temperature distribution, therefore $u_t = 0$. Hence $u_xx = 0$, i.e. $u'' = 0$, since $u$ is a function of only $x$. Integrating once with respect to $x$ we have, 
$$u'(x) = C_1, \text{ where } C_1 \text{ is a constant.}$$
Integrating again with respect to $x$ we have,
$$u(x) = C_1 x + C_2 \text{ where } C_2 \text{ is a constant.}$$
Using the boundary condition, $u(0) = C_2 = T$. Therefore, $u(x) = C_1 x + T$. Differentiating both sides with respect to $x$ we have, $u'(x) = C_1$. Using the second boundary condition we have,
$u'(L)+u(L) = C_1 + C_1 L + T = 0$. Therefore, $C_1 = -T/(1+L)$. Putting this together we have our solution,
\begin{framed}
$$u(x) = \frac{-Tx}{1+L}+ T$$
\end{framed}

\end{enumerate}


\end{document}
