# Serie de Fourier

La serie de Fourier nos permite representar cualquier función periódica mediante una suma de senos y cosenos.
Función periódica:
${\begin{aligned}&f(t+T)=f(t)\\&f(t+kT)=f(t),\forall k\in \mathbb {Z} \\\end{aligned}}$

## Representación trigonométrica

${\begin{aligned}&f(t)={\frac {a_{0}}{2}}+\sum \limits _{n=1}^{\infty }{a_{n}\cdot \cos \left({\frac {2\pi n}{T}}t\right)+}\sum \limits _{n=1}^{\infty }{b_{n}\cdot \sin \left({\frac {2\pi n}{T}}t\right)}{\text{ }}\\&\omega ={\frac {2\pi }{T}}\\&a_{n}={\frac {2}{T}}\int \limits _{{-T}/{2}\;}^{{T}/{2}\;}{f(t)\cos \left({\frac {2\pi n}{T}}t\right)}\partial t\\&b_{n}={\frac {2}{T}}\int \limits _{{-T}/{2}\;}^{{T}/{2}\;}{f(t)\sin \left({\frac {2\pi n}{T}}t\right)}\partial t\\&a_{0}={\frac {2}{T}}\int \limits _{{-T}/{2}\;}^{{T}/{2}\;}{f(t)\partial t}\\\end{aligned}}$
También tiene una REPRESENTACION EXPONENCIAL como se verá mas adelante
Teorema de Dirichlet
$f(t+T)=f(t)=\left\{{\begin{aligned}&{\text{continua trozos }}I=\left[-^{T}\!\!\diagup \!\!_{2}\;,^{T}\!\!\diagup \!\!_{2}\;\right]\\&\forall t_{0}\in I,{\text{ }}{\underset {t\to t_{0}}{\mathop {\lim } }}\,{\text{ }}f(t){\text{ finito}}\\\end{aligned}}\right.$
Por lo que la serie de Fourier correspondiente a f es convergente y su suma vale:
${\begin{aligned}&f(t),{\text{ en punto continuo}}\\&{\frac {f(t^{+})+f(t^{-})}{2}},{\text{ en punto discontinuo}}\\\end{aligned}}$
Observaciones:
${\begin{aligned}&f(t){\text{ par }}f(t)=f(-t){\text{ }}\\&{\text{ }}\int \limits _{-b}^{b}{f(t)\partial t}=2\int \limits _{0}^{b}{f(t)\partial t}\\&f(t){\text{ impar }}f(t)=-f(-t){\text{ }}\\&{\text{ }}\int \limits _{-b}^{b}{f(t)\partial t}=0\\\end{aligned}}$
| f(t) | g(t) | f(t)xg(t) o f(t)/g(t) |
| Par | Par | Par |
| Impar | Impar | Par |
| Par | Impar | Impar |

## Forma exponencial o compleja de la serie de Fourier

${\begin{aligned}&f(t)=\sum \limits _{k=-\infty }^{\infty }{C_{k}\cdot e^{j{\frac {2\pi }{T}}kt}}\\&C_{k}={\frac {1}{T}}\int \limits _{^{-T}\!\!\diagup \!\!_{2}\;}^{^{T}\!\!\diagup \!\!_{2}\;}{f(t)\cdot e^{-j{\frac {2\pi }{T}}kt}\partial t}\\\end{aligned}}$
Demostración parcial:
${\begin{aligned}&\left\{{\begin{aligned}&a_{n}\\&b_{n}\\\end{aligned}}\right\}={\frac {2}{T}}\int \limits _{{-T}/{2}\;}^{{T}/{2}\;}{f(t)\left\{{\begin{aligned}&\cos \left(\omega nt\right)\\&\sin \left(\omega nt\right)\\\end{aligned}}\right\}}\partial t\\&f(t)={\frac {a_{0}}{2}}+\sum \limits _{n=1}^{\infty }{a_{n}\cdot \underbrace {\cos \left(\omega nt\right)} _{\frac {e^{j\omega \cdot nt}+e^{-j\omega \cdot nt}}{2}}+}\sum \limits _{n=1}^{\infty }{b_{n}\cdot \underbrace {\sin \left(\omega nt\right)} _{\frac {e^{j\omega \cdot nt}-e^{-j\omega \cdot nt}}{2j}}}{\text{ }}\omega {\text{=}}{\frac {2\pi }{T}}\\&f(t)={\frac {a_{0}}{2}}+\sum \limits _{n=1}^{\infty }{e^{j\omega nt}\left({\frac {a_{n}}{2}}-j{\frac {b_{n}}{2}}\right)+}e^{-j\omega nt}\left({\frac {a_{n}}{2}}+j{\frac {b_{n}}{2}}\right)\\&{\frac {a_{n}}{2}}\pm j{\frac {b_{n}}{2}}={\frac {1}{T}}\int \limits _{{-T}/{2}\;}^{{T}/{2}\;}{f(t)\left[\cos \left(\omega nt\right)\pm j\sin \left(\omega nt\right)\right]}\partial t={\frac {1}{T}}\int \limits _{{-T}/{2}\;}^{{T}/{2}\;}{f(t)e^{\pm j\omega nt}}\partial t\\\end{aligned}}$
Ejercicio de ejemplo:(FALTA DIBUJO DE MATHEMATICA)
${\begin{aligned}&f(t)=\left\{{\begin{aligned}&1,{\text{ }}-1\leq t\leq 0\\&-1,{\text{ }}0<t<1\\\end{aligned}}\right.{\text{ }}{\text{, }}f(t+2)=f(t),{\text{ funcion impar}}\\&\omega n={\frac {2\pi n}{T}}=\pi n\\&a_{0}=0{\text{ (por ser impar)}}\\&a_{n}={\frac {2}{T}}\int \limits _{{-T}/{2}\;}^{{T}/{2}\;}{\underbrace {\underbrace {f(t)} _{\text{impar}}\underbrace {\cos \left(\pi nt\right)} _{\text{par}}} _{\text{impar}}}\partial t=0\\&f(t)=\sum \limits _{n=1}^{\infty }{b_{n}\cdot \sin \left(\pi nt\right)}\\&b_{n}={\frac {2}{T}}\int \limits _{{-T}/{2}\;}^{{T}/{2}\;}{\underbrace {\underbrace {f(t)} _{\text{impar}}\underbrace {\sin \left({\frac {2\pi n}{T}}t\right)} _{\text{impar}}} _{\text{par}}}\partial t=2\cdot {\frac {2}{T}}\left.\int \limits _{0}^{{T}/{2}\;}{f(t)\sin \left({\frac {2\pi n}{T}}t\right)}\partial t\right|_{T=2}=2\int \limits _{0}^{1}{\underbrace {f(t)} _{-1}\sin \left(\pi nt\right)}\partial t\\&=-2\int \limits _{0}^{1}{\sin \left(\pi nt\right)}\partial t=-2\left.\left({\frac {-\cos \left(\pi nt\right)}{\pi n}}\right)\right|_{0}^{1}={\frac {2}{\pi n}}\left(\underbrace {\cos(\pi n)} _{\left(-1\right)^{n}=\pm 1}-1\right)=\left\{{\begin{aligned}&0,{\text{ }}n=2k,k\in \mathbb {N} \\&{\frac {-4}{\pi n}},n=1,3,5...=2k+1,k\in \mathbb {N} \\\end{aligned}}\right.\\&f(t)=\sum \limits _{n=1}^{\infty }{\left({\frac {-4}{\pi n}}\right)}\cdot \sin(\pi nt){\text{ para n impar }}=\sum \limits _{k=0}^{\infty }{\left({\frac {-4}{\pi (2k+1)}}\right)}\cdot \sin(\pi (2k+1)t)\\&{\text{ }}\\\end{aligned}}$
${\begin{aligned}&Ej:\cos(t+1);{\text{ }}T=2\pi \\&f(t)=\sum \limits _{n=-\infty }^{\infty }{C_{n}\cdot e^{j{\frac {2\pi }{T}}nt}}\\&C_{n}={\frac {1}{T}}\int \limits _{^{-T}\!\!\diagup \!\!_{2}\;}^{^{T}\!\!\diagup \!\!_{2}\;}{f(t)\cdot e^{-j{\frac {2\pi }{T}}nt}\partial t}\\&\omega \cdot n={\frac {2\pi }{T}}\cdot n={\frac {2\pi }{2\pi }}\cdot n=n{\text{; }}f(t)=\sum \limits _{n=-\infty }^{\infty }{C_{n}\cdot e^{jnt}}\\&f(t)=\cos(t+1)={\frac {e^{j(t+1)}+e^{-j(t+1)}}{2}}={\frac {1}{2}}e^{j}\underbrace {e^{jt}} _{n=1}+{\frac {1}{2}}e^{-j}\underbrace {e^{-jt}} _{n=-1}\\&C_{1}={\frac {1}{2}}e^{j}=\tau _{-1}{\text{}\tau _{n}=C_{n}^{*})\\&C_{-1}={\frac {1}{2}}e^{-j}\\&C_{n}=0,\forall n\neq \pm 1\\\end{aligned}}$
(FALTA DIBUJO DE MATHEMATICA)
${\begin{aligned}&Ej:\\&f(t)=\left\{{\begin{aligned}&t,-1\leq t\leq 1\\&0,\left|t\right|>1\\\end{aligned}}\right.\\&f(t)=\sum \limits _{n=-\infty }^{\infty }{C_{n}\cdot e^{j\omega nt}}{\text{ }}\omega {\text{=}}{\frac {2\pi }{T=2}}=\pi \\&C_{n}={\frac {1}{T}}\int \limits _{^{-T}\!\!\diagup \!\!_{2}\;}^{^{T}\!\!\diagup \!\!_{2}\;}{f(t)\cdot e^{-j{\frac {2\pi }{T}}nt}\partial t=}{\frac {1}{2}}\cdot \int \limits _{-1}^{+1}{t\cdot e^{-j\pi nt}\partial t\to }\\&\left\{{\begin{aligned}&u=t{\text{ }}\partial u=\partial t\\&\partial v=e^{-j\pi nt}\partial t{\text{ }}v={\frac {-1}{j\pi n}}e^{-j\pi nt}\\\end{aligned}}\right\}\\&\left.{\frac {1}{2}}{\frac {-t}{j\pi n}}e^{-j\pi nt}\right|_{-1}^{1}-{\frac {1}{2}}{\frac {-1}{j\pi n}}\int \limits _{-1}^{+1}{e^{-j\pi nt}\partial t=}\left.{\frac {1}{2}}{\frac {-t}{j\pi n}}e^{-j\pi nt}\right|_{-1}^{1}-{\frac {1}{2}}{\frac {-1}{j\pi n}}\left.{\frac {e^{-j\pi nt}}{-j\pi n}}\right|_{-1}^{1}=\\&{\frac {-1}{2}}{\frac {\overbrace {e^{-j\pi n}} ^{\left(-1\right)^{n}}-\left(-1\right)\cdot \overbrace {e^{+j\pi n}} ^{\left(-1\right)^{n}}}{j\pi n}}-{\frac {1}{2}}\left.{\frac {e^{-j\pi nt}}{\left(j\pi n\right)^{2}}}\right|_{-1}^{1}={\frac {-j\left(-1\right)^{n}}{\pi n}}-{\frac {1}{2}}{\frac {\overbrace {e^{-j\pi n}-e^{-j\pi n}} ^{0}}{\left(j\pi n\right)^{2}}}={\frac {-j\left(-1\right)^{n}}{\pi n}}{\text{ }}\forall n\neq 0\\&C_{0}={\frac {1}{T}}\int \limits _{^{-T}\!\!\diagup \!\!_{2}\;}^{^{T}\!\!\diagup \!\!_{2}\;}{f(t)\partial t={\frac {1}{2}}\underbrace {\int \limits _{-1}^{1}{t\partial t}} _{\text{IMPAR}}}=0\\&f(t)=\left\{{\begin{aligned}&\sum \limits _{n=-\infty }^{\infty }{{\frac {-j\left(-1\right)^{n}}{\pi n}}\cdot e^{j\pi nt},\forall n\neq 0}\\&0,{\text{ }}n=0\\\end{aligned}}\right.\\\end{aligned}}$
Probemos ahora a poner esta misma función en la forma trigonometrica:
${\begin{aligned}&f(t)=\left\{{\begin{aligned}&\sum \limits _{n=-\infty }^{\infty }{{\frac {-j\left(-1\right)^{n}}{\pi n}}\cdot e^{j\pi nt},\forall n\neq 0}\\&0,{\text{ }}n=0\\\end{aligned}}\right.\to {\frac {-j\left(-1\right)^{n}}{\pi n}}={\frac {2}{2}}\cdot {\frac {\left(-1\right)^{n}}{j\pi n}}={\frac {1}{2j}}\cdot {\frac {2\left(-1\right)^{n}}{\pi n}}\to \sin \omega t={\frac {e^{j\omega t}-e^{-j\omega t}}{2j}}\\&f(t)=\underbrace {{\frac {1}{2j}}{\frac {-2}{\pi }}e^{j\pi t}} _{n=1}+\underbrace {{\frac {1}{2j}}{\frac {2}{\pi }}e^{-j\pi nt}} _{n=-1}+\underbrace {{\frac {1}{2j}}{\frac {2}{\pi 2}}e^{j\pi 2t}} _{n=2}+\underbrace {{\frac {1}{2j}}\cdot {\frac {2}{\pi 2}}e^{-j\pi 2t}} _{n=-2}+\underbrace {{\frac {1}{2j}}{\frac {-2}{\pi 3}}e^{j\pi 3t}} _{n=3}+\underbrace {{\frac {1}{2j}}{\frac {2}{\pi 3}}e^{-j\pi 3t}} _{n=-3}+...\\&f(t)={\frac {-2}{\pi }}\sin \left(\pi t\right)+{\frac {1}{\pi }}\sin \left(2\pi t\right)+{\frac {-2}{\pi 3}}\sin \left(3\pi t\right)+{\frac {1}{2\pi }}\sin \left(4\pi t\right)+...+\sum \limits _{n=1}^{\infty }{\frac {2\left(-1\right)^{n}}{\pi n}}\cdot \sin(n\pi t)\\\end{aligned}}$
Como reglas generales para saber si hemos hecho bien la serie de Fourier, tenemos:
* En la forma trigonometrica (sumas de senoides) todos los coeficientes deben ser números reales (no puede haber j), ya que, como es lógico, nuestra función a representar es real
* Si los coeficientes de mismo valor pero signo opuestos (+-1,+-2,etc..) no son iguales o complejos conjugados es que hemos hecho algo mal
Para este ejercicio en concreto al ser la función impar, el sumatorio estará compuesto por funciones impares, esto es, sin.