- #1
bobese
- 6
- 0
i'm new here so i didn't really know where to post this but I've been trying to solve the Fourier series for the following function for ages but have failed miserably on several occasions:
f(x) = 1 ; when -10 ≤ x < -5
f(x) = 0 ; when -5 ≤ x < 5
f(x) = -1 ; when 5 ≤ x < 10
The function appears to be odd when sketched so therefore only the sine coefficients exist which i found to be:
bn = [2/n(pi)]*[cos (n(pi)) - cos (0.5n(pi))]
This then gave the following results using a substitution of 10/2 instead of x in the sin parts multiplied by the corresponding bn coefficient:
f(x) = -[2/(pi)]*[1 - 1/3 + 1/5 - 1/7 ...]
That is then supposed to be used to find the following expression for pi:
pi = 4*(1 - 1/3 + 1/5 - 1/7 ...)
However, with my results i found the following:
pi = 2*(1 - 1/3 + 1/5 - 1/7 ...)
Can anyone help pinpoint my mistake please :(?
any help would be highly appreciated.
f(x) = 1 ; when -10 ≤ x < -5
f(x) = 0 ; when -5 ≤ x < 5
f(x) = -1 ; when 5 ≤ x < 10
The function appears to be odd when sketched so therefore only the sine coefficients exist which i found to be:
bn = [2/n(pi)]*[cos (n(pi)) - cos (0.5n(pi))]
This then gave the following results using a substitution of 10/2 instead of x in the sin parts multiplied by the corresponding bn coefficient:
f(x) = -[2/(pi)]*[1 - 1/3 + 1/5 - 1/7 ...]
That is then supposed to be used to find the following expression for pi:
pi = 4*(1 - 1/3 + 1/5 - 1/7 ...)
However, with my results i found the following:
pi = 2*(1 - 1/3 + 1/5 - 1/7 ...)
Can anyone help pinpoint my mistake please :(?
any help would be highly appreciated.