Consider the step function:
$f(x) =\begin{cases} -1 & -\pi < x < 0 \\ 1 & 0 < x < \pi \end{cases} =\frac{4}{\pi} \sum_{n=1}^{\infty} \frac{\sin((2n-1)x)}{2n-1} $
Using the aforementioned series, find the Fourier series for:
$f(x) =\begin{cases} 0 & -c < x < 0 \\ 1 & 0 < x < c \end{cases} $
So, what I did was apply the adapted interval format and changed the argument of $\sin$ to $\frac{(2n-1)\pi x}{c}$ and then took the average of the series because the function shifted from -1 to 0. Giving me,
$\frac{1}{2} + \frac{2}{\pi} \sum_{n=1}^{\infty} \frac{\sin(\frac{(2n-1)\pi x}{c})}{2n-1}$
So, I think this is correct, although I am still rather unsure if the logic is sound. However, then the question goes on to ask me to find the Fourier series for,
$f(x) = |x|$
Mind you, this is all still part of the same problem, so I imagine that I would need to adapt my answer for the step function somehow, but I have no idea where to begin. Any help is greatly appreciated.
Your approach for the first part looks fine. For the second one, to get the Fourier series of $f(x) = |x|$, first see if you can figure out the Fourier series for $f'(x) = ?$. After that, you can just integrate the series term by term.