# 7.2 Fourier Series

## Detailed Theory: Fourier Series

### **1. Introduction to Fourier Series**

#### **1.1 What is a Fourier Series?**

A Fourier series is a way to represent a periodic function as a sum of simple sine and cosine waves.

**Key Idea:** Any periodic function (repeating pattern) can be broken down into a sum of:

* Sine waves
* Cosine waves
* Constant term

#### **1.2 Why Use Fourier Series?**

1. **Simplify complex waves** into basic components
2. **Analyze signals** in engineering and physics
3. **Solve differential equations** more easily
4. **Filter signals** in electronics

#### **1.3 Basic Components**

A Fourier series has three types of terms:

1. **Constant term** (average value)
2. **Cosine terms** (even symmetry)
3. **Sine terms** (odd symmetry)

***

### **2. Periodic Functions**

#### **2.1 Definition**

A function $$f(x)$$ is periodic with period $$T$$ if:

$$
f(x + T) = f(x) \quad \text{for all } x
$$

**Examples:**

* Sine wave: $$\sin(x)$$ has period $$2\pi$$
* Square wave: Repeats every $$T$$
* Sawtooth wave: Repeats every $$T$$

#### **2.2 Common Periods**

1. **Fundamental period:** Smallest $$T > 0$$ for which $$f(x+T) = f(x)$$
2. **Angular frequency:** $$\omega = \frac{2\pi}{T}$$

***

### **3. Fourier Series Representation**

#### **3.1 General Form**

For a function $$f(x)$$ with period $$2L$$, the Fourier series is:

$$
f(x) = \frac{a\_0}{2} + \sum\_{n=1}^{\infty} \left\[ a\_n \cos\left(\frac{n\pi x}{L}\right) + b\_n \sin\left(\frac{n\pi x}{L}\right) \right]
$$

#### **3.2 Fourier Coefficients**

The coefficients are calculated as:

**Constant term:**

$$
a\_0 = \frac{1}{L} \int\_{-L}^{L} f(x) , dx
$$

**Cosine coefficients:**

$$
a\_n = \frac{1}{L} \int\_{-L}^{L} f(x) \cos\left(\frac{n\pi x}{L}\right) , dx, \quad n \geq 1
$$

**Sine coefficients:**

$$
b\_n = \frac{1}{L} \int\_{-L}^{L} f(x) \sin\left(\frac{n\pi x}{L}\right) , dx, \quad n \geq 1
$$

#### **3.3 Special Case: Period** $$2\pi$$

If $$f(x)$$ has period $$2\pi$$ ($$L = \pi$$):

$$
f(x) = \frac{a\_0}{2} + \sum\_{n=1}^{\infty} \left\[ a\_n \cos(nx) + b\_n \sin(nx) \right]
$$

With coefficients:

$$
a\_0 = \frac{1}{\pi} \int\_{-\pi}^{\pi} f(x) , dx
$$

$$
a\_n = \frac{1}{\pi} \int\_{-\pi}^{\pi} f(x) \cos(nx) , dx
$$

$$
b\_n = \frac{1}{\pi} \int\_{-\pi}^{\pi} f(x) \sin(nx) , dx
$$

***

### **4. Symmetry and Fourier Series**

#### **4.1 Even Functions**

**Definition:** $$f(-x) = f(x)$$ for all $$x$$

**Properties for Fourier series:**

* Cosine terms only
* $$b\_n = 0$$ for all $$n$$
* Simplified formulas:

$$
a\_0 = \frac{2}{L} \int\_{0}^{L} f(x) , dx
$$

$$
a\_n = \frac{2}{L} \int\_{0}^{L} f(x) \cos\left(\frac{n\pi x}{L}\right) , dx
$$

**Examples:** $$\cos(x)$$, $$x^2$$, $$|x|$$

#### **4.2 Odd Functions**

**Definition:** $$f(-x) = -f(x)$$ for all $$x$$

**Properties for Fourier series:**

* Sine terms only
* $$a\_n = 0$$ for all $$n$$
* Simplified formulas:

$$
b\_n = \frac{2}{L} \int\_{0}^{L} f(x) \sin\left(\frac{n\pi x}{L}\right) , dx
$$

**Examples:** $$\sin(x)$$, $$x$$, $$x^3$$

#### **4.3 Neither Even nor Odd**

If function has no symmetry:

* Both sine and cosine terms needed
* Use full formulas

***

### **5. Common Fourier Series Examples**

#### **5.1 Square Wave**

**Function:** Period $$2\pi$$

$$
f(x) = \begin{cases}
-1 & \text{if } -\pi < x < 0 \\
1 & \text{if } 0 < x < \pi
\end{cases}
$$

**Fourier series (odd function):**

