Open in CoCalc
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% MATH 54, Lenstra, Spring 96
3%% Solutions to Problem set 13
4%% by William Stein
5
6\documentclass{article}
7\usepackage{amsmath}
8\textwidth=1.4\textwidth
9\textheight=1.3\textheight
10\hoffset=-1.2 in
11\voffset=-1.28in
12
13\author{William Stein}
14\title{Solutions to Problem Set 13}
15\newcommand{\problem}[1]{\vspace{.3in}\par\noindent{\Large \bfseries #1. }}
16\newcommand{\soln}{\par {\em Solution.} }
17\newcommand{\dx}{\hspace{.5em}dx}
18
19\begin{document}
20\maketitle
21This document contains the solutions to the 13th homework set
22along with a list of theoretically inclined problems that
23resemble what could be on the final.  The final examination
24is on Friday, May 17, 5--8 p.m. (room to be announced).
25The final examination covers differential equations.
26
27\section{Theoretically Inclined Problems}
28The TAs received the following letter from Prof. Lenstra.
29\begin{quote}
30Dear TAs,
31
32        As Diane suggested, I drew up a list of problems from
33Boyce and DiPrima that students who wish to prepare themselves
34for questions with a theoretical flavor may try their hands at.
35I am not saying that a problem of exactly one of these types
36will appear on the final; only that the theoretical thinking
37required for the problems below will be good preparation.
38
39	Best, Hendrik
40\end{quote}
41All problems are from Boyce-DiPrima and harder problems are starred.
42\begin{center}
43\begin{tabular}{|l|l|}\hline
443.1&15,16,33--38\\\hline
453.3&9,10,11,19,22*\\\hline
463.4&23,26\\\hline
473.5&16*, 33*\\\hline
484.1&7--12, 13--19\\\hline
494.2&1--10, 27\\\hline
507.1&1--4,15\\\hline
517.4&3*\\\hline
527.7&13*\\\hline
5310.1&3,14,16*\\\hline
5410.2&11,12,29\\\hline
55\end{tabular}
56\end{center}
57
58\section{Homework Solutions. Chapter 10; 1 -- 4,5; 2 -- 1,10,21,22;
593 -- 3,7; 4 -- 17,29}
60
61\problem{10.1.4}
62{\em Find the solution to the heat conduction problem
63$$100u_{xx}=u_t, \quad 0<x<1, \quad t>0$$
64$$u(0,t)=0, \quad u(1,t)=0, \quad t>0$$
65$$u(x,0)=\sin 2\pi x - 2 \sin 5\pi x, \quad 0\leq x\leq 1.$$	}
66\soln From the equation $100u_{xx}=u_t$ we see that $\alpha^2=100$.
67From the fact that $u(x,t)$ is defined for $0<x<1$ we see that
68$\ell=1$. As stated on page 517 (equation 27) we know that
69the function
70$$u(x,t)=\sum_{n=1}^m c_n u_n(x,t) 71 =\sum_{n=1}^m c_n e^{-100n^2\pi^2t}\sin n\pi x$$
72satisfies the differential equation $100u_{xx}=u_t$ along with
73the boundary condition $u(0,t)=u(1,t)=0$. Notice that we have substituted
74$\alpha^2=100$ and $\ell=1$. The $c_n$ be chosen so as to satisfy
75the initial condition
76$$u(x,0)=\sin 2\pi x - 2\sin 5\pi x.$$
77Substituting $t=0$ into the above expression
78for $u(x,t)$ we obtain the equation
79$$\sum_{n=1}^m c_n \sin n\pi x=\sin 2\pi x-2\sin 5\pi x.$$
80Thus setting $c_2=1$, $c_5=-2$, and all other $c_n=0$ we
81obtain a function $u(x,t)$ satisfying the initial conditions.
82Thus the solution to the given heat conduction problem is
83$$u(x,t) = e^{-400\pi^2t}\sin 2\pi x - 84 2e^{-2500\pi^2t}\sin 5\pi x.$$
85
86\problem{10.1.5}
87{\em Find the solution to the heat conduction problem
88$$u_{xx}=4u_t, \quad 0<x<2, \quad t>0$$
89$$u(0,t)=0, \quad u(2,t)=0, \quad t>0$$
90$$u(x,0)=2\sin(\pi x/2)-\sin(\pi x)+4\sin(2\pi x), \quad 0\leq x\leq 2.$$}
91\soln Everything proceeds in the same general way as above. This time
92$\alpha^2=4$, $\ell=2$, $c_1=2$, $c_2=-1$, $c_4=4$, and all other $c_n=0$.
93Thus the solution is
94$$u(x,t)=2 e^{-\pi^2 t}\sin (\pi x/2) - e^{-4\pi^2 t}\sin(\pi x) 95 + 4 e^{-16\pi^2 t}\sin(2\pi x).$$
96
97
98\problem{10.1.7}
99{\em In each of the following problems determine whether the
100method of separation
101of variables can be used to replace the given partial differential equation
102by a pair of ordinary differential equations. If so, find the equations.}
103
1047. $xu_{xx}+u_t=0$
105\soln
106Let $u=X(x)T(t)$. Then the differential equation becomes
107$$xX''T+XT'=0.$$
108A little algebra transforms this into
109$$\frac{xX''}{X}=-\frac{T'}{T}.$$
110Since the left side does not depend on $t$ and the right
111side does not depend on $x$ it follows that both sides
112most equal some constant, call it $a$. Multiplying through we
113obtain the pair of ordinary differential equations
114$$xX''-aX=0, \quad T'+aT=0.$$
115
11611. $u_{xx}+(x+y)u_{yy}=0$
117\soln Let $u=X(x)Y(y)$. Then the differential equation becomes
118$$X''Y+(x+y)XY''=0.$$
119It is impossible to apply separation of variables to the equation.
120
121\problem{10.2.1}
122{\em Determine whether the function $\sin \pi x/\ell$ is periodic.
123If so, find its fundamental period.}
124\soln The function is periodic with period $2\ell$ since
125$\sin \pi x$ is periodic with period $2$. The factor of $1/\ell$ rescales
126the graph of $\sin\pi x$ horizontally by a factor of $\ell$. Thus the
127period increases by a factor of $\ell$.
128
129\problem{10.2.10}
130{\em Determine whether the function
131$$f(x)=\begin{cases}(-1)^n,&2n-1\leq x<2n,\\ 132 1,&2n\leq x<2n+1;\end{cases}$$
133is periodic. If so, find its fundamental period. }
134\soln
135Sketching the graph of $f(x)$ we see that $f$ is periodic
136with fundamental period $4$.
137
138\problem{10.2.21}
139{\em Find the Fourier series corresponding to the function
140$$f(x)=\begin{cases}x+1&-1\leq x<0,\\ 1-x&0\leq x<1;\end{cases} 141 \quad f(x+2)=f(x).$$}
142\soln
143This is just a translation of example 1 on page 524 so we
144can easily derive the fourier series of $f(x)$ from that. We present
146The Fourier series of $f$ is the projection of $f$ onto the
147subspace spanned by the functions
148$1$, $\sin(n\pi x/2)$, and $\cos(n\pi x/2)$, $n=1,2,\ldots$.
149Note that these functions are not orthonormal although they are orthogonal
150(see page 522). Recall the projection formula
151$$\text{Proj} v=\sum_{n=1}^{\infty} \frac{\langle v,u_n\rangle} 152 {\langle u_n,u_n\rangle} u_n$$
153of $v$ onto the subspace spanned by an orthogonal basis $u_n$.
154Since the inner product in our situation
155is $$\langle g,h\rangle =\int_{-1}^{1}g(x)h(x)\dx$$ we see that
156the Fourier series of $f$ is
157$$\frac{a_0}{2}+\sum_{n=1}^{\infty} a_n\cos(n\pi x) 158 +\sum_{n=1}^{\infty} b_n\sin(n\pi x).$$
159Here the coefficients $a_n$ and $b_n$ for $n\geq 1$ are as follows.
160$$a_n=\frac{\langle f,\cos(n\pi x)\rangle} 161 {\langle \cos(n\pi x), \cos(n\pi x)\rangle} 162 = \int_{-1}^{1}f(x)\cos(n\pi x) \dx$$
163and
164$$b_n=\frac{\langle f,\sin(n\pi x)\rangle} 165 {\langle \sin(n\pi x), \sin(n\pi x)\rangle} 166 =\int_{-1}^{1}f(x)\sin(n\pi x) \dx.$$
167(Note that the factor of $1/\ell$ which one would find in the book
168is simply one in our situation.)
169Here we have used the computation
170$$\langle \cos(n\pi x), \cos(n\pi x)\rangle = 1$$
171which can be found on page 522.
172The case $n=0$ is treated separately. We have
173$$\frac{a_0}{2} = \frac{\langle f, 1\rangle} 174 {\langle 1, 1\rangle} 175 =\frac{1}{2} \langle f, 1\rangle 176 =\frac{1}{2} \int_{-1}^{1} f(x)\dx$$
177so $$a_0=\int_{-1}^{1}f(x)\dx.$$
178Now that we have the formulas and a firm grasp of what is going
179on we need to compute the coefficients $a_n$ and $b_n$.
180We compute
181\begin{eqnarray*}
182a_0&=&\int_{-1}^1 f(x)\dx \\
183&=&\int_{-1}^0 x+1 \dx + \int_0^1 1-x \dx\\
184&=&\Bigl[\frac{1}{2}x^2+x\Bigr]^0_{-1} + \Bigl[x-\frac{1}{2}x^2\Bigr]^1_0\\
185&=& -\Bigl(\frac{1}{2}-1\Bigr)+\frac{1}{2}=1.\end{eqnarray*}
186Next computing $a_n$ we have
187\begin{eqnarray*}
188a_n&=&\int_{-1}^{1}f(x)\cos(n\pi x)\dx\\
189&=&\int_{-1}^{0}(x+1)\cos(n\pi x)\dx + \int_{0}^{1}(1-x)\cos(n\pi x)\dx\\
190&=&\int_{-1}^{0}x\cos(n\pi x)\dx + \int_{-1}^{0}\cos(n\pi x)\dx +
191   \int_{0}^{1}\cos(n\pi x)\dx - \int_{0}^{1}x\cos(n\pi x) \dx\\
192&=&\int_{-1}^{0}x\cos(n\pi x)\dx - \int_{0}^{1}x\cos(n\pi x) \dx.
193\end{eqnarray*}
194To compute this we apply integration by parts yielding
195\begin{eqnarray*}
196\int_{-1}^{0}x\cos(n\pi x)\dx
197   &=& \Bigl[ \frac{x}{n\pi}\sin(n\pi x)\Bigr]^0_{-1}
198            - \frac{1}{n\pi}\int_{-1}^{0}\sin(n\pi x)\dx\\
199   &=& 0 - \frac{1}{n\pi}\Bigl[\frac{-1}{n\pi}\cos(n\pi x)\Bigr]^0_{-1}\\
200   &=& \frac{1}{n^2\pi^2}-\frac{1}{n^2\pi^2}\cos(-n\pi)
201                 = \begin{cases} 0 & \text{if $n$ is even}\\
202                                 \frac{2}{n^2\pi^2}&\text{if $n$ is odd}
203                   \end{cases}
204\end{eqnarray*}
205Similiarly,
206\begin{eqnarray*}
207\int_{0}^{1}x\cos(n\pi x)\dx
208   &=& \Bigl[ \frac{x}{n\pi}\sin(n\pi x)\Bigr]^1_{0}
209            - \frac{1}{n\pi}\int_{0}^{1}\sin(n\pi x)\dx\\
210   &=& 0 - \frac{1}{n\pi}\Bigl[\frac{-1}{n\pi}\cos(n\pi x)\Bigr]^0_{1}\\
211   &=& \frac{1}{n^2\pi^2}\cos(n\pi)-\frac{1}{n^2\pi^2}
212                 = \begin{cases} 0 & \text{if $n$ is even}\\
213                                 -\frac{2}{n^2\pi^2}&\text{if $n$ is odd}
214                   \end{cases}
215\end{eqnarray*}
216It follows that
217$$a_n=\begin{cases} 0&\text{if n is even}\\ 218 \frac{4}{n^2\pi^2}&\text{if n is odd} 219 \end{cases}$$
220One checks that $f(x)$ is an even function
221so $f(x)\sin(n\pi x)$ is an odd function and hence
222$$b_n=\int_{-1}^{1}f(x)\sin(n\pi x)\dx=0.$$
223Putting this all together we conclude that the Fourier expansion of $f$ is
224$$f(x)=\frac{1}{2}+\frac{4}{\pi^2}\sum_{n=1}^{\infty} 225 \frac{\cos(2n-1)\pi x}{(2n-1)^2}.$$
226
227\problem{10.2.22}
228{\em Find the Fourier series corresponding to the function
229$$f(x)=\begin{cases}x+\ell,&-\ell\leq x\leq 0,\\ 230 \ell,&0<x<\ell;\end{cases} 231 \quad f(x+2\ell)=f(x)$$      }
232\soln
233As explained in the previous problem, we must compute the
234$a_n$ and $b_n$ then substitute them into the appropriate series.
235We compute
236\begin{eqnarray*}
237a_0&=&\frac{1}{\ell}\int_{-\ell}^{\ell}f(x)dx\\
238&=&\frac{1}{\ell}\int_{-\ell}^{0}x+\ell\dx +
239                     \frac{1}{\ell}\int_0^{\ell}\ell\dx\\
240&=&\frac{1}{\ell}\Bigr[\frac{1}{2}x^2+\ell x\Bigr]^0_{-\ell}
241                   + \ell = \frac{3}{2}\ell
242\end{eqnarray*}
243Next compute $a_n$ for $n\geq 1$
244\begin{eqnarray*}
245\ell a_n&=&\int_{-\ell}^0 x\cos(n\pi x/\ell)\dx
246            + \int_{-\ell}^0 \ell\cos(n\pi x/\ell)\dx
247            + \int_{0}^{\ell} \ell\cos(n\pi x/\ell)\dx\\
248  &=& \int_{-\ell}^{0} x\cos(n\pi x/\ell)\dx + \ell
249              \int_{-\ell}^{\ell}\cos(n\pi x/\ell)\dx
250\end{eqnarray*}
251Since the integral over a period of $\cos(x)$ is 0 we see easily that
252$$\int_{-\ell}^{\ell}\cos(n\pi x/\ell)\dx=0.$$
253For the other term integration by parts gives
254\begin{eqnarray*}
255\int_{-\ell}^{0} x\cos(n\pi x/\ell)\dx &=&
256   \Bigr[\frac{\ell x}{n\pi}\sin(n\pi x/\ell)\Bigr]^0_{-\ell}
257     - \frac{\ell}{n\pi}\int_{-\ell}^{0}\sin(n\pi x/\ell)\dx\\
258   &=& 0 + \frac{\ell^2}{n^2\pi^2}\Bigr[\cos(n\pi x/\ell)\Bigr]^0_{-\ell}\\
259   &=& \frac{\ell^2}{n^2\pi^2}(1-\cos(-n\pi))
260           = \begin{cases} 0 & \text{if $n$ is even}\\
261                           \frac{2\ell^2}{n^2\pi^2}&\text{if $n$ is odd}
262             \end{cases}
263\end{eqnarray*}
264Dividing through by $\ell$ we see that
265$$a_n=\begin{cases}0&\text{if n is even}\\ 266 \frac{2\ell}{n^2\pi^2}&\text{if n is odd} 267 \end{cases}.$$
268Next compute $b_n$
269\begin{eqnarray*}
270\ell b_n &=& \int_{-\ell}^{0} x\sin(n\pi x/\ell)\dx
271                 + \int_{-\ell}^{0}\ell\sin(n\pi x/\ell)\dx
272                 + \int_0^{\ell}\ell\sin(n\pi x/\ell)\dx\\
273    &=& \Bigr[\frac{-\ell}{n\pi}x\cos(n\pi x/\ell)\Bigr]^0_{-\ell}
274        + \frac{\ell}{n\pi}\int_{-\ell}^{0}\cos(n\pi x/\ell)\dx\\
275    &=& \frac{\ell^2}{n\pi}\cos(-n\pi)+0=\frac{(-1)^{n}\ell^2}{n\pi}
276\end{eqnarray*}
277Divide through by $\ell$ to see that
278$$b_n=\frac{(-1)^{n}\ell}{n\pi}.$$
279Thus the Fourier expansion of $f$ is
280$$f(x)=\frac{3\ell}{4}+\sum_{n=1}^{\infty} 281 \Bigr[\frac{2\ell\cos[(2n-1)\pi x/\ell]}{(2n-1)^2\pi^2} 282 + \frac{(-1)^{n}\ell\sin(n\pi x/\ell)}{n\pi}\Bigr].$$
283
284
285\problem{10.3.3}
286{\em Let $f(x)$ be the $2\pi$-periodic extension of the function defined as
287$\sin^2 x$ on the interval $-\pi\leq x\leq \pi$. Find the Fourier series
288for $f(x)$, then sketch the function to which the series converges
289for several periods. }
290
291\soln
292Fortunately we can apply some trigonometric identities to find
293the Fourier expansion of $f(x)$. Since
294$$\cos(2x)=\cos^2x-\sin^2x$$ it follows
295that $$\sin^2x=\cos^2x-\cos 2x=1-\sin^2x-\cos 2x.$$
296The Fourier expansion of $\sin^2x$ is then
297$$\sin^2x = \frac{1}{2}-\frac{1}{2}\cos 2x.$$
298
299\problem{10.3.7}
300{\em Let $f(x)$ be the $2\pi$-periodic extension of the function
301$$f(x)=\begin{cases} 3020,&-\pi\leq x<-\pi/2\\ 3031,&-\pi/2\leq x<\pi/2\\ 3040,&\pi/2\leq x<\pi\end{cases}$$
305Find the Fourier series
306for $f(x)$, then sketch the function to which the series converges
307for several periods. }
308\soln
309Notice that $\ell=\pi$. We first compute $a_0$.
310$$a_0=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\dx = \frac{1}{\pi}\int_{-\pi/2}^{\pi/2}\dx = 1.$$
311Next we compute $a_n$.
312\begin{eqnarray*}
313a_n&=&\frac{1}{\pi}\int_{-\pi}^{\pi} f(x)\cos(n x)\dx\\
314   &=&\frac{1}{\pi}\Bigl[\frac{1}{n}\sin nx\Bigr]^{\pi/2}_{-\pi/2}\\
315   &=&\frac{1}{\pi n}(\sin (n\pi/2)+\sin(n\pi/2))
316     =\begin{cases} 0 & \text{if $n$ is even}\\
317                    \frac{(-1)^{(n-1)/2}2}{\pi} & \text{if $n$ is odd}
318      \end{cases}
319\end{eqnarray*}
320Since $f(x)$ is an even function we know at once that $b_n=0$ for
321all $n$. Thus the Fourier expansion of $f(x)$ is
322$$\frac{1}{2} + \frac{2}{\pi}\sum_{n=1}^{\infty} 323 \frac{(-1)^{n-1}}{2n-1}\cos(2n-1)x.$$
324
325\problem{10.4.17}
326{\em Use the properties of even and odd functions to evaluate the integral
327$$\int_{-\pi}^{\pi}x^4\sin(nx)\dx.$$
328\soln Since $x^4$ is even and $\sin(nx)$ is odd the product
329$x^4\sin(nx)$ is an odd function. Thus the integral is 0. }
330
331\problem{10.4.29}
332{\em Find the cosine Fourier series of period $4\pi$ for the function
333$$f(x)=\begin{cases}x,&0<x<\pi,\\0,&\pi<x<2\pi\end{cases}.$$
334Then sketch the graph of the function to which the series converges
335over three periods. }
336\soln
337Using some of the tricks which apply to even and odd functions
338the formulas for $a_n$ and $b_n$ are
339\begin{eqnarray*}
340a_n&=&\frac{1}{\pi}\int_0^{2\pi}f(x)\cos\frac{nx}{2}\dx\\
341b_n&=&0
342\end{eqnarray*}
343Obviously $a_0=\pi/2$. Computing $a_n$ in our situation is accomplished
344via integration by parts
345\begin{eqnarray*}
346a_n&=&\frac{1}{\pi}\Bigl(\frac{2}{n}\Bigl[x\sin\frac{nx}{2}\Bigr]^{\pi}_0
347   - \frac{2}{n}\int_{0}^{\pi}\sin\frac{nx}{2}\dx\Bigr)\\
348  &=& \frac{2}{n}\sin\frac{n\pi}{2} + \frac{4}{n^2\pi}(\cos\frac{n\pi}{2}-1)
349\end{eqnarray*}
350Thus the Fourier expansion of $f(x)$ is
351$$f(x)=\frac{\pi}{4}+\frac{1}{\pi}\sum_{n=1}^{\infty}\Bigr[\frac{2\pi}{n} 352\sin\frac{n\pi}{2}+\frac{4}{n^2}\Bigl(\cos\frac{n\pi}{2}-1\Bigr)\Bigr]\cos\frac{nx}{2}.$$
353
354\section{Math 74}
355\begin{center}
356           Thinking of taking upper division math
357          but worried whether you can handle {\em proofs}?
358\end{center}
359
360If so, you should consider taking Math 74, Transition to Upper
361Division Mathematics'', which teaches methods of discovering and
362writing up proofs, with the goal of easing the difficulty many students
363have in passing from lower division courses, where proofs are not
364emphasized, to upper division courses, where they are of central
365importance.  It is intended to be taken after Math 53 or 54, and before
366or simultaneous with Math 110, 113, or 104.  It will be given in both
367Summer Session and Fall Semester this year.
368
369\section{Final Examination, December 12, 1994}
370\problem{Problem 1} Solve the system of differential equations
371$$x_1'(t)=3x_1(t)+3x_2(t),$$
372$$x_2'(t)=-2x_1(t)-4x_2(t)$$
373with the initial conditions
374$$x_1(0)=1, \quad x_2(0)=3.$$
376
377\problem{Problem 2}
378(a) Find three functions $y_1(x), y_2(x), y_3(x)$ defined on $(-\infty,\infty)$
379whose Wronskian is given by
380$$W(y_1,y_2,y_3)(x)=e^{4x}.$$
381(b) Are the functions $y_1,y_2,y_3$ that you found linearly independent
382on $(-\infty,\infty)$? Justify your answer.
383
384\problem{Problem 3}
385
386Find a homogeneous third-order linear differential equation with constant
387coefficients that has
388$$y(x)=3\cdot e^{-x}-cos(2x)$$
389as a solution. Explain how you found it.
390
391What is the general solution of that differential equation?
392
393\problem{Problem 4}
394
395For the function $f(x)=e^{x/\pi}$, draw a careful sketch of the graphs of the
396functions to which the following Fourier series converge on the interval
397$[0,4\pi]$:
398
399(a) the Fourier sine series of $f$ on $[0,\pi]$;
400
401(b) the Fourier cosine series of $f$ on $[0,\pi]$;
402
403(c) the ordinary Fourier series of $f$ on $[-\pi,\pi]$.
404
405Pay particular attention to the discontinuities of the functions.
406{\em Note:} You are {\em not} asked to compute the coefficients of
407those Fourier series.
408
409\problem{Problem 5}
410
411Find a function $u=u(x,t)$, defined for $0\leq x\leq \pi$ and
412$t\geq 0$, satisfying the partial differential equation
413$$u_{xx}=-u_{tt}\quad (0<x<\pi, t>0),$$
414with boundary conditions
415$$u(0,t)=u(\pi,t)=0\quad (t>0)$$
416and initial conditions
417$$u(x,0)=\sin(3x), \quad u_t(x,0)=0\quad (0<x<\pi).$$
418
419{\em Hint:} look for a function of the form $u(x,t)=X(x)T(t)$, as in sec.
42010.6 of the textbook; but note that $u_{xx}=-u_{tt}$ is {\em not}
421a wave equation, because of the minus sign.
422
423\end{document}
424
425
426
427
428
429
430
431