Assignment 1 Sol
Assignment 1 Sol
IIT, KANPUR
Your October
18th text he. , 2020 3030
a) f (x) = |x|
b) f (x) = | sin(x)|
c) f (x) = sin |x|
d) f (x) = x2 .
Which one of the above functions admits Fourier series expansion ? (It is understood that the
functions are extended 2π periodically to whole of real line). Write down their Fourier series
expansion.
Solution (a):
−x, x ≤ 0
f (x) = |x| = .
x, x > 0
Since left hand and right hand derivatives exist at all the points of (−π, π).
∞
X ∞
X
=⇒ |x| = a0 + an cos nx + bn sin nx.
n=1 n=1
where
Z π
1
a0 = |x|dx.
2π −π
1 π
Z
an = f (x) cos(nx)dx.
π −π
Z π
1
bn = f (x) sin(nx)dx.
π −π
Solving
Z 0 Z π
1 1
a0 = (−x)dx + xdx
2π −π 2π 0
0 π
−x2 x2
1 1
= +
2π 2 −π 2π 2 0
1 π2
1 π2
= +
2π 2 2π 2
π2 π
= =
2π 2
1
Z π Z π
1 2 2
an = |x| cos(nx)dx = |x| cos(nx)dx = ((−1)n − 1).
π −π π 0 πn2
bn = 0, because the integrand f (x) = |x| sin(nx) is an odd function on (π, π).
This implies,
∞
π X 2
|x| = + ((−1)n − 1) cos(nx), ∀x ∈ (−π, π).
2 n=1 nπ 2
Solution (b): f (x) = |sinx| admits left hand derivative and right hand
derivative at all the points. Hence proceed as previous exercise.
Solution (b): Notice that sin(|x|) is sin(x) if x ∈ [0, π) and − sin(x) if x ∈
(−π, 0). Or in other words, sin(|x|) = | sin(x)|.. This is already done in the
previous part.
Solution (d): Notice the function f (x) = x2 is infinitely differentiable.
Proceed as part (a).
Problem 3: First notice that π is period of | sin(x)|. This is because
We have to show that it is the fundamental period. Assume that there exist
a number p ∈ (0, π),which is a period of | sin(x)|. Then by definition
2
Problem 3: Consider the function f (x) = 1 on (− π2 , π2 ), and f (x) = 0 on
[−π, − π2 ]∪[ π2 , π]. Calculate its Fourier coefficients. Hence evaluate the following
sum:
∞
X sin2 ( nπ
2 )
2
.
n=1
n
Solution
Z π
1 1
a0 = f (x)dx = .
2π π 2
Since f is an even function, clearly bn = 0, ∀n.
Z π/2
1 2
an = cos(nx)dx = sin(nπ/2).
π −π/2 nπ
Clearly f is a differentiable function except two points (x = − π2 , π2 ), therefore
we can apply Parseval’s Identity.
∞ ∞
π
sin2 ( nπ
2 )
Z
1 X X
1= f 2 (x)dx = 2a20 + (a2n + b2n ) = 4/π 2 2
.
π −π n=1 n=1
n
2
Therefore the required sum is π /4.
Problem 4: Consider the function f (x) = | sin(x) + cos(x)| on real line.
Then,
a) f is a periodic function.
b) fundamental period of f is 2π.
c) f is a continuous function.
d) f is differentiable at x = 0
Solution (a) is true as f (x + 2π) = f (x), ∀x.
(b) is not true as π is the fundamental period, this can be easily verified
after expanding sin(x + π) and cos(x + π) in f (x + π).
(c) Yes, it is true. As it is composition of two continuous function. g(x) =
sin x + x and h(x) = |x|.
(d) is true. Note that in small a neighborhood of 0, the function is sin(x) +
cos(x) which is clearly differentiable at x = 0.
3
(a) not true. Consider the function defined by f (x) = 1 on R \ {0} and
f (0) = −1. Then clearly f is not periodic, whereas |f | is the constant function
one, which is periodic.
(b) is also not true as one can construct easy examples of discontinuous pe-
riodic functions. For example, consider the function f (x) = x on (0, 1] and then
extend it periodically on entire real line. Then clearly, all the integers are point
of discontinuity of f .
(c) is true as, the sin(t/3) is 6π periodic and the other one is 4π periodic.
Lowest common multilple of them which is 12π is a period for f . In fact this
will be the fundamental period. (why ?).
Solution Let us calculate the Fourier series of the function “x” on [π, π].
The coefficients a0 and an ’s are 0, as x and x cos(nx) are functions respectively.
1 π 2(−1)n
Z
bn = x sin(nx)dx = − .
π −π n
Integration by parts is used to calculate the above integral. Notice that the
function f satisfies all the conditions of Parseval’s Identity. Applying it we
obtain
∞
1 π 2
Z X
x dx = 2a20 + (a2n + b2n ).
π −π n=1
π2
This implies the required sum is 6 after trivial computations.
For the second part, clearly
∞ ∞ ∞ ∞ ∞
π2 X 1 X 1 X 1 X 1 X 1
= 2
= 2
+ 2
= 2
+ (1/4) .
6 n=1
n n=0
(2n + 1) n=1
(2n) n=0
(2n + 1) n=1
(n)2
Notice that the value of the last series is known. Therefore the required sum is
3π 2
4.6 .
4
Problem 7: Using the function f (x) = −x on x ∈ (−π, 0) and f (x) =
x − π on x ∈ [0, π), find
∞
X 1
.
n=1
(2n + 1)2
Solution Ensure yourself that f satisfies all the properties of Fourier series
expansion (main theorem).
First let us calculate all the Fourier coefficients.
Z 0 Z π
1 π2 π2
1 1
a0 = (−x)dx + (x − π)dx = + − π 2 = 0.
2π −π 2π 0 2π 2 2
1
R0 1
Rπ 2
an = π −π
{−x cos(nx)}dx + π 0
(x − π) cos(nx)dx = n2 π (cos(nπ) − 1).
Z 0 Z π
1 1
bn = {−x sin(nx)}dx + (x − π) sin(nx)dx = 0.
π −π π 0
5
September 27, 2023
Problem 8 Find the Fourier even half range series of the function f (x) = x
on the interval [0, L].
Solution: We have to calculate the Fourier coefficients for the arbitrary
length L. Since it is even series NO bn terms will be present or in other other
words bn = 0. We need to calculate
1 L
Z
a0 = f (x)dx = L/2.
L 0
finally since f (x) = x is a differentiable function on (0, L), we have for all
x ∈ (0, L).
∞
4L X 1 (2n + 1)xπ
x = L/2 − 2 cos .
π n=0 (2n + 1)2 L