$$
f(x) = \frac{4}{\pi} \left\[ \sin(x) + \frac{\sin(3x)}{3} + \frac{\sin(5x)}{5} + \cdots \right]
$$

$$
f(x) = \frac{4}{\pi} \sum\_{n=1}^{\infty} \frac{\sin((2n-1)x)}{2n-1}
$$

#### **5.2 Sawtooth Wave**

**Function:** $$f(x) = x$$ for $$-\pi < x < \pi$$, period $$2\pi$$

**Fourier series (odd function):**

$$
f(x) = 2 \left\[ \sin(x) - \frac{\sin(2x)}{2} + \frac{\sin(3x)}{3} - \frac{\sin(4x)}{4} + \cdots \right]
$$

$$
f(x) = 2 \sum\_{n=1}^{\infty} \frac{(-1)^{n+1} \sin(nx)}{n}
$$

#### **5.3 Triangle Wave**

**Function:** Even function, period $$2\pi$$

**Fourier series:**

$$
f(x) = \frac{\pi}{2} - \frac{4}{\pi} \left\[ \cos(x) + \frac{\cos(3x)}{9} + \frac{\cos(5x)}{25} + \cdots \right]
$$

$$
f(x) = \frac{\pi}{2} - \frac{4}{\pi} \sum\_{n=1}^{\infty} \frac{\cos((2n-1)x)}{(2n-1)^2}
$$

#### **5.4 Half-Wave Rectifier**

**Function:** $$f(x) = \sin(x)$$ for $$0 < x < \pi$$, $$0$$ for $$\pi < x < 2\pi$$

**Fourier series:**

$$
f(x) = \frac{1}{\pi} + \frac{1}{2} \sin(x) - \frac{2}{\pi} \left\[ \frac{\cos(2x)}{3} + \frac{\cos(4x)}{15} + \frac{\cos(6x)}{35} + \cdots \right]
$$

***

### **6. Convergence of Fourier Series**

#### **6.1 Dirichlet Conditions**

For Fourier series to converge to $$f(x)$$, the function must satisfy:

1. **Periodic:** $$f(x+T) = f(x)$$
2. **Finite number** of discontinuities in one period
3. **Finite number** of maxima/minima in one period
4. **Absolutely integrable:** $$\int\_{-L}^{L} |f(x)| , dx < \infty$$

#### **6.2 Pointwise Convergence**

At points where $$f(x)$$ is continuous:

$$
\text{Fourier series} \to f(x)
$$

At points where $$f(x)$$ has a jump discontinuity:

$$
\text{Fourier series} \to \frac{f(x^+) + f(x^-)}{2}
$$

where $$f(x^+)$$ is right-hand limit, $$f(x^-)$$ is left-hand limit.

#### **6.3 Gibbs Phenomenon**

Overshoot near discontinuities in partial sums.

**Important:** Even with more terms, overshoot doesn't disappear (about 9% of jump).

***

### **7. Complex Form of Fourier Series**

#### **7.1 Euler's Formula**

$$
e^{i\theta} = \cos\theta + i\sin\theta
$$

$$
\cos\theta = \frac{e^{i\theta} + e^{-i\theta}}{2}
$$

$$
\sin\theta = \frac{e^{i\theta} - e^{-i\theta}}{2i}
$$

#### **7.2 Complex Fourier Series**

For period $$2L$$:

$$
f(x) = \sum\_{n=-\infty}^{\infty} c\_n e^{i n\pi x / L}
$$

**Complex coefficients:**

$$
c\_n = \frac{1}{2L} \int\_{-L}^{L} f(x) e^{-i n\pi x / L} , dx
$$

**Relation to real coefficients:**

$$
c\_0 = \frac{a\_0}{2}
$$

$$
c\_n = \frac{a\_n - ib\_n}{2} \quad \text{for } n > 0
$$

$$
c\_{-n} = \frac{a\_n + ib\_n}{2} \quad \text{for } n > 0
$$

**Advantages:**

* More compact notation
* Easier for some calculations
* Useful in advanced applications

***

### **8. Parseval's Theorem**

#### **8.1 Energy Interpretation**

Parseval's theorem relates the average power of a function to its Fourier coefficients.

#### **8.2 Theorem Statement**

For Fourier series of $$f(x)$$ with period $$2L$$:

$$
\frac{1}{2L} \int\_{-L}^{L} \[f(x)]^2 , dx = \left(\frac{a\_0}{2}\right)^2 + \frac{1}{2} \sum\_{n=1}^{\infty} (a\_n^2 + b\_n^2)
$$

**In complex form:**

$$
\frac{1}{2L} \int\_{-L}^{L} |f(x)|^2 , dx = \sum\_{n=-\infty}^{\infty} |c\_n|^2
$$

#### **8.3 Applications**

