Versione italiana
Esercizi sulla Serie di Fourier
Concetti Chiave
La serie di Fourier è un metodo per rappresentare una funzione periodica come somma di funzioni sinusoidali (seno e coseno). La forma generale della serie di Fourier per una funzione periodica f(t)f(t) con periodo TT è data da:
f(t) = a_0 + \sum_{n=1}^{\infty} \left( a_n \cos\left(\frac{2\pi n}{T} t\right) + b_n \sin\left(\frac{2\pi n}{T} t\right) \right)
f(t)=a0​+∑n=1∞​(an​cos(T2πn​t)+bn​sin(T2πn​t))
dove:
- a_0a0​ è il termine costante, calcolato come:
a_0 = \frac{1}{T} \int_0^T f(t) \, dt
a0​=T1​∫0T​f(t)dt
- a_nan​ e b_nbn​ sono i coefficienti di Fourier, calcolati come:
a_n = \frac{2}{T} \int_0^T f(t) \cos\left(\frac{2\pi n}{T} t\right) \, dt
an​=T2​∫0T​f(t)cos(T2πn​t)dt
b_n = \frac{2}{T} \int_0^T f(t) \sin\left(\frac{2\pi n}{T} t\right) \, dt
bn​=T2​∫0T​f(t)sin(T2πn​t)dt
Esercizi
Esercizio 1: Serie di Fourier di una Funzione Rettangolare
Considera una funzione rettangolare definita come:
f(t) =
\begin{cases}
1 & \text{se } 0 < t < T/2 \\
0 & \text{se } T/2 < t < T
\end{cases}
f(t)={10​se 0<t<T/2se T/2<t<T​
Calcola i coefficienti di Fourier a_0a0​, a_nan​ e b_nbn​.
Soluzione:
- Calcolo di a_0a0​:
a_0 = \frac{1}{T} \int_0^T f(t) \, dt = \frac{1}{T} \left( \int_0^{T/2} 1 \, dt + \int_{T/2}^T 0 \, dt \right) = \frac{1}{T} \cdot \frac{T}{2} = \frac{1}{2}
a0​=T1​∫0T​f(t)dt=T1​(∫0T/2​1dt+∫T/2T​0dt)=T1​⋅2T​=21​
- Calcolo di a_nan​:
a_n = \frac{2}{T} \int_0^T f(t) \cos\left(\frac{2\pi n}{T} t\right) \, dt = \frac{2}{T} \int_0^{T/2} \cos\left(\frac{2\pi n}{T} t\right) \, dt
an​=T2​∫0T​f(t)cos(T2πn​t)dt=T2​∫0T/2​cos(T2πn​t)dt
Calcoliamo l’integrale:
\int \cos\left(\frac{2\pi n}{T} t\right) \, dt = \frac{T}{2\pi n} \sin\left(\frac{2\pi n}{T} t\right)
∫cos(T2πn​t)dt=2πnT​sin(T2πn​t)
Quindi:
a_n = \frac{2}{T} \cdot \left[ \frac{T}{2\pi n} \sin\left(\frac{2\pi n}{T} t\right) \right]_0^{T/2} = \frac{2}{T} \cdot \frac{T}{2\pi n} \left( \sin\left(\pi n\right) - \sin(0) \right) = 0
an​=T2​⋅[2πnT​sin(T2πn​t)]0T/2​=T2​⋅2πnT​(sin(πn)−sin(0))=0
- Calcolo di b_nbn​:
b_n = \frac{2}{T} \int_0^T f(t) \sin\left(\frac{2\pi n}{T} t\right) \, dt = \frac{2}{T} \int_0^{T/2} \sin\left(\frac{2\pi n}{T} t\right) \, dt
bn​=T2​∫0T​f(t)sin(T2πn​t)dt=T2​∫0T/2​sin(T2πn​t)dt
Calcoliamo l’integrale:
\int \sin\left(\frac{2\pi n}{T} t\right) \, dt = -\frac{T}{2\pi n} \cos\left(\frac{2\pi n}{T} t\right)
∫sin(T2πn​t)dt=−2πnT​cos(T2πn​t)
Quindi:
b_n = \frac{2}{T} \cdot \left[-\frac{T}{2 \pi n} \cos\left(\frac{2\pi n}{T} t\right)\right]_0^{T/2}
bn​=T2​⋅[−2πnT​cos(T2πn​t)]0T/2​
Sostituendo i limiti:
b_n = \frac{2}{T} \cdot \left[-\frac{T}{2\pi n} \left( \cos\left(\pi n\right) - \cos(0) \right)\right]
bn​=T2​⋅[−2πnT​(cos(πn)−cos(0))]
= \frac{2}{T} \cdot \left[-\frac{T}{2\pi n} \left((-1)^n - 1\right)\right]
=T2​⋅[−2πnT​((−1)n−1)]
= -\frac{1}{\pi n} \left((-1)^n - 1\right)
=−πn1​((−1)n−1)
Quindi, i coefficienti di Fourier per la funzione rettangolare sono:
- a_0 = \frac{1}{2}a0​=21​
- a_n = 0an​=0
- b_n = -\frac{1}{\pi n} \left((-1)^n - 1\right)bn​=−πn1​((−1)n−1)
Esercizio 2: Serie di Fourier di una Funzione Triangolare
Considera una funzione triangolare definita su [-L, L][−L,L] con un’altezza di HH e una base di 2L2L.
Calcola i coefficienti di Fourier a_0a0​, a_nan​ e b_nbn​.
Soluzione:
- Calcolo di a_0a0​:
a_0 = \frac{1}{2L} \int_{-L}^{L} f(t) \, dt
a0​=2L1​∫−LL​f(t)dt
La funzione triangolare è simmetrica, quindi possiamo calcolare solo l’integrale da 00 a LL e moltiplicarlo per 2:
= \frac{1}{2L} \cdot 2 \int_0^{L} f(t) \, dt = \frac{1}{L} \int_0^{L} f(t) \, dt
=2L1​⋅2∫0L​f(t)dt=L1​∫0L​f(t)dt
L’area del triangolo è:
\text{Area} = \frac{1}{2} \cdot \text{base} \cdot \text{altezza} = \frac{1}{2} \cdot 2L \cdot H = LH
Area=21​⋅base⋅altezza=21​⋅2L⋅H=LH
Quindi:
a_0 = \frac{1}{L} \cdot LH = H
a0​=L1​⋅LH=H
- Calcolo di a_nan​:
a_n = \frac{1}{L} \int_{-L}^{L} f(t) \cos\left(\frac{n\pi t}{L}\right) \, dt
an​=L1​∫−LL​f(t)cos(Lnπt​)dt
Poiché la funzione triangolare è dispari, il termine coseno (che è pari) darà un contributo nullo:
a_n = 0
an​=0
- Calcolo di b_nbn​:
b_n = \frac{1}{L} \int_{-L}^{L} f(t) \sin\left(\frac{n\pi t}{L}\right) \, dt
bn​=L1​∫−LL​f(t)sin(Lnπt​)dt
Poiché la funzione triangolare è simmetrica rispetto all’asse yy, possiamo calcolare solo l’integrale da 00 a LL e moltiplicarlo per 2:
b_n = \frac{2}{L} \int_0^{L} f(t) \sin\left(\frac{n\pi t}{L}\right) \, dt
bn​=L2​∫0L​f(t)sin(Lnπt​)dt
Calcoliamo l’integrale. La funzione triangolare può essere espressa come:
f(t) = \frac{H}{L} t \quad \text{per } 0 < t < L
f(t)=LH​tper 0<t<L
Quindi:
b_n = \frac{2}{L} \int_0^{L} \frac{H}{L} t \sin\left(\frac{n\pi t}{L}\right) \, dt
bn​=L2​∫0L​LH​tsin(Lnπt​)dt
b_n = \frac{2H}{L^2} \left[ -\frac{L}{n\pi} t \cos\left(\frac{n\pi t}{L}\right) \right]_0^{L} + \frac{2H}{L^2} \cdot \frac{L^2}{(n\pi)^2} \left[ \sin\left(\frac{n\pi t}{L}\right) \right]_0^{L}
bn​=L22H​[−nπL​tcos(Lnπt​)]0L​+L22H​⋅(nπ)2L2​[sin(Lnπt​)]0L​
Continuando con il calcolo di b_nbn​:
b_n = \frac{2H}{L^2} \left[ -\frac{L}{n\pi} L \cos\left(n\pi\right) + 0 \right] + \frac{2H}{L^2} \cdot \frac{L^2}{(n\pi)^2} \left[ \sin\left(n\pi\right) - 0 \right]
bn​=L22H​[−nπL​Lcos(nπ)+0]+L22H​⋅(nπ)2L2​[sin(nπ)−0]
Poiché \cos(n\pi) = (-1)^ncos(nπ)=(−1)n e \sin(n\pi) = 0sin(nπ)=0, otteniamo:
b_n = \frac{2H}{L^2} \left[ -\frac{L^2}{n\pi} (-1)^n \right] + 0
bn​=L22H​[−nπL2​(−1)n]+0
Semplificando:
b_n = \frac{2H L}{n\pi} (-1)^{n+1}
bn​=nπ2HL​(−1)n+1
Risultati Finali
Per la funzione triangolare definita su [-L, L][−L,L] con altezza HH, i coefficienti di Fourier sono:
- a_0 = Ha0​=H
- a_n = 0an​=0
- b_n = \frac{2H L}{n\pi} (-1)^{n+1}bn​=nπ2HL​(−1)n+1
English version
Fourier Series Exercises
Key Concepts
Fourier series is a method of representing a periodic function as a sum of sinusoidal functions (sine and cosine). The general form of the Fourier series for a periodic function f(t)f(t) with period TT is given by:
f(t) = a_0 + \sum_{n=1}^{\infty} \left( a_n \cos\left(\frac{2\pi n}{T} t\right) + b_n \sin\left(\frac{2\pi n}{T} t\right) \right)
f(t)=a0​+∑n=1∞​(an​cos(T2πn​t)+bn​sin(T2πn​t))
where:
- a_0a0​ is the constant term, computed as:
a_0 = \frac{1}{T} \int_0^T f(t) \, dt
a0​=T1​∫0T​f(t)dt
- a_nan​ and b_nbn​ are the Fourier coefficients, computed as:
a_n = \frac{2}{T} \int_0^T f(t) \cos\left(\frac{2\pi n}{T} t\right) \, dt
an​=T2​∫0T​f(t)cos(T2πn​t)dt
b_n = \frac{2}{T} \int_0^T f(t) \sin\left(\frac{2\pi n}{T} t\right) \, dt
bn​=T2​∫0T​f(t)sin(T2πn​t)dt
Exercises
Exercise 1: Fourier Series of a Rectangular Function
Consider a rectangular function defined as:
f(t) =
\begin{cases}
1 & \text{if } 0 < t < T/2 \\
0 & \text{if } T/2 < t < T
\end{cases}
f(t)={10​if 0<t<T/2if T/2<t<T​
Calculate the Fourier coefficients a_0a0​, a_nan​ and b_nbn​.
Solution:
- Calculation of a_0a0​:
a_0 = \frac{1}{T} \int_0^T f(t) \, dt = \frac{1}{T} \left( \int_0^{T/2} 1 \, dt + \int_{T/2}^T 0 \, dt \right) = \frac{1}{T} \cdot \frac{T}{2} = \frac{1}{2}
a0​=T1​∫0T​f(t)dt=T1​(∫0T/2​1dt+∫T/2T​0dt)=T1​⋅2T​=21​
- Calculation of a_nan​:
a_n = \frac{2}{T} \int_0^T f(t) \cos\left(\frac{2\pi n}{T} t\right) \, dt = \frac{2}{T} \int_0^{T/2} \cos\left(\frac{2\pi n}{T} t\right) \, dt
an​=T2​∫0T​f(t)cos(T2πn​t)dt=T2​∫0T/2​cos(T2πn​t)dt
Let’s calculate the integral:
\int \cos\left(\frac{2\pi n}{T} t\right) \, dt = \frac{T}{2\pi n} \sin\left(\frac{2\pi n}{T} t\right)
∫cos(T2πn​t)dt=2πnT​sin(T2πn​t)
So:
a_n = \frac{2}{T} \cdot \left[ \frac{T}{2\pi n} \sin\left(\frac{2\pi n}{T} t\right) \right]_0^{T/2} = \frac{2}{T} \cdot \frac{T}{2\pi n} \left( \sin\left(\pi n\right) - \sin(0) \right) = 0
an​=T2​⋅[2πnT​sin(T2πn​t)]0T/2​=T2​⋅2πnT​(sin(πn)−sin(0))=0
- Calculation of b_nbn​:
b_n = \frac{2}{T} \int_0^T f(t) \sin\left(\frac{2\pi n}{T} t\right) \, dt = \frac{2}{T} \int_0^{T/2} \sin\left(\frac{2\pi n}{T} t\right) \, dt
bn​=T2​∫0T​f(t)sin(T2πn​t)dt=T2​∫0T/2​sin(T2πn​t)dt
Let’s calculate the integral:
\int \sin\left(\frac{2\pi n}{T} t\right) \, dt = -\frac{T}{2\pi n} \cos\left(\frac{2\pi n}{T} t\right)
∫sin(T2πn​t)dt=−2πnT​cos(T2πn​t)
So:
b_n = \frac{2}{T} \cdot \left[-\frac{T}{2 \pi n} \cos\left(\frac{2\pi n}{T} t\right)\right]_0^{T/2}
bn​=T2​⋅[−2πnT​cos(T2πn​t)]0T/2​
Substituting the limits:
b_n = \frac{2}{T} \cdot \left[-\frac{T}{2\pi n} \left( \cos\left(\pi n\right) - \cos(0) \right)\right]
bn​=T2​⋅[−2πnT​(cos(πn)−cos(0))]
= \frac{2}{T} \cdot \left[-\frac{T}{2\pi n} \left((-1)^n - 1\right)\right]
=T2​⋅[−2πnT​((−1)n−1)]
= -\frac{1}{\pi n} \left((-1)^n - 1\right)
=−πn1​((−1)n−1)
So, the Fourier coefficients for the rectangular function are:
- a_0 = \frac{1}{2}a0​=21​
- a_n = 0an​=0
- b_n = -\frac{1}{\pi n} \left((-1)^n - 1\right)bn​=−πn1​((−1)n−1)
Exercise 2: Fourier Series of a Triangular Function
Consider a triangular function defined on [-L, L][−L,L] with a height of HH and a base of 2L2L.
Compute the Fourier coefficients a_0a0​, a_nan​ and b_nbn​.
Solution:
- Calculating a_0a0​:
a_0 = \frac{1}{2L} \int_{-L}^{L} f(t) \, dt
a0​=2L1​∫−LL​f(t)dt
The triangular function is symmetric, so we can only calculate the integral from 00 to LL and multiply it by 2:
= \frac{1}{2L} \cdot 2 \int_0^{L} f(t) \, dt = \frac{1}{L} \int_0^{L} f(t) \, dt
=2L1​⋅2∫0L​f(t)dt=L1​∫0L​f(t)dt
The area of ​​the triangle is:
\text{Area} = \frac{1}{2} \cdot \text{base} \cdot \text{height} = \frac{1}{2} \cdot 2L \cdot H = LH
Area=21​⋅base⋅height=21​⋅2L⋅H=LH
So:
a_0 = \frac{1}{L} \cdot LH = H
a0​=L1​⋅LH=H
- Calculation of a_nan​:
a_n = \frac{1}{L} \int_{-L}^{L} f(t) \cos\left(\frac{n\pi t}{L}\right) \, dt
an​=L1​∫−LL​f(t)cos(Lnπt​)dt
Since the triangular function is odd, the cosine term (which is even) will give a null contribution:
a_n = 0
an​=0
- Calculation of b_nbn​:
b_n = \frac{1}{L} \int_{-L}^{L} f(t) \sin\left(\frac{n\pi t}{L}\right) \, dt
bn​=L1​∫−LL​f(t)sin(Lnπt​)dt
Since the triangular function is symmetric about the axis yy, we can just calculate the integral from 00 to LL and multiply it by 2:
b_n = \frac{2}{L} \int_0^{L} f(t) \sin\left(\frac{n\pi t}{L}\right) \, dt
bn​=L2​∫0L​f(t)sin(Lnπt​)dt
Let’s calculate the integral. The triangular function can be expressed as:
f(t) = \frac{H}{L} t \quad \text{for } 0 < t < L
f(t)=LH​tfor 0<t<L
So:
b_n = \frac{2}{L} \int_0^{L} \frac{H}{L} t \sin\left(\frac{n\pi t}{L}\right) \, dt
bn​=L2​∫0L​LH​tsin(Lnπt​)dt
b_n = \frac{2H}{L^2} \left[ -\frac{L}{n\pi} t \cos\left(\frac{n\pi t}{L}\right) \right]_0^{L} + \frac{2H}{L^2} \cdot \frac{L^2}{(n\pi)^2} \left[ \sin\left(\frac{n\pi t}{L}\right) \right]_0^{L}
bn​=L22H​[−nπL​tcos(Lnπt​)]0L​+L22H​⋅(nπ)2L2​[sin(Lnπt​)]0L​
Continuing with the calculation of b_nbn​:
b_n = \frac{2H}{L^2} \left[ -\frac{L}{n\pi} L \cos\left(n\pi\right) + 0 \right] + \frac{2H}{L^2} \cdot \frac{L^2}{(n\pi)^2} \left[ \sin\left(n\pi\right) - 0 \right]
bn​=L22H​[−nπL​Lcos(nπ)+0]+L22H​⋅(nπ)2L2​[sin(nπ)−0]
Since \cos(n\pi) = (-1)^ncos(nπ)=(−1)n and \sin(n\pi) = 0sin(nπ)=0, we get:
b_n = \frac{2H}{L^2} \left[ -\frac{L^2}{n\pi} (-1)^n \right] + 0
bn​=L22H​[−nπL2​(−1)n]+0
Simplifying:
b_n = \frac{2H L}{n\pi} (-1)^{n+1}
bn​=nπ2HL​(−1)n+1
Final Results
For the triangular function defined on [-L, L][−L,L] with height HH, the Fourier coefficients are:
- a_0 = Ha0​=H
- a_n = 0an​=0
- b_n = \frac{2H L}{n\pi} (-1)^{n+1}bn​=nπ2HL​(−1)n+1
Commenti
Posta un commento