I am trying to find the Fourier series of $f(x)=a\cos^{2}(b(x-c))+d$. I have already done this for $b=2$ which yields a simple result. For the general case, the coefficients $a_{n}$ and $b_{n}$ become much more complicated. So far, after solving for the first five $a_{n}$ terms it is clear that there are two distinct patterns for $a_{2k+1}$ and $a_{2k}$ where $k=1,2,3,\dots$ It seems like the series for this $f(x)$ must have already been worked out but I cannot seem to find it. Does anyone know of a source with the solution?
Fourier Series of $a\cos^{2}(b(x-c))+d$
54 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
You can rearrange the function a bit with a few trig identities to look like this:
$f(x)=\frac{a}{2}+d+\frac{a}{2}\cos{(2bc)}\cos{(2bx)}+\frac{a}{2}\sin{(2bc)}\sin{(2bx)}$
For the case where $2b\in \mathbb{N}$ this is the Fourier Series and no more work is required.
For the case where $2b\notin\mathbb{N}$ the expressions for $a_0, a_k$ and $b_k$ are going to be kind of messy looking, but the integrals should be straightforward if you use symmetry properties and more trig identities.
For instance:
$a_0 = \frac{1}{2\pi}\int_{-\pi}^{\pi}\left(\frac{a}{2}+d+\frac{a}{2}\cos{(2bc)}\cos{(2bx)}+\frac{a}{2}\sin{(2bc)}\sin{(2bx)}\right)dx$
can be simplified (since the first two terms are even functions, and the third term is an odd function) to:
$a_0=\frac{1}{\pi}\int_0^\pi\left(\frac{a}{2}+d+\frac{a}{2}\cos{(2bc)}\cos{(2bx)}\right)dx$,
$a_k$ and $b_k$ can be simplified similarly to the point where ultimately the integrals you have to compute are:
$\int_0^\pi\cos{(2bx)}\cos{(kx)}dx$, and $\int_0^\pi\sin{(2bx)}\sin{(kx)}dx$
These can be handled nicely by using the trig identities:
$\cos{a}\cos{b}=\frac{1}{2}\left(\cos{(a-b)}+\cos{(a+b)}\right)$, and
$\sin{a}\sin{b}=\frac{1}{2}\left(\cos{(a-b)}-\cos{(a+b)}\right)$
Consider a periodic function $f(x)$. The Fourier series representation of $f(x)$ is given by
\begin{equation} f(x) = \frac{a_{0}}{2}+\sum_{n=1}^{\infty}a_{n}\cos(nx)+\sum_{n=1}^{\infty}b_{n}\sin(nx) \end{equation}
where,
\begin{align} a_{0} &= \frac{1}{\pi}\int_{-\pi}^{\pi} f(x)\ \mathrm{d}x\\ a_{n} &= \frac{1}{\pi}\int_{-\pi}^{\pi} f(x)\cos(nx)\ \mathrm{d}x\\ b_{n} &= \frac{1}{\pi}\int_{-\pi}^{\pi} f(x)\sin(nx)\ \mathrm{d}x \end{align}
Now consider the function $f(x)=a\cos^{2}(b(x-c))+d$. The power of the cosine in $f(x)$ can be reduced using the trigonometric identity $\cos^2 x=\frac{1}{2}(1+\cos 2x)$ to give
\begin{equation} f(x) = \frac{a}{2}\Bigr(1+\cos(2b(x-c))\Bigl)+d \end{equation}
From here we use the above formulae to find Fourier coefficients. For $a_{0}$, the integral solution can be found here to give
\begin{align} a_{0} &= \frac{1}{\pi}\int_{-\pi}^{\pi} \left(\frac{a}{2}\Bigr(1+\cos(2b(x-c))\Bigl)+d\right)\ \mathrm{d}x\\ &= a+2d+\frac{a}{4\pi b}\left( \sin(2b(\pi-c))+\sin(2b(\pi+c)) \right) \end{align}
Simplifying $a_{0}$ we get
\begin{equation} a_{0} = a+2d+\frac{a}{2\pi b}\sin(2\pi b)\cos(2bc) \end{equation}
Similarly, $a_{n}$ can be found by substituting $f(x)$ into the equation for $a_{n}$ above. Simplifying yields
\begin{equation} a_{n} = \frac{1}{\pi}\left[\int_{-\pi}^{\pi} \left(\frac{a}{2}+d\right)\cos(nx) \ \mathrm{d}x+\frac{a}{2}\int_{-\pi}^{\pi}\cos(2b(x-c))\cos(nx) \ \mathrm{d}x\right] \end{equation}
The solution to the first integral can be found here. Turning our attention to the second integral, we employ formula $2.532.3$ in Gradshteyn & Ryzhik ($9^{\text{th}}$ ed.) to get
\begin{equation} a_{n} = \frac{1}{\pi}\left[\left(\frac{a}{2}+d\right)\frac{\sin(\pi n)}{n} + \frac{a\,\cos(2bc)}{2}\left(\frac{\sin(\pi(2b-n))}{2b-n}+\frac{\sin(\pi(2b+n))}{2b+n}\right)\right] \end{equation}
Simplifying $a_{n}$ we get
\begin{equation} a_{n} = \frac{4ab}{\pi}\cos(2bc)\sin(\pi b)\cos(\pi b)\frac{(-1)^{n}}{4b^{2}-n^{2}} \quad \text{for} \ 4b^{2}\neq n^{2} \end{equation} Now, for $b_{n}$ we simply replace all instances of $\cos(nx)$ in the expression for $a_{n}$ with $\sin(nx)$ to yield
\begin{equation} b_{n} = \frac{1}{\pi}\left[\int_{-\pi}^{\pi} \left(\frac{a}{2}+d\right)\sin(nx) \ \mathrm{d}x+\frac{a}{2}\int_{-\pi}^{\pi}\cos(2b(x-c))\sin(nx) \ \mathrm{d}x\right] \end{equation}
The first integral in $b_{n}$ is zero since $\sin x$ is odd. For the second integral, we employ formula $2.532.2$ in Gradshteyn & Ryzhik ($9^{\text{th}}$ ed.) to get
\begin{equation} b_{n} = \frac{a\, \sin(2bc)}{2\pi}\left(\frac{\sin(\pi(2b-n))}{2b-n}-\frac{\sin(\pi(2b+n))}{2b+n}\right) \end{equation}
Simplifying $b_{n}$ we get
\begin{equation} b_{n} = \frac{2a}{\pi}\sin(2bc)\sin(\pi b)\cos(\pi b)\frac{n(-1)^{n}}{4b^{2}-n^{2}} \quad \text{for} \ 4b^{2}\neq n^{2} \end{equation}
Let $\Lambda(n)=\frac{2a}{\pi}\sin(\pi b)\cos(\pi b)\frac{(-1)^{n}}{4b^{2}-n^{2}}$, then
\begin{equation} f(x) = \frac{a_{0}}{2}+\sum_{n=1}^{\infty}\Lambda(n)\bigl[ 2b\cos(2bc)\cos(nx) + n\sin(2bc)\sin(nx)\bigr] \end{equation}
The figure below shows the successive approximation of $f(x)$ for $a=3.08$, $b=0.892$, $c=0.17$, and $d=0.96$.