1. **Signal power calculation**
2. **Checking Fourier series accuracy**
3. **Summing certain infinite series**

**Example:** For square wave:

$$
\frac{1}{\pi} \int\_{-\pi}^{\pi} \[f(x)]^2 , dx = 1 = \frac{8}{\pi^2} \left(1 + \frac{1}{9} + \frac{1}{25} + \cdots \right)
$$

This gives: $$\sum\_{n=1}^{\infty} \frac{1}{(2n-1)^2} = \frac{\pi^2}{8}$$

***

### **9. Fourier Series on Different Intervals**

#### **9.1 General Interval \[a, b]**

If function defined on $$\[a, b]$$ with $$b-a = 2L$$:

**Change of variable:** Let $$t = \frac{\pi(x-a)}{L}$$

Then Fourier series becomes:

$$
f(x) = \frac{a\_0}{2} + \sum\_{n=1}^{\infty} \left\[ a\_n \cos\left(\frac{n\pi(x-a)}{L}\right) + b\_n \sin\left(\frac{n\pi(x-a)}{L}\right) \right]
$$

**Coefficients:**

$$
a\_n = \frac{2}{b-a} \int\_{a}^{b} f(x) \cos\left(\frac{2n\pi(x-a)}{b-a}\right) , dx
$$

$$
b\_n = \frac{2}{b-a} \int\_{a}^{b} f(x) \sin\left(\frac{2n\pi(x-a)}{b-a}\right) , dx
$$

#### **9.2 Half-Range Expansions**

When function defined only on $$\[0, L]$$:

**a) Fourier Cosine Series (even extension)**

Extend as even function on $$\[-L, L]$$:

$$
f(x) = \frac{a\_0}{2} + \sum\_{n=1}^{\infty} a\_n \cos\left(\frac{n\pi x}{L}\right)
$$

$$
a\_n = \frac{2}{L} \int\_{0}^{L} f(x) \cos\left(\frac{n\pi x}{L}\right) , dx
$$

**b) Fourier Sine Series (odd extension)**

Extend as odd function on $$\[-L, L]$$:

$$
f(x) = \sum\_{n=1}^{\infty} b\_n \sin\left(\frac{n\pi x}{L}\right)
$$

$$
b\_n = \frac{2}{L} \int\_{0}^{L} f(x) \sin\left(\frac{n\pi x}{L}\right) , dx
$$

***

### **10. Applications of Fourier Series**

#### **10.1 Signal Processing**

1. **Filter design:** Remove unwanted frequencies
2. **Audio compression:** MP3, AAC formats
3. **Image compression:** JPEG format

#### **10.2 Solving Differential Equations**

**Heat equation:** $$\frac{\partial u}{\partial t} = k \frac{\partial^2 u}{\partial x^2}$$

**Wave equation:** $$\frac{\partial^2 u}{\partial t^2} = c^2 \frac{\partial^2 u}{\partial x^2}$$

**Method:**

1. Assume solution as Fourier series
2. Substitute into equation
3. Solve for coefficients

#### **10.3 Electrical Engineering**

1. **AC circuit analysis:** Non-sinusoidal voltages/currents
2. **Power calculations:** For non-sinusoidal waveforms
3. **Harmonic analysis:** Identify frequency components

#### **10.4 Physics**

1. **Quantum mechanics:** Wave functions
2. **Optics:** Diffraction patterns
3. **Vibrations:** Mechanical systems

***

### **11. Important Formulas Summary**

#### **11.1 Fourier Series (Period 2L)**

$$
f(x) = \frac{a\_0}{2} + \sum\_{n=1}^{\infty} \left\[ a\_n \cos\left(\frac{n\pi x}{L}\right) + b\_n \sin\left(\frac{n\pi x}{L}\right) \right]
$$

$$
a\_0 = \frac{1}{L} \int\_{-L}^{L} f(x) , dx
$$

$$
a\_n = \frac{1}{L} \int\_{-L}^{L} f(x) \cos\left(\frac{n\pi x}{L}\right) , dx
$$

$$
b\_n = \frac{1}{L} \int\_{-L}^{L} f(x) \sin\left(\frac{n\pi x}{L}\right) , dx
$$

#### **11.2 Even Functions**

$$
b\_n = 0
$$

$$
a\_n = \frac{2}{L} \int\_{0}^{L} f(x) \cos\left(\frac{n\pi x}{L}\right) , dx
$$

#### **11.3 Odd Functions**

$$
a\_n = 0
$$

$$
b\_n = \frac{2}{L} \int\_{0}^{L} f(x) \sin\left(\frac{n\pi x}{L}\right) , dx
$$

#### **11.4 Complex Form**

$$
f(x) = \sum\_{n=-\infty}^{\infty} c\_n e^{i n\pi x / L}
$$

