Fourier series for trigonometric absolute value function

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
8 replies · 4K views
agnimusayoti
Messages
239
Reaction score
23
Homework Statement
Assume the period is 1/60 s. Given V(0) = `V(1/120) = V(1/60) = 0, and V(1/240) = V(1/80) = 100. Then output of a simple DC Generator will have the shape of absolute value of a sine function's curve. Expand this function in an appropriate Fourier series.
Relevant Equations
Fourier series:
For a function with period ##2l##, can expanded in Fourier series:
$$f(x) = \frac{1}{2} a_0 + a_n \cos{\frac{n\pi x}{l}} + b_n \sin{\frac{n\pi x}{l}} $$
where a_n and b_n is Fourier's coefficient.
For even function (since absolute value is an even function), then $$b_n = 0$$ and $$a_n = \frac{2}{l} \int_0^{l} f(x) \cos{\frac{n\pi x}{l}} dx$$
Capture.JPG

First, I try to define the function in the figure above: ##V(t)=100\left[sin(120\{pi}\right]##.
Then, I use the fact that absolute value function is an even function, so only Fourier series only contain cosine terms. In other words, ##b_n = 0##
Next, I want to determine Fourier coefficient ##a_n##:
$$a_n=\frac{2}{l} \int_{0}^{l} V(t) \cos{120n\pi t} dt$$.
I think, now V(t) only positive, so ##V(t)=100 sin(120\pi t)##
then,
$$a_n=\frac{2}{l} \int_{0}^{l} \left(100 sin(120\pi t)\right) \cos{120n\pi t} dt$$.
At this stage, is my work true?
Can I evaluate the integral with Euler form? Thanks
 
on Phys.org
agnimusayoti said:
At this stage, is my work true?
Up to 1/120 s yes. After that you need a minus sign !

(However, if you look at the integrand, perhaps integrating up to 1/120 isn't all that bad ... :wink: )
 
but I am my work next, I found the coefficient is zero (using Euler) without minus sign. The argument for sin differs from cos (in my integrand) right? So I can't modify to sin 2A?
 
agnimusayoti said:
but I am my work next, I found the coefficient is zero (using Euler) without minus sign. The argument for sin differs from cos (in my integrand) right? So I can't modify to sin 2A?
I don't see your work if you don't post it, so I can't comment.
Advice: make a sketch for a few cases (n = 0, 1, 2, 3 ...) and see when coefficients are zero and when they are not

(PS: post #1 has
1594128884374.png
)
 
Here I try to write it down.
$$a_n=2(120)\int_{0}^{1/120} 100 \sin {120 \pi t} \cos {120n \pi t} dt$$
In Euler formula:
$$\sin {120 \pi t} = \frac {e^{120i\pi t} - e^{- i 120 \pi t}}{2i}$$
$$ \cos {120n \pi t} =\frac{e^{120 n i\pi t} + e^{- i 120 n \pi t}}{2}$$
Substituting these formula to integran gives:
$$a_n=2(120)\int_{0}^{1/120} 100 \frac{1}{4i} \left ( e^{120i\pi t} - e^{- 120 i \pi t} \right)\left ( e^{120ni\pi t} - e^{- 120 n i \pi t} \right)dt$$
$$a_n=\frac{2(120)(100)}{4i}\int_{0}^{1/120} \left[e^{i 120 \pi t \left(1+n \right)} - e^{i 120 \pi t \left(1-n \right)} - e^{i 120 \pi t \left(-1+n \right)}+e^{i 120 \pi t \left(-1-n \right)}\right]dt$$.
At this stage, is that true? If I am not mistaken, I continued the integration:
$$a_n={96 000i} \left[\frac {e^{i 120 \pi t \left(1+n \right)}}{(120\pi i)(1+n)} - \frac {e^{i 120 \pi t \left(1-n \right)}}{(120\pi i)(1-n)} - \frac {e^{i 120 \pi t \left(-1+n \right)}}{(120\pi i)(-1+n)}+\frac {e^{i 120 \pi t \left(-1-n \right)}}{(120\pi i)(-1-n)}\right]^{1/120}_{0} dt$$
$$a_n=\frac{96 000i} {120 \pi i}\left[\frac {e^{i 120 \pi t \left(1+n \right)}}{(1+n)} - \frac {e^{i 120 \pi t \left(1-n \right)}}{(1-n)} + \frac {e^{i 120 \pi t \left(-1+n \right)}}{(1-n)}-\frac {e^{i 120 \pi t \left(-1-n \right)}}{(1+n)}\right]^{1/120}_{0} dt$$
After that, I found that cosine terms in euler Formula cancel each other, but sine is not. Unfortunately, the argument for sine is n pi then sine become zero.
 
Hmm, But if I use trigonometric formula for sin A cos B = 1/2 [sin (A+B) sin (A-B)] I got different result. therefore somehow my integration bugging
 
BvU said:
Advice: make a sketch for a few cases (n = 0, 1, 2, 3 ...) and see when coefficients are zero and when they are not

agnimusayoti said:
After that, I found that cosine terms in euler Formula cancel each other, but sine is not
And how is that for the integral from 1/120 to 1/60 ?
 
It should be the same as half period because V(t) is even function right. But, the problem is executing Euler formula. I wonder what should I do in case I forget the trigonometric formula and not allowed to see it in textbook, since there are so many trigonometric formula. Huft
 
agnimusayoti said:
It should be the same as half period because V(t) is even function right
You want to check that anyway. Remember that ##V(t) =\ {\bf -} \ \sin(...)## there !

BvU said:
Advice: make a sketch for a few cases (n = 0, 1, 2, 3 ...) and see when coefficients are zero and when they are not
And if you post them, I might point out some isssues you misss.
Don't be fixed on Euler if that doesn't work for you.. It's sines and cosines.