Lecture Notes for Math 251: ODE and PDE. Lecture 32: 1.2 Fourier Series Shawn D. Ryan Spring 212 Last Time: We studied the heat equation and the method of Separation of Variabes. We then used Separation of Variabes to sove the heat equation and ooked at the form of the typica soution. 1 Fourier Series Last ecture, we identified soutions of the heat equation having the form u t u xx (1 < x <, t >, with homogeneous Dirichet conditions at u(, t u(, t, had the form u(x, t A n e ( nπ 2kt sin( nπx. (2 whie the heat equation with homogeneous Neumann conditions u x (, t u x (, t had soutions of the form u(x, t 1 2 A + A n e ( nπ 2kt cos( nπx. (3 For this to make sense given an initia condition u(x, f(x, for the Dirichet case we need to be abe to write f(x as f(x A n sin( nπx (4 for some coefficients A n, whie in the Neumann case it must have the form f(x 1 2 A + A n cos( nπx (5 for appropriate coefficients. Equation (?? is caed a Fourier Sine Series of f(x and an expression ike Equation (?? is caed a Fourier Cosine Series of f(x. 1
There are two key things to keep in mind: (1 Is it possibe to find appropriate coefficients for the Fourier Sine and Cosine series for a given f(x? (2 For which f(x wi the Fourier series converge, if any? What wi the Fourier Series converge to? Section 1.2 wi focus on finding the coefficients of the Fourier Series, whie Section 1.3 wi address convergence. 1.1 The Euer-Fourier Formua We have a famous formua for the Fourier Coefficients, caed the Euer-Fourier Formua. 1.1.1 Fourier Sine Series Start by considering the Fourier Sine Series f(x A n sin( nπx. (6 How can we find the coefficients A n? Observe that sine functions have the foowing property sin( nπx sin( mπx dx (7 if m n are both positive integers. This can be seen by direct integration. Reca the trig identity Then the integra in Equation (?? equas 2(m nπ sin(a sin(b 1 2 cos(a b 1 cos(a + b. (8 2 nπx sin((m 2(m + nπ + nπx sin((m (9 so ong as m n. But these terms are just inear combinations of sin((m ± nπ and sin(, and thus everything is zero. Now, fix m and mutipy Equation (?? (Fourier Sine Series by sin( mπx. Integrating term by term we get f(x sin( mπx dx 2 A n sin( nπx sin( nπx sin( mπx dx (1 sin( mπx dx. (11
Due to the above work the ony term that remains is when m n. So a we have eft is and so f(x sin( mπx dx sin 2 ( mπx 1 2 (12 2 f(x sin( mπx dx. (13 In summary. If f(x has a Fourier sine expansion, the coefficients must be given by Equation (??. These are the ony possibe coefficients for such a series, but we have not shown that the Fourier Sine Series is a vaid expression for f(x. Exampe 1. Compute a Fourier Sine Series for f(x 1 on x. By Equation (??, the coefficients must be given by 2 sin( mπx dx. (14 2 mπ cos(mπx (15 2 2 (1 cos(mπ mπ mπ (1 ( 1m. (16 So we have 4 mπ if m is odd and if m is even. Thus, on (, 1 4 π (sin(πx + 1 3 sin(3πx 4 1 π 2n 1 + 1 5 sin(5πx +... (17 1πx sin((2n. (18 Exampe 2. Compute the Fourier Sine Series for f(x x on x. In this case Equation (?? yieds a formua for the coefficients So on (,, we have x 2 π 2 π 2 x sin( mπx dx (19 2x mπ cos(mπx m 2 π sin(mπx 2 (2 2 mπ cos(mπ + 2 sin(mπ m 2 π2 (21 ( 1 ( sin( πx m+1 2 mπ. (22 1 2 sin(2πx + 1 3 sin(3πx ( 1 (2n 1πx 2n 1 sin 1 2n sin 3... ( 2nπx (23. (24
1.1.2 Fourier Cosine Series Now et s consider the Fourier Cosine Series f(x 1 2 A + We can use the foowing property of cosine cos( nπx A n cos( nπx. (25 cos( mπx dx. (26 Verify this for an exercise. By the exact same computation as before for sines, we repace sines with cosines, if m we get If m, we have Thus, for a m >, we have f(x cos( mπx dx f(x 1dx 1 2 A cos 2 ( mπx dx 1 2. (27 1 2 1 2 A. (28 2 f(x cos( mπx dx. (29 This is why we have the 1 2 in front of A (so it has the same form as for m. Exampe 3. Compute the Fourier Cosine Series for f(x 1 on x. By Equation (??, the coefficients when m are 2 cos( mπx dx (3 2 mπ sin(mπx (31 2 sin(mπ. (32 mπ So the ony coefficient we have occurs are A, and this Fourier Cosine Series is then trivia 1 1 + cos( πx + cos(2πx +... (33 Exampe 4. Compute the Fourier Cosine Series for f(x x. 4
For m, 2 x cos( mπx dx (34 2x mπ sin(mπx + 2 m 2 π cos(mπx 2 (35 2 mπ sin(mπ + 2 m 2 π2(cos(mπ 1 (36 2 1 { m 2 π 2(( 1m (37 4 m odd m 2 π 2 m even. (38 If m, we have A 2 So on (,, we have the Fourier Cosine Series x 2 4 ( cos( πx π 2 + 1 9 cos(3πx + 1 25 cos(5πx 2 + 4 ( 1 (2n 1πx π 2 (2n 1 cos 2 1.1.3 Fu Fourier Series The fu Fourier Series of f(x on the interva < x <, is defined as f(x 1 2 A + A n cos( nπx xdx. (39 +... (4. (41 + B n sin( nπx. (42 REMARK: Be carefu, now the interva we are working with is twice as ong < x <. The computation of the coefficients for the formuas is anaogous to the Fourier Sine and Cosine series. We need the foowing set of identities: cos( nπx cos( nπx sin( nπx sin( mπx dx for n, m (43 cos( mπx dx for n m (44 sin( mπx dx for n m (45 1 cos( nπx dx 5 1 sin( nπx dx. (46
Thus, using the same procedure as above for sine and cosine, we can get the coefficients. We fix m and mutipy by cos( mπx, and do the same for sin( mπx. So we need to cacuate the integras of the squares cos 2 ( nπx dx 1 EXERCISE: Verify the above integras. So we get the foowing formuas sin 2 ( nπx dx and 1 2 dx 2 (47 B m 1 1 f(x cos( mπx dx (n 1, 2, 3,... (48 f(x sin( mπx dx (n 1, 2, 3,... (49 for the coefficients of the fu Fourier Series. Notice that the first equation is exacty the same as we got when considering the Fourier Cosine Series and the second equation is the same as the soution for the Fourier Sine Series. NOTE: The intervas of integration are different! Exampe 5. Compute the Fourier Series of f(x 1 + x. Using the above formuas we have A B m 1 1 So the fu Fourier series of f(x is HW 1.2 # 14,16,18 (1 + xdx 2 (5 (1 + x cos( mπx dx (51 + 1 (52 1 + x mπ sin(mπx m 2 π cos(mπx 2 1 m 2 π2(cos(mπ cos( mπ m (53 1 (1 + x sin( mπx dx (54 1 + x mπ cos(mπx + 1 m 2 π sin(mπx 2 (55 2 2 cos(mπ ( 1m+1 mπ mπ. (56 1 + x 1 + 2 π (sin(πx 1 2 sin(2πx 1 + 2 1 π 2n 1 + 1 3 sin(3πx... (57 1πx sin((2n 1 2n sin(2nπx. (58 6