Math 342 Viktor Grigoryan 21 Fourier series - finding the

Click here to load reader

  • date post

    05-Jan-2022
  • Category

    Documents

  • view

    0
  • download

    0

Embed Size (px)

Transcript of Math 342 Viktor Grigoryan 21 Fourier series - finding the

21 Fourier series - finding the coefficients
Recall that to solve the Dirichlet and Neumann problems for the heat and wave equations on the finite interval (0, l), we need to find respectively:
i) the Fourier sine series expansion of a function φ(x) (representing the initial data) on the interval (0, l),
φ(x) = ∞∑ n=1
An sin nπx
l . (1)
ii) the Fourier cosine series expansion of φ(x) on (0, l),
φ(x) = A0
l . (2)
Leaving the question of whether such an infinite series is well-defined and in which sense φ(x) is equivalent to its Fourier series for later lectures, let us assume that φ(x) can be written as such series, and that the Fourier series in question do converge to the function φ(x) in a suitable sense. In order to use the Fourier expansions in solving boundary value problems with the separation of variables method, we need to find the coefficients An in the expansions (1) and (2).
Let us start with the sine expansion (1). Notice that φ(x) is written as a linear combination of the functions{ sin
nπx
l
, (3)
which is similar to expansions of vectors in terms of a basis. Recall that if {e1,e2, . . . ,ek} forms an orthonormal basis, and the vector v is written as a linear combination of these basis elements,
v = c1e1 + c2e2 + · · ·+ ckek,
then the components of the vector v = (c1, c2, . . . ck) can be found by projecting the vector v onto the respective directions e1,e2, . . . ,ek. This is done by taking the dot (scalar, inner) product of the vector v with the corresponding basis element.
v · ei = ∑ j
cjej · ei = ci,
since ej · ei = 1, if i = j, and zero otherwise due to the orthonormality of the basis. Thus, ci = v · ei. We would like to compute the Fourier coefficients in a similar way. But in order for this procedure to work
for expansion (1), the elements in the set (3) must be pairwise orthogonal in an appropriate sense. This turns out to be the case, if one takes the dot product of two functions f, g defined on the interval (0, l) to be
(f, g) =
ˆ l
f(x)g(x)dx. (4)
This definition gives a proper inner product, and one has the associated orthogonality notion: f and g are orthogonal to each other, if their dot product is zero, (f, g) = 0.
Let us now check that the set (3) is indeed orthogonal, i.e. consists of pairwise orthogonal elements in the sense of the above defined dot product. That is, we want to show that
ˆ l
1
Using the trigonometric identity for the product of two sines,
sinα sinβ = 1
ˆ l
= 0,
since sine vanishes for any multiple of π. Thus, (5) holds, and we can find the coefficients in the expansion (1) just as was done for regular vectors. For this, we form the dot product of the function φ(x) with the functions sin(mπx/l) for m = 1,2, . . . , and integrate the resulting series term by term to get
ˆ l
sin2 mπx
l dx,
since, due to the pairwise orthogonality, only the term with n = m survives in the sum. For the last integral we use the trigonometric identity (6) with n = m to compute
ˆ l
ˆ l
φ(x) sin mπx
l dx. (7)
This means that if φ(x) can be written in the form (1), then the coefficients of this expansion are necessarily given by (7).
We can compute the coefficients of the Fourier cosine series (2) in a similar way. For this, we need to guarantee that the set {
cos nπx
} (8)
is orthogonal as well. To show this, we employ the trigonometric identity for the product of cosines,
cosα cosβ = 1
2 cos(α− β) +
ˆ l
0
2mπx
l
) dx =
l
2 .
Then taking the dot product of φ(x) with cos(mπx/l) for m = 1,2, . . . , and using expansion (2), we get
ˆ l
ˆ l
2 l.
So for all n = 0,1,2, . . . , we have the following formula for the coefficients of the Fourier cosine series (2)
An = 2
φ(x) cos nπx
l dx. (10)
Similar to the case of the sine series, this formula means that if a function can be written in the form (2), then the coefficients of this expansion must be necessarily given by formula (10). Notice that the coefficient A0 can be computed by the same formula (10), which is exactly the reason we used the factor of 1/2 in front of the A0 term in expansion (2).
21.1 Application to heat and wave problems
Let us now go back to the boundary value problems for the heat and wave equations, and see how the coefficients formulas allow one to find the series solution through the method of separation of variables. As an example, we will look at the Dirichlet problem for the wave equation,{
utt − c2uxx = 0 for 0 < x < l, u(x,0) = φ(x), ut(x,0) = ψ(x), u(0, t) = u(l, t) = 0.
(11)
As we know, the series solution for the above Dirichlet problem is
u(x, t) = ∞∑ n=1
provided the initial data can be expanded into the series
φ(x) = ∞∑ n=1
An sin nπx
nπx
l .
But then from our previous discussion, we know that An, and (nπc/l)Bn are given by the Fourier sine series coefficients formula (7). Hence,
An = 2
3
Computing these values of the coefficients An and Bn for n = 1, 2, . . . from the given initial data, and plugging them into the series solution (12) will yield the solution to the Dirichlet wave problem (11).
One proceeds in exactly the same way for the case of Neumann problems, where instead of sine series, one works with cosine series. We demonstrate this on the example of Neumann heat problem,{
ut − kuxx = 0 for 0 < x < l, u(x,0) = φ(x), ux(0, t) = ux(l, t) = 0.
(13)
u(x, t) = A0
2 + ∞∑ n=1
provided the initial data can be expanded into the series
φ(x) = A0
l .
The coefficients An can be computed from the given initial data using the Fourier cosine series coefficients formula (10). One then plugs the values of these coefficients into the series solution (14), arriving at the solution for the Neuman heat problem (13).
21.2 Examples of computing Fourier series
Let us now consider several examples of computing the coefficients in Fourier expansions for particular functions, using the coefficients formulas (7) and (10).
Example 21.1. Compute the Fourier sine and cosine series for the function φ(x) ≡ 1 on the interval (0, l). To find the sine series for this function, we use the coefficients formula (7).
An = 2
l
l
{ 4/(nπ) for n− odd, 0 for n− even.
So the Fourier sine series of the function φ(x) ≡ 1 is
1 = 4
π sin
nπx
l .
To find the cosine series, we use formula (10), and compute for n = 1,2, . . .
An = 2
An = 2
l l = 2.
So the Fourier cosine expansion of the function φ(x) ≡ 1 is
1 = 2
l + · · · = 1.
In other words, the constant function 1 is its own Fourier series, which is not surprising, taking into account the fact that the constant 1 function is an element of the set (8).
4
Example 21.2. Compute the Fourier sine and cosine series for the function φ(x) = x on the interval (0, l). Using the formulas for the coefficients of the sine series and integrating by parts, we compute
An = 2
nπ .
x = 2l
π sin
l . (15)
From the cosine series coefficients formula, and again integrating by parts, we get for n = 1,2, . . .
An = 2
For n = 0, we have
A0 = 2
= l.
So the Fourier cosine series of the function φ(x) = x is
x = l
2 − 4l
π2 cos
nπx
l .
Example 21.3. Find the Fourier cosine series of the function φ(x) = x2 by integration of the sine series of the function x. Assume that one can integrate the Fourier sine series of x term by term.
Integrating both sides of identity (15), we get
x2
where c is the constant of integration. Thus, we get
x2 = 2c+ ∞∑ n=1
nπx
l .
From the coefficients formula for the Fourier cosine series, we know that the free term 2c must equal A0/2, where A0 can be computed directly from the coefficients formula (10) as follows
A0 = 2
= 2l2
3 .
Then 2c = A0/2 = l2/3, and substituting this into the above series yields the Fourier cosine series of the function x2.
x2 = l2
nπx
l .
One could, of course, compute the coefficients in the Fourier expansion of x2 directly from the formula (10), however it requires integrating by parts twice, which is a little more involved than the above procedure. On the other hand, the idea of integrating (or differentiating) Fourier series term by term can yield Fourier series for new functions by a fairly simple computation.
5
21.3 Conclusion
Using the method of separation of variables for the heat and wave boundary value problems we derived the series solutions, in which the coefficients came from the sine and cosine expansions of the initial data. In this lecture we developed a method of computing these coefficients, arriving at formulas (7) and (10) respectively, thus providing a means of computing the solutions to the boundary value problems completely. One should keep in mind, however, that in all of our computations we assumed that the series expansion is well defined, i.e. the series converges in an appropriate sense. We will return to the question of convergence of Fourier series in subsequent lectures, and put the arguments of this lecture on a rigorous footing.
6
22 Full Fourier series
We saw in previous lectures how the Dirichlet and Neumann boundary conditions lead to respectively sine and cosine Fourier series of the initial data. In the same way the periodic boundary conditions
u(−l, t) = u(l, t), ux(−l, t) = ux(l, t), (16)
lead to the full Fourier expansion, i.e. the Fourier series that contains both sines and cosines. Such boundary conditions arise naturally in applications. For example heat conduction phenomena in a circular rod will be described by the heat equation subject to boundary conditions (16).
To see how the full Fourier series comes about, let us consider the eigenvalue problem associated with the boundary conditions (16), {
X′′ = −λX X(−l) = X(l), X′(−l) = X′(l).
(17)
To find the eigenvalues and eigenfunctions for (17), we consider the qualitatively distinct cases λ < 0, λ = 0 and λ > 0 separately.
We first assume λ = −γ2 < 0. In this case the equation takes the form X′′ = γ2X, and the solutions are thus X(x) = Ceγx +De−γx. The boundary conditions then imply{
Ce−γl +Deγl = Ceγl +De−γl, Cγe−γl −Dγeγl = Cγeγl −Dγe−γl.
Multiplying the first equation by γ and adding to the second equation gives
2Cγe−γl = 2Cγeγl ⇒ 2Cγeγl(1− e−2γl) = 0 ⇒ C = 0,
since γ, l 6= 0. Similarly, D = 0, which implies that there are no negative eigenvalues. We next assume that λ = 0, which results in the equation X′′ = 0. The solution is then X(x) = C +Dx,
and the boundary conditions imply{ C −Dl = C +Dl D = D
⇒ 2Dl = 0 ⇒ D = 0.
So X(x) ≡ 1 is an eigenfunction corresponding to the eigenvalue λ0 = 0. Finally, we consider the case λ = β2 > 0. The equation then takes the form X′′ = −β2X, and hence, has
⇒ {
2D sinβl = 0 2Cβ sinβl = 0
Since C and D cannot both be equal to zero, and β 6= 0, we must have
sinβl = 0 ⇒ β = nπ
l , for n = 1,2, . . . .
λn = (nπ l
l , for n = 1,2, . . . .
Notice that for each of the eigenvalues λn, n = 1, 2, . . . we have two linearly independent eigenfunctions, cos(nπx/l) and sin(nπx/l). This differs from the case of the Dirichlet and Neumann boundary conditions, where we had only one linearly independent eigenfunction for each of the same eigenvalues, namely sin(nπx/l) for Dirichlet, and
7
cos(nπx/l) for Neumann. We will see in the next lecture that in the cases where there are more than one linearly independent eigenfunctions corresponding to the same eigenvalue, one can always choose a pairwise orthogonal set of eigenfunctions, which is necessary for the method of computing the Fourier coefficients to go through.
Having solved the eigenvalue problem (17), it is now clear that the series solutions of PDEs subject to the periodic boundary conditions (16) will have both sines and cosines in their expansions. For example the solution to the heat equation satisfying the boundary conditions (16) will be given by the series
u(x, t) = A0
2 + ∞∑ n=1
nπx
l ),
where the coefficients An,Bn come from the expansion of the initial data
φ(x) = A0
l . (18)
The series (18) is called the full Fourier series of the function φ(x) on the interval (−l, l). It is now clear that to solve boundary value problems with periodic boundary conditions (16) via separation
of variables, one needs to find the coefficients in the expansion (18). This procedure is similar to finding the coefficients of the Fourier cosine and sine series, and relies on the pairwise orthogonality of the eigenfunctions. Notice that (18) is a linear combination of the elements of the set{
1, cos nπx
} . (19)
Now, if we can prove that the elements of this set are pairwise orthogonal, then the coefficients in (18) can be found by taking the dot product of the series (18) with the corresponding eigenfunction. Since the interval in this case is (−l, l), we define the dot product of two functions to be
(f, g) =
ˆ l
−l f(x)g(x)dx.
Let us now check the orthogonality of the set (19). We need to show that
ˆ l
−l cos
ˆ l
−l cos
ˆ l
−l sin
ˆ l
ˆ l
l dx = 0, for all m = 1,2, . . . . (24)
Notice that, since sin(nπx/l) and cos(nπx/l) sin(mπx/l) are odd functions, (20) and (24) are trivial, since the integration is performed over a symmetric interval. The integrands in (21), (22) and (23) are even functions, so the integrals are equal to twice the corresponding integrals over the interval (0, l). Then, say for (21), we have
ˆ l
−l cos
8
as was computed in the last lecture, when considering Fourier cosine series over the interval (0, l). Proofs of(22) and (23) are similar.
Thus, the set (19) is indeed orthogonal. To compute the coefficients in (18), we take the dot product of the series with the corresponding eigenfunctions. For example,
ˆ l
and similarly for the eigenfunctions 1 = cos(0πx/l), and sin(mπx/l). But
ˆ l
−l cos2
Am = 1
(25)
Example 22.1. Find the full Fourier series of the function φ(x) = x on the interval (−l, l). We compute the coefficients in the expansion
x = A0
l dx = 0,
since the function x cos(nπx/l) is odd, and the integration interval is symmetric. Using evenness of the function x sin(nπx/l), we have
Bn = 1
nπ ,
where the last integral is exactly the coefficient of the Fourier sine series of function φ(x) = x, computed in the last lecture. Thus the full Fourier series of x on the interval (−l, l) is
x = ∞∑ n=1
(−1)n+1 2l
nπx
l ,
which exactly coincides with the Fourier sine series of the function x on the interval (0, l).
9
22.1 Even, odd and periodic functions
In the previous example we could take any odd function φ(x), and the coefficients of the cosine terms in the full Fourier series would vanish for exactly the same reason, leading to the Fourier sine series. Thus the full Fourier series of an odd function on the interval (−l, l) coincides with its Fourier sine series on the interval (0, l). Analogously, the full Fourier series of an even function on the interval (−l, l) coincides with its Fourier cosine series on the interval (0, l). This is not surprising, taking into account the fact that the sine and cosine functions are themselves respectively odd and even.
So how can the same function φ(x), be it odd, even, or neither, have both a nonzero Fourier cosine and a nonzero Fourier sine expansion on the interval (0, l)? The answer to this question is trivial, if one recalls the reflection method used to solve boundary value problems on the finite interval (0, l). In the reflection method one takes either an odd (Dirichlet BCs), or an even (Neumann BCs) extension of the data. Then the resulting extended data is either odd or even on the symmetric interval (−l, l), and is extended to be periodic with period 2l to the rest of the number line. But then one can find the full Fourier series of this extended data, which will contain only sines or cosines, depending on the evenness or the oddness of the extension, thus giving either the Fourier cosine, or Fourier sine series of the function φ(x) on the interval (0, l).
In short, one has the following correspondence between the boundary conditions, extensions, and Fourier series. Dirichlet: u(0, t) = u(l, t) = 0 → odd extension → Fourier sine series. Neumann: ux(0, t) = ux(l, t) = 0 → even extension → Fourier cosine series. Periodic: u(−l, t) = u(l, t), ux(−l, t) = ux(l, t) → periodic extension → full Fourier series.
22.2 The complex form of the full Fourier series
Instead of writing the Fourier series in terms of cosines and sines, one can use complex exponential functions. Recall the Euler’s formula,
eiθ = cos θ+ i sin θ, (26)
from which one can get the formula for e−iθ in terms of cosine and sine by plugging in −θ. Solving from these two equations, we have the expressions of sine and cosine in terms of the complex exponentials
cos θ = eiθ + e−iθ
2 , sin θ =
eiθ − e−iθ
2i . (27)
So instead of (18), one can write the Fourier expansion in terms of the functions einπx/l and e−inπx/l, themselves eigenfunctions corresponding to the eigenvalue λn = n2π2/l2.
The convenience of the complex form is in that the Fourier series can be written compactly as
φ(x) = ∞∑
n=−∞
Cne inπx/l, (28)
} = {
1, e±inπx/l : n = 1,2, . . . } , (29)
replacing the set (19). In order to find the coefficients in the expansion (28), we first need to show that the set (29) is orthogonal, after
which the coefficients can be found by taking the dot product of the series with the corresponding eigenfunction. No- tice that the functions in the set (29) are complex valued. For complex…