%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% MATH 54, Lenstra, Spring 96 %% Solutions to Problem set 13 %% by William Stein \documentclass{article} \usepackage{amsmath} \textwidth=1.4\textwidth \textheight=1.3\textheight \hoffset=-1.2 in \voffset=-1.28in \author{William Stein} \title{Solutions to Problem Set 13} \newcommand{\problem}[1]{\vspace{.3in}\par\noindent{\Large \bfseries #1. }} \newcommand{\soln}{\par {\em Solution.} } \newcommand{\dx}{\hspace{.5em}dx} \begin{document} \maketitle This document contains the solutions to the 13th homework set along with a list of theoretically inclined problems that resemble what could be on the final. The final examination is on Friday, May 17, 5--8 p.m. (room to be announced). The final examination covers differential equations. \section{Theoretically Inclined Problems} The TAs received the following letter from Prof. Lenstra. \begin{quote} Dear TAs, As Diane suggested, I drew up a list of problems from Boyce and DiPrima that students who wish to prepare themselves for questions with a theoretical flavor may try their hands at. I am not saying that a problem of exactly one of these types will appear on the final; only that the theoretical thinking required for the problems below will be good preparation. Best, Hendrik \end{quote} All problems are from Boyce-DiPrima and harder problems are starred. \begin{center} \begin{tabular}{|l|l|}\hline 3.1&15,16,33--38\\\hline 3.3&9,10,11,19,22*\\\hline 3.4&23,26\\\hline 3.5&16*, 33*\\\hline 4.1&7--12, 13--19\\\hline 4.2&1--10, 27\\\hline 7.1&1--4,15\\\hline 7.4&3*\\\hline 7.7&13*\\\hline 10.1&3,14,16*\\\hline 10.2&11,12,29\\\hline \end{tabular} \end{center} \section{Homework Solutions. Chapter 10; 1 -- 4,5; 2 -- 1,10,21,22; 3 -- 3,7; 4 -- 17,29} \problem{10.1.4} {\em Find the solution to the heat conduction problem $$100u_{xx}=u_t, \quad 0<x<1, \quad t>0$$ $$u(0,t)=0, \quad u(1,t)=0, \quad t>0$$ $$u(x,0)=\sin 2\pi x - 2 \sin 5\pi x, \quad 0\leq x\leq 1.$$ } \soln From the equation $100u_{xx}=u_t$ we see that $\alpha^2=100$. From the fact that $u(x,t)$ is defined for $0<x<1$ we see that $\ell=1$. As stated on page 517 (equation 27) we know that the function $$u(x,t)=\sum_{n=1}^m c_n u_n(x,t) =\sum_{n=1}^m c_n e^{-100n^2\pi^2t}\sin n\pi x$$ satisfies the differential equation $100u_{xx}=u_t$ along with the boundary condition $u(0,t)=u(1,t)=0$. Notice that we have substituted $\alpha^2=100$ and $\ell=1$. The $c_n$ be chosen so as to satisfy the initial condition $$u(x,0)=\sin 2\pi x - 2\sin 5\pi x.$$ Substituting $t=0$ into the above expression for $u(x,t)$ we obtain the equation $$\sum_{n=1}^m c_n \sin n\pi x=\sin 2\pi x-2\sin 5\pi x.$$ Thus setting $c_2=1$, $c_5=-2$, and all other $c_n=0$ we obtain a function $u(x,t)$ satisfying the initial conditions. Thus the solution to the given heat conduction problem is $$u(x,t) = e^{-400\pi^2t}\sin 2\pi x - 2e^{-2500\pi^2t}\sin 5\pi x.$$ \problem{10.1.5} {\em Find the solution to the heat conduction problem $$u_{xx}=4u_t, \quad 0<x<2, \quad t>0$$ $$u(0,t)=0, \quad u(2,t)=0, \quad t>0$$ $$u(x,0)=2\sin(\pi x/2)-\sin(\pi x)+4\sin(2\pi x), \quad 0\leq x\leq 2.$$} \soln Everything proceeds in the same general way as above. This time $\alpha^2=4$, $\ell=2$, $c_1=2$, $c_2=-1$, $c_4=4$, and all other $c_n=0$. Thus the solution is $$u(x,t)=2 e^{-\pi^2 t}\sin (\pi x/2) - e^{-4\pi^2 t}\sin(\pi x) + 4 e^{-16\pi^2 t}\sin(2\pi x).$$ \problem{10.1.7} {\em In each of the following problems determine whether the method of separation of variables can be used to replace the given partial differential equation by a pair of ordinary differential equations. If so, find the equations.} 7. $xu_{xx}+u_t=0$ \soln Let $u=X(x)T(t)$. Then the differential equation becomes $$xX''T+XT'=0.$$ A little algebra transforms this into $$\frac{xX''}{X}=-\frac{T'}{T}.$$ Since the left side does not depend on $t$ and the right side does not depend on $x$ it follows that both sides most equal some constant, call it $a$. Multiplying through we obtain the pair of ordinary differential equations $$xX''-aX=0, \quad T'+aT=0.$$ 11. $u_{xx}+(x+y)u_{yy}=0$ \soln Let $u=X(x)Y(y)$. Then the differential equation becomes $$X''Y+(x+y)XY''=0.$$ It is impossible to apply separation of variables to the equation. \problem{10.2.1} {\em Determine whether the function $\sin \pi x/\ell$ is periodic. If so, find its fundamental period.} \soln The function is periodic with period $2\ell$ since $\sin \pi x$ is periodic with period $2$. The factor of $1/\ell$ rescales the graph of $\sin\pi x$ horizontally by a factor of $\ell$. Thus the period increases by a factor of $\ell$. \problem{10.2.10} {\em Determine whether the function $$f(x)=\begin{cases}(-1)^n,&2n-1\leq x<2n,\\ 1,&2n\leq x<2n+1;\end{cases}$$ is periodic. If so, find its fundamental period. } \soln Sketching the graph of $f(x)$ we see that $f$ is periodic with fundamental period $4$. \problem{10.2.21} {\em Find the Fourier series corresponding to the function $$f(x)=\begin{cases}x+1&-1\leq x<0,\\ 1-x&0\leq x<1;\end{cases} \quad f(x+2)=f(x).$$} \soln This is just a translation of example 1 on page 524 so we can easily derive the fourier series of $f(x)$ from that. We present the full derivation instead. The Fourier series of $f$ is the projection of $f$ onto the subspace spanned by the functions $1$, $\sin(n\pi x/2)$, and $\cos(n\pi x/2)$, $n=1,2,\ldots$. Note that these functions are not orthonormal although they are orthogonal (see page 522). Recall the projection formula $$\text{Proj} v=\sum_{n=1}^{\infty} \frac{\langle v,u_n\rangle} {\langle u_n,u_n\rangle} u_n$$ of $v$ onto the subspace spanned by an orthogonal basis $u_n$. Since the inner product in our situation is $$\langle g,h\rangle =\int_{-1}^{1}g(x)h(x)\dx$$ we see that the Fourier series of $f$ is $$\frac{a_0}{2}+\sum_{n=1}^{\infty} a_n\cos(n\pi x) +\sum_{n=1}^{\infty} b_n\sin(n\pi x).$$ Here the coefficients $a_n$ and $b_n$ for $n\geq 1$ are as follows. $$a_n=\frac{\langle f,\cos(n\pi x)\rangle} {\langle \cos(n\pi x), \cos(n\pi x)\rangle} = \int_{-1}^{1}f(x)\cos(n\pi x) \dx$$ and $$b_n=\frac{\langle f,\sin(n\pi x)\rangle} {\langle \sin(n\pi x), \sin(n\pi x)\rangle} =\int_{-1}^{1}f(x)\sin(n\pi x) \dx.$$ (Note that the factor of $1/\ell$ which one would find in the book is simply one in our situation.) Here we have used the computation $$\langle \cos(n\pi x), \cos(n\pi x)\rangle = 1$$ which can be found on page 522. The case $n=0$ is treated separately. We have $$\frac{a_0}{2} = \frac{\langle f, 1\rangle} {\langle 1, 1\rangle} =\frac{1}{2} \langle f, 1\rangle =\frac{1}{2} \int_{-1}^{1} f(x)\dx$$ so $$a_0=\int_{-1}^{1}f(x)\dx.$$ Now that we have the formulas and a firm grasp of what is going on we need to compute the coefficients $a_n$ and $b_n$. We compute \begin{eqnarray*} a_0&=&\int_{-1}^1 f(x)\dx \\ &=&\int_{-1}^0 x+1 \dx + \int_0^1 1-x \dx\\ &=&\Bigl[\frac{1}{2}x^2+x\Bigr]^0_{-1} + \Bigl[x-\frac{1}{2}x^2\Bigr]^1_0\\ &=& -\Bigl(\frac{1}{2}-1\Bigr)+\frac{1}{2}=1.\end{eqnarray*} Next computing $a_n$ we have \begin{eqnarray*} a_n&=&\int_{-1}^{1}f(x)\cos(n\pi x)\dx\\ &=&\int_{-1}^{0}(x+1)\cos(n\pi x)\dx + \int_{0}^{1}(1-x)\cos(n\pi x)\dx\\ &=&\int_{-1}^{0}x\cos(n\pi x)\dx + \int_{-1}^{0}\cos(n\pi x)\dx + \int_{0}^{1}\cos(n\pi x)\dx - \int_{0}^{1}x\cos(n\pi x) \dx\\ &=&\int_{-1}^{0}x\cos(n\pi x)\dx - \int_{0}^{1}x\cos(n\pi x) \dx. \end{eqnarray*} To compute this we apply integration by parts yielding \begin{eqnarray*} \int_{-1}^{0}x\cos(n\pi x)\dx &=& \Bigl[ \frac{x}{n\pi}\sin(n\pi x)\Bigr]^0_{-1} - \frac{1}{n\pi}\int_{-1}^{0}\sin(n\pi x)\dx\\ &=& 0 - \frac{1}{n\pi}\Bigl[\frac{-1}{n\pi}\cos(n\pi x)\Bigr]^0_{-1}\\ &=& \frac{1}{n^2\pi^2}-\frac{1}{n^2\pi^2}\cos(-n\pi) = \begin{cases} 0 & \text{if $n$ is even}\\ \frac{2}{n^2\pi^2}&\text{if $n$ is odd} \end{cases} \end{eqnarray*} Similiarly, \begin{eqnarray*} \int_{0}^{1}x\cos(n\pi x)\dx &=& \Bigl[ \frac{x}{n\pi}\sin(n\pi x)\Bigr]^1_{0} - \frac{1}{n\pi}\int_{0}^{1}\sin(n\pi x)\dx\\ &=& 0 - \frac{1}{n\pi}\Bigl[\frac{-1}{n\pi}\cos(n\pi x)\Bigr]^0_{1}\\ &=& \frac{1}{n^2\pi^2}\cos(n\pi)-\frac{1}{n^2\pi^2} = \begin{cases} 0 & \text{if $n$ is even}\\ -\frac{2}{n^2\pi^2}&\text{if $n$ is odd} \end{cases} \end{eqnarray*} It follows that $$a_n=\begin{cases} 0&\text{if $n$ is even}\\ \frac{4}{n^2\pi^2}&\text{if $n$ is odd} \end{cases}$$ One checks that $f(x)$ is an even function so $f(x)\sin(n\pi x)$ is an odd function and hence $$b_n=\int_{-1}^{1}f(x)\sin(n\pi x)\dx=0.$$ Putting this all together we conclude that the Fourier expansion of $f$ is $$f(x)=\frac{1}{2}+\frac{4}{\pi^2}\sum_{n=1}^{\infty} \frac{\cos(2n-1)\pi x}{(2n-1)^2}.$$ \problem{10.2.22} {\em Find the Fourier series corresponding to the function $$f(x)=\begin{cases}x+\ell,&-\ell\leq x\leq 0,\\ \ell,&0<x<\ell;\end{cases} \quad f(x+2\ell)=f(x)$$ } \soln As explained in the previous problem, we must compute the $a_n$ and $b_n$ then substitute them into the appropriate series. We compute \begin{eqnarray*} a_0&=&\frac{1}{\ell}\int_{-\ell}^{\ell}f(x)dx\\ &=&\frac{1}{\ell}\int_{-\ell}^{0}x+\ell\dx + \frac{1}{\ell}\int_0^{\ell}\ell\dx\\ &=&\frac{1}{\ell}\Bigr[\frac{1}{2}x^2+\ell x\Bigr]^0_{-\ell} + \ell = \frac{3}{2}\ell \end{eqnarray*} Next compute $a_n$ for $n\geq 1$ \begin{eqnarray*} \ell a_n&=&\int_{-\ell}^0 x\cos(n\pi x/\ell)\dx + \int_{-\ell}^0 \ell\cos(n\pi x/\ell)\dx + \int_{0}^{\ell} \ell\cos(n\pi x/\ell)\dx\\ &=& \int_{-\ell}^{0} x\cos(n\pi x/\ell)\dx + \ell \int_{-\ell}^{\ell}\cos(n\pi x/\ell)\dx \end{eqnarray*} Since the integral over a period of $\cos(x)$ is 0 we see easily that $$\int_{-\ell}^{\ell}\cos(n\pi x/\ell)\dx=0.$$ For the other term integration by parts gives \begin{eqnarray*} \int_{-\ell}^{0} x\cos(n\pi x/\ell)\dx &=& \Bigr[\frac{\ell x}{n\pi}\sin(n\pi x/\ell)\Bigr]^0_{-\ell} - \frac{\ell}{n\pi}\int_{-\ell}^{0}\sin(n\pi x/\ell)\dx\\ &=& 0 + \frac{\ell^2}{n^2\pi^2}\Bigr[\cos(n\pi x/\ell)\Bigr]^0_{-\ell}\\ &=& \frac{\ell^2}{n^2\pi^2}(1-\cos(-n\pi)) = \begin{cases} 0 & \text{if $n$ is even}\\ \frac{2\ell^2}{n^2\pi^2}&\text{if $n$ is odd} \end{cases} \end{eqnarray*} Dividing through by $\ell$ we see that $$a_n=\begin{cases}0&\text{if $n$ is even}\\ \frac{2\ell}{n^2\pi^2}&\text{if $n$ is odd} \end{cases}.$$ Next compute $b_n$ \begin{eqnarray*} \ell b_n &=& \int_{-\ell}^{0} x\sin(n\pi x/\ell)\dx + \int_{-\ell}^{0}\ell\sin(n\pi x/\ell)\dx + \int_0^{\ell}\ell\sin(n\pi x/\ell)\dx\\ &=& \Bigr[\frac{-\ell}{n\pi}x\cos(n\pi x/\ell)\Bigr]^0_{-\ell} + \frac{\ell}{n\pi}\int_{-\ell}^{0}\cos(n\pi x/\ell)\dx\\ &=& \frac{\ell^2}{n\pi}\cos(-n\pi)+0=\frac{(-1)^{n}\ell^2}{n\pi} \end{eqnarray*} Divide through by $\ell$ to see that $$b_n=\frac{(-1)^{n}\ell}{n\pi}.$$ Thus the Fourier expansion of $f$ is $$f(x)=\frac{3\ell}{4}+\sum_{n=1}^{\infty} \Bigr[\frac{2\ell\cos[(2n-1)\pi x/\ell]}{(2n-1)^2\pi^2} + \frac{(-1)^{n}\ell\sin(n\pi x/\ell)}{n\pi}\Bigr].$$ \problem{10.3.3} {\em Let $f(x)$ be the $2\pi$-periodic extension of the function defined as $\sin^2 x$ on the interval $-\pi\leq x\leq \pi$. Find the Fourier series for $f(x)$, then sketch the function to which the series converges for several periods. } \soln Fortunately we can apply some trigonometric identities to find the Fourier expansion of $f(x)$. Since $$\cos(2x)=\cos^2x-\sin^2x$$ it follows that $$\sin^2x=\cos^2x-\cos 2x=1-\sin^2x-\cos 2x.$$ The Fourier expansion of $\sin^2x$ is then $$\sin^2x = \frac{1}{2}-\frac{1}{2}\cos 2x.$$ \problem{10.3.7} {\em Let $f(x)$ be the $2\pi$-periodic extension of the function $$f(x)=\begin{cases} 0,&-\pi\leq x<-\pi/2\\ 1,&-\pi/2\leq x<\pi/2\\ 0,&\pi/2\leq x<\pi\end{cases}$$ Find the Fourier series for $f(x)$, then sketch the function to which the series converges for several periods. } \soln Notice that $\ell=\pi$. We first compute $a_0$. $$a_0=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\dx = \frac{1}{\pi}\int_{-\pi/2}^{\pi/2}\dx = 1.$$ Next we compute $a_n$. \begin{eqnarray*} a_n&=&\frac{1}{\pi}\int_{-\pi}^{\pi} f(x)\cos(n x)\dx\\ &=&\frac{1}{\pi}\Bigl[\frac{1}{n}\sin nx\Bigr]^{\pi/2}_{-\pi/2}\\ &=&\frac{1}{\pi n}(\sin (n\pi/2)+\sin(n\pi/2)) =\begin{cases} 0 & \text{if $n$ is even}\\ \frac{(-1)^{(n-1)/2}2}{\pi} & \text{if $n$ is odd} \end{cases} \end{eqnarray*} Since $f(x)$ is an even function we know at once that $b_n=0$ for all $n$. Thus the Fourier expansion of $f(x)$ is $$\frac{1}{2} + \frac{2}{\pi}\sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{2n-1}\cos(2n-1)x.$$ \problem{10.4.17} {\em Use the properties of even and odd functions to evaluate the integral $$\int_{-\pi}^{\pi}x^4\sin(nx)\dx.$$ \soln Since $x^4$ is even and $\sin(nx)$ is odd the product $x^4\sin(nx)$ is an odd function. Thus the integral is 0. } \problem{10.4.29} {\em Find the cosine Fourier series of period $4\pi$ for the function $$f(x)=\begin{cases}x,&0<x<\pi,\\0,&\pi<x<2\pi\end{cases}.$$ Then sketch the graph of the function to which the series converges over three periods. } \soln Using some of the tricks which apply to even and odd functions the formulas for $a_n$ and $b_n$ are \begin{eqnarray*} a_n&=&\frac{1}{\pi}\int_0^{2\pi}f(x)\cos\frac{nx}{2}\dx\\ b_n&=&0 \end{eqnarray*} Obviously $a_0=\pi/2$. Computing $a_n$ in our situation is accomplished via integration by parts \begin{eqnarray*} a_n&=&\frac{1}{\pi}\Bigl(\frac{2}{n}\Bigl[x\sin\frac{nx}{2}\Bigr]^{\pi}_0 - \frac{2}{n}\int_{0}^{\pi}\sin\frac{nx}{2}\dx\Bigr)\\ &=& \frac{2}{n}\sin\frac{n\pi}{2} + \frac{4}{n^2\pi}(\cos\frac{n\pi}{2}-1) \end{eqnarray*} Thus the Fourier expansion of $f(x)$ is $$f(x)=\frac{\pi}{4}+\frac{1}{\pi}\sum_{n=1}^{\infty}\Bigr[\frac{2\pi}{n} \sin\frac{n\pi}{2}+\frac{4}{n^2}\Bigl(\cos\frac{n\pi}{2}-1\Bigr)\Bigr]\cos\frac{nx}{2}.$$ \section{Math 74} \begin{center} Thinking of taking upper division math but worried whether you can handle {\em proofs}? \end{center} If so, you should consider taking Math 74, ``Transition to Upper Division Mathematics'', which teaches methods of discovering and writing up proofs, with the goal of easing the difficulty many students have in passing from lower division courses, where proofs are not emphasized, to upper division courses, where they are of central importance. It is intended to be taken after Math 53 or 54, and before or simultaneous with Math 110, 113, or 104. It will be given in both Summer Session and Fall Semester this year. \section{Final Examination, December 12, 1994} \problem{Problem 1} Solve the system of differential equations $$x_1'(t)=3x_1(t)+3x_2(t),$$ $$x_2'(t)=-2x_1(t)-4x_2(t)$$ with the initial conditions $$x_1(0)=1, \quad x_2(0)=3.$$ Show your work. \problem{Problem 2} (a) Find three functions $y_1(x), y_2(x), y_3(x)$ defined on $(-\infty,\infty)$ whose Wronskian is given by $$W(y_1,y_2,y_3)(x)=e^{4x}.$$ (b) Are the functions $y_1,y_2,y_3$ that you found linearly independent on $(-\infty,\infty)$? Justify your answer. \problem{Problem 3} Find a homogeneous third-order linear differential equation with constant coefficients that has $$y(x)=3\cdot e^{-x}-cos(2x)$$ as a solution. Explain how you found it. What is the general solution of that differential equation? \problem{Problem 4} For the function $f(x)=e^{x/\pi}$, draw a careful sketch of the graphs of the functions to which the following Fourier series converge on the interval $[0,4\pi]$: (a) the Fourier sine series of $f$ on $[0,\pi]$; (b) the Fourier cosine series of $f$ on $[0,\pi]$; (c) the ordinary Fourier series of $f$ on $[-\pi,\pi]$. Pay particular attention to the discontinuities of the functions. {\em Note:} You are {\em not} asked to compute the coefficients of those Fourier series. \problem{Problem 5} Find a function $u=u(x,t)$, defined for $0\leq x\leq \pi$ and $t\geq 0$, satisfying the partial differential equation $$u_{xx}=-u_{tt}\quad (0<x<\pi, t>0),$$ with boundary conditions $$u(0,t)=u(\pi,t)=0\quad (t>0)$$ and initial conditions $$u(x,0)=\sin(3x), \quad u_t(x,0)=0\quad (0<x<\pi).$$ {\em Hint:} look for a function of the form $u(x,t)=X(x)T(t)$, as in sec. 10.6 of the textbook; but note that $u_{xx}=-u_{tt}$ is {\em not} a wave equation, because of the minus sign. \end{document}