I solved the following Sturm-Liouville Problem:
$\begin{matrix} w^{\prime \prime}(x) = \mu w(x), \\ w^{\prime}(0) = > w(1) = 0 \end{matrix}$
and found that the eigenvalues were $\displaystyle \mu_{n}= \left( \frac{\pi(2n-1)}{2} \right)^{2}$, $n=0,1,\cdots$
and that the corresponding eigenfunctions were $\displaystyle w_{n}=\cos \left(\frac{\pi(2n-1)}{2} \right)x$, $n = 0, 1, \cdots$
Now, in addition, I am being asked to do the following:
Let $f(x) = 1$ for $0<x<1$. Write a generalized Fourier series for $f(x)$ in terms of the eigenfunctions you just found. Discuss the convergence of this series.
Actually, the problem I have to do for homework is not this one. I'm trying this problem as an example before working on the assigned one, because this one has an answer in the back of the book. The answer it gives is the following:
$\displaystyle \tilde{f} \sim 1 + \frac{4}{\pi}\sum_{n=1}^{\infty}(-1)^{n+1}(2n-1)^{-1}\cos \left(n - \frac{1}{2}\right)\pi x$.
The series converges pointwise to the following extension of $f(x)$:
$\displaystyle \tilde{f} = \begin{cases} 1 & \text{if}\,|x|<1 \\ 0 & \text{if}\, 1< |x| < 2\end{cases}$
$\displaystyle \tilde{f} = \tilde{f}(x+4)$ for all $x$.
I figured that if I could do this problem, I could easily adapt the techniques to the problem I was assigned, which involves the same $f(x)$, but a different Sturm-Liouville Problem with different eigenvalues and eigenfunctions.
However, I don't even seem to be able to do that much.
My textbook is confusing me as to how I should go about finding the coefficients for the Fourier Series.
I tried using the following formulae for the coefficients:
$\displaystyle a_{n} = \frac{1}{L}\int_{-L}^{L} f(x) \cos \frac{n \pi x}{L} dx$, $n = 0, 1, \cdots$
$\displaystyle b_{n} = \frac{1}{L}\int_{-L}^{L} f(x) \sin \frac{n \pi x}{L}dx$, $n = 1, 2, \cdots$
using $L = 1$ and $f(x) = 1$, and integrating from $0$ to $1$. For the $a_{n}$, I got all zeroes, and for the $b_{n}$, I got $\displaystyle \frac{1-\cos(n \pi)}{n \pi}$, which means that
$\displaystyle b_{n} = \begin{cases} 0 & \text{if}\,n=\,\text{even integer} \\ 2/n\pi & \text{if}\, n=\, \text{odd integer}\end{cases}$
which will give me a Fourier series in terms of sines, when what I want is one in terms of cosines.
So, then, since the problem asked me to find a Fourier series in terms of the eigenfunctions of the Sturm-Liouville Problem, I tried doing the same thing but with
$\displaystyle c_{n} = \frac{1}{L}\int_{-L}^{L} f(x) \cos \frac{\left(n \pi - \frac{1}{2}\right) x}{L} dx$, $n = 0, 1, \cdots$
$\displaystyle d_{n} = \frac{1}{L}\int_{-L}^{L} f(x) \sin \frac{\left(n \pi - \frac{1}{2}\right) x}{L} dx$, $n = 1, 2 \cdots$
I was in the middle of working on $c_{n}$ when I got to the end and realized I'm going to get all zeros again. And have gotten discouraged and haven't even started working on $d_{n}$ yet. I feel extremely discouraged and like I keep sending myself off on wild goose chases to find these coefficients. Obviously, I don't know Fourier Series, and would like some help from someone who does.
Again, this is not a homework problem, and I learn very, very well from either working out or seeing worked out example problems. This is what I was trying to do with this problem, so don't worry about giving away too many details. From how clueless I am right now, the more details the better!
Thank you.
HINT:
The eigenfunctions $\cos((n-1/2)\pi x)$ form a complete orthogonal set on $[0,1]$.
Therefore, we can expand a function $f(x)$ as
$$f(x) =\sum_{n=1}^{\infty}A_n \cos((n-1/2)\pi x)$$
where $A_n$ is given by
$$A_n=2\int_0^1 f(x)\cos((n-1/2)\pi x)\,dx$$.
Now, set $f(x)=1$.