I am learning Fourier series, and I must compute specific values for the Fourier series of the function $5x+7$ on the interval [-8,8].

The fourier series of a function on an interval [-L, L] is given by: $$ f(x)=\sum_{n=0}^{\infty} A_{n} \cos \left(\frac{n \pi x}{L}\right)+\sum_{n=1}^{\infty} B_{n} \sin \left(\frac{n \pi x}{L}\right) $$

  • I find first $A_0$: $$ A_{0}=\frac{1}{2 L} \int_{-L}^{L} 5x+7 d x $$ The first term disappears (odd), and integrating 7 on the interval gives $A_0 = 7$

  • Finding $A_m$ $$ A_{m}=\frac{1}{L} \int_{-L}^{L} (5x+7) \cos \left(\frac{m \pi x}{L}\right) d x \quad m=1,2,3, \ldots \\ = \int_{-L}^{L} 5x \cos \left(\frac{m \pi x}{L}\right) d x + \int_{-L}^{L} 7 \cos \left(\frac{m \pi x}{L}\right) d x $$ The first term is odd (odd * even = odd), the second is orthogonal, so $A_m=0$.

  • Finding $B_m$ in the same manner:

$$ B_{m}=\frac{1}{L} \int_{-L}^{L} (5x+7) \sin \left(\frac{m \pi x}{L}\right) d x \quad m=1,2,3, \ldots \\ = \int_{-L}^{L} 5x \sin \left(\frac{m \pi x}{L}\right) d x + \int_{-L}^{L} 7 \sin \left(\frac{m \pi x}{L}\right) d x $$ The second term is orthogonal, but the first is odd and can be integrated. By partial integration I find: $$B_{m}=\frac{-1^{n+1}}{n \pi}$$

ie my Fourier series is: $$7 + \sum_{n=1}^{\infty} \frac{-1^{n+1} 80}{n \pi} \sin \left(\frac{n \pi x}{8}\right)$$

EDIT: I asked about $f(0)$ and as @Ninad pointed in the comment, it was easy to calculate. I edited my question for clarity!

EDIT 2: added missing 80 in the fourier series.

My issue is when calculating special values for this series. The site I am following is not covering this part and focusing in computing Fourier series (if I am not blind!: https://tutorial.math.lamar.edu/Classes/DE/FourierSeries.aspx) I cannot find a good example to follow (I don't understand how the person comes to their conclusion here: Computing value of fourier series)

So I would be grateful for an explanation on how one computes positive and negative values in the interval of a Fourier series, or some resources to read with exemplified process!

For example, how do I take f(2), and f(-2) and deal with the infinite sum?

  • 2
    $\begingroup$ $f(0)$ looks like $7$ on that graph, I'm not sure what you're confused about. $\endgroup$ Apr 23, 2021 at 8:10
  • $\begingroup$ Sorry, you are right! Looks like I cannot read the graph properly, I was reading the x-axis! But I am still confused about computing specific values. I edited my question, please have a look! $\endgroup$
    – Dovendyr
    Apr 23, 2021 at 8:53

1 Answer 1


There is a number of useful results about the pointwise convergence of Fourier series.

Take $f$ to be integrable on $[-L, L]$ and have a Fourier series $\sum a_n \cos (n\pi x/L) + b_n \sin (n\pi x /L)$. Then two examples are

  1. If $f$ has left and right derivative at $x\in [-L, L]$ then the Fourier series converges at $x$ to $\tfrac{1}{2}(f(x+)+f(x-))$ where $f(x\pm)$ indicate the limits of $f(x+t)$ as $t\to x$ from above and below.
  2. If $f$ is continuous and the sum of the Fourier coefficients converges absolutely (i.e. $\sum |a_n| + |b_n|$ converges) then the Fourier series converges to $f(x)$.

Use example 1 applied to your case, (assuming the coefficients are OK) we see that $$ 17 = f(2) = 7 + \sum_{n=1}^\infty \frac{(-1)^{n+1}80}{n\pi} \sin \left( \tfrac{1}{4}n\pi \right) $$ where the infinite sum on the right will converge. You can calculate values $$ \sin \left( \tfrac{1}{4} n\pi \right)= \left\{ \begin{array}{2} \sqrt{2}/2&n=1,3,9,11, \cdots\\ 1&n=2,10, \cdots \\ -\sqrt{2}/2&n=5,7,13,15, \cdots \\ -1&n=6,14,\cdots \\ 0&n=4,8,12,\cdots \end{array} \right. $$ and if you combine into groups of eight terms you have, $$ \tfrac{1}{8}\pi = \sum_{n=0}^\infty \left\{ -\frac{\tfrac{1}{2}\sqrt{2}}{8n+1} + \frac{1}{8n+2} - \frac{\tfrac{1}{2}\sqrt{2}}{8n+3} + \frac{0}{8n+4} + \frac{\tfrac{1}{2}\sqrt{2}/2}{8n+5} -\frac{1}{8n+6}+\frac{\tfrac{1}{2}\sqrt{2}/2}{8n+7}-\frac{0}{8n+8} \right\}$$

  • $\begingroup$ Thank you very much @WA Don, that was very informative! So the important is to generate a series of terms that are repeating (cyclic?) $\endgroup$
    – Dovendyr
    Apr 23, 2021 at 16:52
  • $\begingroup$ No - that won't always happen as it did in this case. The important thing is that the Fourier series converges for the right type of $f$ so you can then say the $f(x)$ and the sum of the series are the same. For example, to find $$ \sum_{n=1}^\infty \frac{1}{n^2} $$ you can develop a Fourier series for a simple function (Maybe $f(x) = |x|$ on $[-\pi,\pi]?)$ which gives the $1/n^2$ terms when $x=0$ and obtain the famous $$\sum \frac{1}{n^2} = \frac{\pi^2}{6}$$ $\endgroup$
    – WA Don
    Apr 24, 2021 at 8:40
  • $\begingroup$ I will file this knowledge for later, we just started with Fourier and did not yet come ton convergence :) $\endgroup$
    – Dovendyr
    Apr 24, 2021 at 8:47
  • $\begingroup$ Btw sorry there was a typo in my question, 80 is missing in B_m, let me fix that... $\endgroup$
    – Dovendyr
    Apr 24, 2021 at 8:47
  • $\begingroup$ By the way I have a follow up question if you have time and energy :) math.stackexchange.com/questions/4114511/… $\endgroup$
    – Dovendyr
    Apr 24, 2021 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.