Extending function to determine Fourier series

Click For Summary

Homework Help Overview

The discussion revolves around finding the Fourier cosine series for a triangular wave defined by a piecewise function, which is to be extended as a periodic function with a specified period. The original poster seeks clarification on how to properly extend the function and determine the necessary parameters for the Fourier series calculations.

Discussion Character

  • Exploratory, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • The original poster asks how to extend the function as a periodic function of period 2 and what the value of L should be in the context of the Fourier series formulas. Some participants suggest that the function is even, which may simplify the process.

Discussion Status

Participants have provided insights regarding the periodic extension of the function and clarified the value of L as half the period. There is ongoing exploration of the integration process for calculating the Fourier coefficients, with some participants questioning the necessity of including both halves of the function in the calculations.

Contextual Notes

There is a focus on the half-range cosine series and the implications of using even functions in the integration process. The original poster has expressed confusion about the integration setup and the application of the formulas, leading to further clarification from other participants.

J6204
Messages
56
Reaction score
2
Thread moved from the technical forums, so no Homework Template is shown
In the following question I need to find the Fourier cosine series of the triangular wave formed by extending the function f(x) as a periodic function of period 2
$$f(x) = \begin{cases}
1+x,& -1\leq x \leq 0\\
1-x, & 0\leq x \leq 1\\\end{cases}$$
I just have a few questions then I will be able to get started to execute this solution.
**Question 1** How do I extend the function f(x) as a periodic function of period 2?
**Question 2** The formulas for determing the cosine series are the following,
$$a_0 = \frac{2}{L} \int_0^L f(x) dx$$
$$a_n = \frac{2}{L} \int _0^L f(x) \cos \left(\frac{n\pi x}{L}\right) dx$$
$$f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} a_n \cos\left( \frac{n\pi x }{L} \right)$$
Once we have extended the function what will the value of L be?
 
Physics news on Phys.org
J6204 said:
In the following question I need to find the Fourier cosine series of the triangular wave formed by extending the function f(x) as a periodic function of period 2
$$f(x) = \begin{cases}
1+x,& -1\leq x \leq 0\\
1-x, & 0\leq x \leq 1\\\end{cases}$$
I just have a few questions then I will be able to get started to execute this solution.
**Question 1** How do I extend the function f(x) as a periodic function of period 2?

You don't have to "extend the function". Since your function is even, the half range cosine series will be a periodic extension of your function.

**Question 2** The formulas for determing the cosine series are the following,
$$a_0 = \frac{2}{L} \int_0^L f(x) dx$$
$$a_n = \frac{2}{L} \int _0^L f(x) \cos \left(\frac{n\pi x}{L}\right) dx$$
$$f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} a_n \cos\left( \frac{n\pi x }{L} \right)$$
Once we have extended the function what will the value of L be?
##L## is half the period of the extended periodic function. In your case one period is given on ##[-1,1]## so the period is ##2## and ##L=1##.
 
LCKurtz said:
You don't have to "extend the function". Since your function is even, the half range cosine series will be a periodic extension of your function.##L## is half the period of the extended periodic function. In your case one period is given on ##[-1,1]## so the period is ##2## and ##L=1##.
okay so then I am able to start the following integrations, I just want to see if what I have below is correct then I can calculate them

$$a_0 = \frac{2}{L} \int_0^L f(x) dx = 2\int_{-1}^0(1+x)dx + 2\int _{0}^1 (1-x)dx $$
$$a_n = \frac{2}{L} \int _0^L f(x) \cos \left(\frac{n\pi x}{L}\right) dx = 2 \int_{-1}^0(1+x)cos(n\pi x) dx + 2\int_{0}^1 (1-x)cos(n\pi x) dx $$
 
J6204 said:
okay so then I am able to start the following integrations, I just want to see if what I have below is correct then I can calculate them

$$a_n = \frac{2}{L} \int _0^L f(x) \cos \left(\frac{n\pi x}{L}\right) dx$$

That is the formula for ##a_n##. You know ##L=1## and ##f(x)## on that interval is ##1-x##. So your formula is $$a_n = \frac 2 1 \int_{0}^1 (1-x)cos(n\pi x) dx $$That is all there is to it. The whole point of half range formulas is that you don't need to use the other formula for ##[-1,0]##. So what you have below, besides being incorrect, is pointless.

$$ = 2 \int_{-1}^0(1+x)cos(n\pi x) dx + 2\int_{0}^1 (1-x)cos(n\pi x) dx $$
 
Okay thanks, I actually didon't mean to put that 2 in there. Thanks for your help!
 
So I only need to calculaye the (1-x) integral? That makes it much easier
 
J6204 said:
Okay thanks, I actually didon't mean to put that 2 in there. Thanks for your help!
The ##2## needs to go on the half range formula because it essentially includes the other half. But if you include both halves, neither would have the ##2## in front. The point is that the two integrals are equal for an even function and that's why you can do just one of the integrals and double it. But if you did both integrals you wouldn't double either one. Clear?
 
LCKurtz said:
The ##2## needs to go on the half range formula because it essentially includes the other half. But if you include both halves, neither would have the ##2## in front. The point is that the two integrals are equal for an even function and that's why you can do just one of the integrals and double it. But if you did both integrals you wouldn't double either one. Clear?
okay so I understand what you are saying. Now I just need to calculate the following,
$$a_n = 2 \int_0^1 (1-x)\cos (n\pi x) dx $$
then plug it into the formula below to get the form of the Fourier series,
$$f(x) = \sum^\infty_{n=1} a_n \cos\frac{n\pi x}{L}$$ where L is 1
 
Don't forget the appropriate half range formula for ##a_0## and include it.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
3
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K