$$
c\_n = \frac{1}{2L} \int\_{-L}^{L} f(x) e^{-i n\pi x / L} , dx
$$

#### **11.5 Parseval's Theorem**

$$
\frac{1}{2L} \int\_{-L}^{L} \[f(x)]^2 , dx = \left(\frac{a\_0}{2}\right)^2 + \frac{1}{2} \sum\_{n=1}^{\infty} (a\_n^2 + b\_n^2)
$$

***

### **12. Solved Examples**

#### **Example 1:** Basic Fourier Series

Find Fourier series for $$f(x) = x^2$$ on $$\[-\pi, \pi]$$

**Solution:** Since $$f(x)$$ is even, $$b\_n = 0$$

$$
a\_0 = \frac{1}{\pi} \int\_{-\pi}^{\pi} x^2 , dx = \frac{2}{\pi} \int\_{0}^{\pi} x^2 , dx = \frac{2}{\pi} \cdot \frac{\pi^3}{3} = \frac{2\pi^2}{3}
$$

$$
a\_n = \frac{1}{\pi} \int\_{-\pi}^{\pi} x^2 \cos(nx) , dx = \frac{2}{\pi} \int\_{0}^{\pi} x^2 \cos(nx) , dx
$$

Integration by parts gives:

$$
a\_n = \frac{4(-1)^n}{n^2}
$$

Thus:

$$
f(x) = \frac{\pi^2}{3} + 4 \sum\_{n=1}^{\infty} \frac{(-1)^n}{n^2} \cos(nx)
$$

#### **Example 2:** Square Wave

Find Fourier series for:

$$
f(x) = \begin{cases}
0 & \text{if } -\pi < x < 0 \\
1 & \text{if } 0 < x < \pi
\end{cases}
$$

**Solution:**

$$
a\_0 = \frac{1}{\pi} \int\_{-\pi}^{\pi} f(x) , dx = \frac{1}{\pi} \int\_{0}^{\pi} 1 , dx = 1
$$

$$
a\_n = \frac{1}{\pi} \int\_{-\pi}^{\pi} f(x) \cos(nx) , dx = \frac{1}{\pi} \int\_{0}^{\pi} \cos(nx) , dx = 0
$$

$$
b\_n = \frac{1}{\pi} \int\_{-\pi}^{\pi} f(x) \sin(nx) , dx = \frac{1}{\pi} \int\_{0}^{\pi} \sin(nx) , dx
$$

$$
b\_n = \frac{1}{\pi} \left\[ -\frac{\cos(nx)}{n} \right]\_{0}^{\pi} = \frac{1 - (-1)^n}{n\pi}
$$

Thus:

$$
f(x) = \frac{1}{2} + \frac{2}{\pi} \left\[ \sin(x) + \frac{\sin(3x)}{3} + \frac{\sin(5x)}{5} + \cdots \right]
$$

#### **Example 3:** Using Symmetry

Find Fourier cosine series for $$f(x) = x$$ on $$\[0, \pi]$$

**Solution:** Even extension to $$\[-\pi, \pi]$$:

$$
a\_0 = \frac{2}{\pi} \int\_{0}^{\pi} x , dx = \frac{2}{\pi} \cdot \frac{\pi^2}{2} = \pi
$$

$$
a\_n = \frac{2}{\pi} \int\_{0}^{\pi} x \cos(nx) , dx
$$

Integration gives:

$$
a\_n = \frac{2\[(-1)^n - 1]}{\pi n^2}
$$

Thus:

$$
f(x) = \frac{\pi}{2} - \frac{4}{\pi} \left\[ \cos(x) + \frac{\cos(3x)}{9} + \frac{\cos(5x)}{25} + \cdots \right]
$$

***

### **13. Exam Tips and Common Mistakes**

#### **13.1 Common Mistakes**

1. **Wrong interval:** Check period and integration limits
2. **Ignoring symmetry:** Always check if function is even/odd
3. **Constant term:** $$a\_0$$ divided by 2 in series
4. **Integration errors:** Double-check integration by parts
5. **Missing n=0 case:** Treat $$a\_0$$ separately

#### **13.2 Problem-Solving Strategy**

1. **Determine period** of function
2. **Check symmetry** (even/odd/neither)
3. **Choose appropriate formulas** based on symmetry
4. **Compute coefficients** carefully
5. **Write final series** in simplified form

#### **13.3 Quick Checks**

1. **Even function:** Only cosine terms
2. **Odd function:** Only sine terms
3. **Average value:** $$a\_0/2$$ is DC component
4. **Convergence:** At discontinuities, series converges to average of left/right limits
5. **Parseval's theorem:** Useful for verifying calculations

This comprehensive theory covers all essential aspects of Fourier series with practical examples and formulas, providing complete preparation for the entrance examination.
