Integration for Fourier coefficient

In summary, the conversation revolves around finding the Fourier coefficient a_n for a given function. The person asking for help is struggling with the calculations and is looking for suggestions on improving their expressions and techniques. The conversation also touches upon the use of Wolfram and the possibility of mistakes in the calculations.
  • #1
earthloop
25
0

Homework Statement



I am trying to work out the Fourier coefficient [itex]a_{n}[/itex] for :

upload_2015-5-18_20-15-36.png


Mathematics is not my strong point and I would appreciate some help. The answer that wolfram spits out it lovely and neat and I am struggling to get my answer to it.

Homework Equations



upload_2015-5-18_20-17-46.png


The Attempt at a Solution


Apologies for the messy scan, its the best I can do without typing out ALL my working out in LaTeX.
I am really trying to improve my mathematics, so any suggestions on making my expressions neater, or techniques I may have missed, please do let me know.
Untitled-1.jpg


EDIT : it seems uploading has resized my scan.
heres a https://drive.google.com/file/d/0B9RrInHrjRJCbTJBS0RqYlJHSW8/view?usp=sharing

Thanks for your time
 

Attachments

  • upload_2015-5-18_20-17-20.png
    upload_2015-5-18_20-17-20.png
    2.3 KB · Views: 560
  • Untitled-1.jpg
    Untitled-1.jpg
    39.2 KB · Views: 369
Last edited by a moderator:
Physics news on Phys.org
  • #2
Hello EL,

What Fourier series does Wolfram find ? If I fill in n=1 in the expression in the link I don't think I get a useful coefficient.
It may be lovely and neat, but is it the correct answer for what you are after ?

You are looking for ## a_n##, using
upload_2015-5-18_20-17-46-png.83661.png

for a function that is defined from ##0## to ##2\pi##. (Which is also the range you ask Wolfram to integrate over).

But you also post

upload_2015-5-18_20-17-20-png.83659.png

Does this mean you already know ##b_n=0## or will the sine series come later ?
 
  • #3
Hi BvU,

The wolfram link I gave is just for the [itex]a_{n}[/itex]. It is indeterminate at [itex]a_{1}[/itex] and zero for all even numbers thereon. This is fine and to be expected. I have not got round to starting [itex]b_{n}[/itex], I would like to get [itex]a_{n}[/itex] to a workable expression( of [itex]n[/itex]) first. At this moment I am not concerned with the Fourier series, just the integral mathematics in working out [itex]a_{n}[/itex]. Have you had a chance to look at my working out for [itex]a_{n}[/itex], does it seem like its on the right track?

Thanks again
 
  • #4
Hello again,

I find it hard to believe a Fourier coefficient can be indeterminate, so I don't think that the elegant result you got from Wolfram is what you where looking for. Check their function "Fourier cos series" (instead of int, and you also remove the *cos etc at the end).

I can't read your jpg and If I could, then I still can't point to places where I would have questions or remarks. How about if you TeX the first step(s) of what you are trying to do, so we can go over things like:
what you are trying to integrate
continuation of the function outside [0,2pi]
limits
a few simple cases (n = 1, 2, ...)
generalization
 
  • #5
This is the example I am following about the a1 being indeterminate...
upload_2015-5-19_11-30-44.png

upload_2015-5-19_11-31-25.png
Here is the first leg of the calculations : [itex]\displaystyle a_{n} = \frac{V}{\pi}\int_{\frac{\pi}{2}}^{\pi}\sin(\omega t)\cos(n\omega t) \delta\omega t + \frac{V}{\pi}\int_{\frac{3\pi}{2}}^{2\pi}\sin(\omega t)\cos(n\omega t)\delta\omega t[/itex]

So in the first step I have evaluated that between 0 and pi/2 the function equals zero and is omitted, same as with pi to 3pi/2. V has been brought outside the integral.

[itex]\displaystyle \frac{V}{2\pi}\int_{\frac{\pi}{2}}^{\pi}\sin(\omega t+n\omega t)+\sin(\omega t -n\omega t)\delta\omega t + \frac{V}{2\pi}\int_{\frac{3\pi}{2}}^{2\pi}\sin(\omega t+n\omega t)+\sin(\omega t -n\omega t)\delta\omega t[/itex]

In step two I have used the "product to sum" identity
[itex]\displaystyle \sin\alpha\cos\beta = \frac{1}{2}[\sin(\alpha+\beta)+\sin(\alpha-\beta)][/itex]

[itex]\displaystyle u=\omega t \pm n\omega t \\ \delta u = n \pm 1 \\ \delta\omega t = \frac{\delta u}{n\pm 1}\\ \\ \frac{V}{2\pi}\Big[-\frac{\cos(\omega t + n \omega t)}{n+1} - \frac{\cos(\omega t - n \omega t)}{n-1} \Big]_{\frac{\pi}{2}}^{\pi} + \frac{V}{2\pi}\Big[-\frac{\cos(\omega t + n \omega t)}{n+1} - \frac{\cos(\omega t - n \omega t)}{n-1}\Big]_{\frac{3\pi}{2}}^{2\pi} \\[/itex]

Step 3 I have integrated by parts

[itex]\displaystyle \frac{V}{2\pi}\Bigg[\Big[-\frac{\cos(\pi + n \pi)}{n+1} - \frac{\cos(\pi - n \pi)}{n-1} \Big] - \Big[-\frac{\cos(\frac{\pi}{2} + n \frac{\pi}{2})}{n+1} - \frac{\cos(\frac{\pi}{2} - n \frac{\pi}{2})}{n-1} \Big]\Bigg] + \frac{V}{2\pi}\Bigg[\Big[-\frac{\cos(2\pi + n 2\pi)}{n+1} - \frac{\cos(2\pi - n 2\pi)}{n-1} \Big] - \Big[-\frac{\cos(\frac{3\pi}{2} + n \frac{3\pi}{2})}{n+1} - \frac{\cos(\frac{3\pi}{2} - n \frac{3\pi}{2})}{n-1} \Big]\Bigg][/itex]

step 4 expanding out the limits

[itex] \displaystyle \frac{V}{2\pi}\Bigg[\Big[-\frac{\cos(\pi)\cos(n\pi)- \sin(\pi)\sin(n\pi)}{n+1} - \frac{\cos(\pi)\cos(n\pi)+ \sin(\pi)\sin(n\pi)}{n-1} \Big] - \Big[-\frac{\cos(\frac{\pi}{2})\cos(n\frac{\pi}{2})- \sin(\frac{\pi}{2})\sin(n\frac{\pi}{2})}{n+1} - \frac{\cos(\frac{\pi}{2})\cos(n\frac{\pi}{2})+ \sin(\frac{\pi}{2})\sin(n\frac{\pi}{2})}{n-1} \Big]\Bigg] + \frac{V}{2\pi}\Bigg[\Big[-\frac{\cos(2\pi)\cos(n2\pi)- \sin(2\pi)\sin(n2\pi)}{n+1} - \frac{\cos(2\pi)\cos(n2\pi)+ \sin(2\pi)\sin(n2\pi)}{n-1} \Big] - \Big[-\frac{\cos(\frac{3\pi}{2})\cos(n\frac{3\pi}{2})- \sin(\frac{3\pi}{2})\sin(n\frac{3\pi}{2})}{n+1} - \frac{\cos(\frac{3\pi}{2})\cos(n\frac{3\pi}{2})+ \sin(\frac{3\pi}{2})\sin(n\frac{3\pi}{2})}{n-1} \Big]\Bigg][/itex]

step 5 i have used the sum and difference formula:
[itex]\displaystyle\cos(\alpha\pm\beta) = \cos\alpha\cos\beta \mp \sin\alpha\sin\beta[/itex]

[itex] \displaystyle \frac{V}{2\pi}\Bigg[\Big[-\frac{\cos(\pi)\cos(n\pi)}{n+1} - \frac{\cos(\pi)\cos(n\pi)}{n-1} \Big] - \Big[-\frac{- \sin(\frac{\pi}{2})\sin(n\frac{\pi}{2})}{n+1} - \frac{ \sin(\frac{\pi}{2})\sin(n\frac{\pi}{2})}{n-1} \Big]\Bigg] + \frac{V}{2\pi}\Bigg[\Big[-\frac{\cos(2\pi)\cos(n2\pi)}{n+1} - \frac{\cos(2\pi)\cos(n2\pi)}{n-1} \Big] - \Big[-\frac{- \sin(\frac{3\pi}{2})\sin(n\frac{3\pi}{2})}{n+1} - \frac{ \sin(\frac{3\pi}{2})\sin(n\frac{3\pi}{2})}{n-1} \Big]\Bigg][/itex]

step 6 I have canceled out the zero cosine and sine terms

[itex] \displaystyle \frac{V}{2\pi}\Bigg[\Big[\frac{\cos(n\pi)}{n+1} + \frac{\cos(n\pi)}{n-1} \Big] - \Big[\frac{\sin(n\frac{\pi}{2})}{n+1} + \frac{ \sin(n\frac{\pi}{2})}{n-1} \Big]\Bigg] + \frac{V}{2\pi}\Bigg[\Big[-\frac{\cos(n2\pi)}{n+1} - \frac{\cos(n2\pi)}{n-1} \Big] - \Big[-\frac{ \sin(n\frac{3\pi}{2})}{n+1} + \frac{ \sin(n\frac{3\pi}{2})}{n-1} \Big]\Bigg][/itex]

Step 7 canceled out the 1 and -1 terms

[itex] \displaystyle \frac{V}{2\pi}\Bigg[\frac{2n\cos(n\pi)-2n\sin(n\frac{\pi}{2})-2n\cos(n2\pi)+2\sin(n\frac{3\pi}{2}))}{n^2-1}\Bigg][/itex]

step 8 consolidated

Here is where I am stuck to carry on...
inputting my last expression into a wolfram table reveals ...LINK
In comparison to LINK which is an answer given in a previous topic on PF ...LINK

Somewhere I have made a mistake!

Thanks again
EL
 
  • #6
earthloop said:
...

[itex] \displaystyle \frac{V}{2\pi}\Bigg[\Big[\frac{\cos(n\pi)}{n+1} + \frac{\cos(n\pi)}{n-1} \Big] - \Big[\frac{\sin(n\frac{\pi}{2})}{n+1} + \frac{ \sin(n\frac{\pi}{2})}{n-1} \Big]\Bigg] + \frac{V}{2\pi}\Bigg[\Big[-\frac{\cos(n2\pi)}{n+1} - \frac{\cos(n2\pi)}{n-1} \Big] - \Big[-\frac{ \sin(n\frac{3\pi}{2})}{n+1} + \frac{ \sin(n\frac{3\pi}{2})}{n-1} \Big]\Bigg][/itex]

Step 7 canceled out the 1 and -1 terms

[itex] \displaystyle \frac{V}{2\pi}\Bigg[\frac{2n\cos(n\pi)-2n\sin(n\frac{\pi}{2})-2n\cos(n2\pi)+2\sin(n\frac{3\pi}{2}))}{n^2-1}\Bigg][/itex]

step 8 consolidated

Here is where I am stuck to carry on...
inputting my last expression into a wolfram table reveals ...LINK
In comparison to LINK which is an answer given in a previous topic on PF ...LINK

Somewhere I have made a mistake!

Thanks again
EL
You left out a factor of n from the coefficient of the last sine term in the numerator.

It should be ## \ 2n\sin(n\frac{3\pi}{2}) \ ##.

Added in Edit:

To find a_1, simply put n = 1 in the integral expression. Then evaluate that.

Link to Wolfram inserting n = 1 in your original expression.
 
Last edited:
  • #7
Hi SammyS,

I got the [itex]- \frac{2\, \sin\!\left(\frac{3\, n\, \mathrm{pi}}{2}\right)}{\left(n^2 - 1\right)}[/itex] from simplifying the previous part of the expression [itex]\frac{\sin\!\left(\frac{3\, n\, \mathrm{pi}}{2}\right)}{\left(n + 1\right)} - \frac{\sin\!\left(\frac{3\, n\, \mathrm{pi}}{2}\right)}{\left(n - 1\right)}[/itex]
Simplifying gives :
[itex]- \frac{2\, \sin\!\left(\frac{3\, n\, \mathrm{pi}}{2}\right)}{\left(n^2 - 1\right)}[/itex]

added back into the expression and corrected ...
[itex]
\displaystyle \frac{V}{2\pi}\Bigg[\frac{2n\cos(n\pi)-2n\sin(n\frac{\pi}{2})-2n\cos(n2\pi)-2\sin(n\frac{3\pi}{2}))}{n^2-1}\Bigg]
[/itex]
Sadly this does not yield the results I am looking for, but it seems closer.
I see I have missed the last minus sign, but I don't see how it can equal [itex] 2n\sin(n\frac{3\pi}{2})[/itex].
Do you mean to say that I have made a mistake previous to this?

thanks
 
  • #8
earthloop said:
Hi SammyS,

I got the [itex]- \frac{2\, \sin\!\left(\frac{3\, n\, \mathrm{pi}}{2}\right)}{\left(n^2 - 1\right)}[/itex] from simplifying the previous part of the expression [itex]\frac{\sin\!\left(\frac{3\, n\, \mathrm{pi}}{2}\right)}{\left(n + 1\right)} - \frac{\sin\!\left(\frac{3\, n\, \mathrm{pi}}{2}\right)}{\left(n - 1\right)}[/itex]
Simplifying gives :
[itex]- \frac{2\, \sin\!\left(\frac{3\, n\, \mathrm{pi}}{2}\right)}{\left(n^2 - 1\right)}[/itex]

added back into the expression and corrected ...
[itex]
\displaystyle \frac{V}{2\pi}\Bigg[\frac{2n\cos(n\pi)-2n\sin(n\frac{\pi}{2})-2n\cos(n2\pi)-2\sin(n\frac{3\pi}{2}))}{n^2-1}\Bigg]
[/itex]
Sadly this does not yield the results I am looking for, but it seems closer.
I see I have missed the last minus sign, but I don't see how it can equal [itex] 2n\sin(n\frac{3\pi}{2})[/itex].
Do you mean to say that I have made a mistake previous to this?

thanks
I think I was mainly looking at patterns, but now that you mention it: There is an error going from step 5 to step 6..

In eqach of the two groups of expressions with sin() , the sines have opposite sign. That is what cancels n & gives a two.

So in step 6, that first sin() expression should not have a coefficient n, just 2 .
 
  • #9
SammyS said:
In eqach of the two groups of expressions with sin() , the sines have opposite sign. That is what cancels n & gives a two.
Sorry I am not following you, can you show me more visually what you mean?
 
  • #10

Homework Statement


I am trying to work out the Fourier coefficient [itex]a_{n}[/itex]for :

upload_2015-5-18_20-15-36-png.83658.png


This question has been asked in a previous thread HERE

Homework Equations


upload_2015-5-18_20-17-46-png.83661.png


The Attempt at a Solution



[itex]
\displaystyle a_{n} = \frac{V}{\pi}\int_{\frac{\pi}{2}}^{\pi}\sin(\omega t)\cos(n\omega t) \delta\omega t + \frac{V}{\pi}\int_{\frac{3\pi}{2}}^{2\pi}\sin(\omega t)\cos(n\omega t)\delta\omega t
[/itex]

So in the first step I have evaluated that between 0 and pi/2 the function equals zero and is omitted, same as with pi to 3pi/2. V has been brought outside the integral.

[itex]
\displaystyle \frac{V}{2\pi}\int_{\frac{\pi}{2}}^{\pi}\sin(\omega t+n\omega t)+\sin(\omega t -n\omega t)\delta\omega t + \frac{V}{2\pi}\int_{\frac{3\pi}{2}}^{2\pi}\sin(\omega t+n\omega t)+\sin(\omega t -n\omega t)\delta\omega t
[/itex]

In step two I have used the "product to sum" identity
[itex]\displaystyle \sin\alpha\cos\beta = \frac{1}{2}[\sin(\alpha+\beta)+\sin(\alpha-\beta)][/itex][itex]
\displaystyle u=\omega t \pm n\omega t \\ \delta u = n \pm 1 \\ \delta\omega t = \frac{\delta u}{n\pm 1}\\ \\ \frac{V}{2\pi}\Big[-\frac{\cos(\omega t + n \omega t)}{n+1} - \frac{\cos(\omega t - n \omega t)}{n-1} \Big]_{\frac{\pi}{2}}^{\pi} + \frac{V}{2\pi}\Big[-\frac{\cos(\omega t + n \omega t)}{n+1} - \frac{\cos(\omega t - n \omega t)}{n-1}\Big]_{\frac{3\pi}{2}}^{2\pi} \\
[/itex]

Step 3 I have integrated by parts

[itex]
\displaystyle \frac{V}{2\pi}\Bigg[\Big[-\frac{\cos(\pi + n \pi)}{n+1} - \frac{\cos(\pi - n \pi)}{n-1} \Big] - \Big[-\frac{\cos(\frac{\pi}{2} + n \frac{\pi}{2})}{n+1} - \frac{\cos(\frac{\pi}{2} - n \frac{\pi}{2})}{n-1} \Big]\Bigg] + \frac{V}{2\pi}\Bigg[\Big[-\frac{\cos(2\pi + n 2\pi)}{n+1} - \frac{\cos(2\pi - n 2\pi)}{n-1} \Big] - \Big[-\frac{\cos(\frac{3\pi}{2} + n \frac{3\pi}{2})}{n+1} - \frac{\cos(\frac{3\pi}{2} - n \frac{3\pi}{2})}{n-1} \Big]\Bigg]
[/itex]

step 4 expanding out the limits

[itex]
\displaystyle \frac{V}{2\pi}\Bigg[\Big[-\frac{\cos(\pi)\cos(n\pi)- \sin(\pi)\sin(n\pi)}{n+1} - \frac{\cos(\pi)\cos(n\pi)+ \sin(\pi)\sin(n\pi)}{n-1} \Big] - \Big[-\frac{\cos(\frac{\pi}{2})\cos(n\frac{\pi}{2})- \sin(\frac{\pi}{2})\sin(n\frac{\pi}{2})}{n+1} - \frac{\cos(\frac{\pi}{2})\cos(n\frac{\pi}{2})+ \sin(\frac{\pi}{2})\sin(n\frac{\pi}{2})}{n-1} \Big]\Bigg] + \frac{V}{2\pi}\Bigg[\Big[-\frac{\cos(2\pi)\cos(n2\pi)- \sin(2\pi)\sin(n2\pi)}{n+1} - \frac{\cos(2\pi)\cos(n2\pi)+ \sin(2\pi)\sin(n2\pi)}{n-1} \Big] - \Big[-\frac{\cos(\frac{3\pi}{2})\cos(n\frac{3\pi}{2})- \sin(\frac{3\pi}{2})\sin(n\frac{3\pi}{2})}{n+1} - \frac{\cos(\frac{3\pi}{2})\cos(n\frac{3\pi}{2})+ \sin(\frac{3\pi}{2})\sin(n\frac{3\pi}{2})}{n-1} \Big]\Bigg]
[/itex]

step 5 i have used the sum and difference formula:
[itex]
\displaystyle\cos(\alpha\pm\beta) = \cos\alpha\cos\beta \mp \sin\alpha\sin\beta
[/itex]

[itex]
\displaystyle \frac{V}{2\pi}\Bigg[\Big[-\frac{\cos(\pi)\cos(n\pi)}{n+1} - \frac{\cos(\pi)\cos(n\pi)}{n-1} \Big] - \Big[-\frac{- \sin(\frac{\pi}{2})\sin(n\frac{\pi}{2})}{n+1} - \frac{ \sin(\frac{\pi}{2})\sin(n\frac{\pi}{2})}{n-1} \Big]\Bigg] + \frac{V}{2\pi}\Bigg[\Big[-\frac{\cos(2\pi)\cos(n2\pi)}{n+1} - \frac{\cos(2\pi)\cos(n2\pi)}{n-1} \Big] - \Big[-\frac{- \sin(\frac{3\pi}{2})\sin(n\frac{3\pi}{2})}{n+1} - \frac{ \sin(\frac{3\pi}{2})\sin(n\frac{3\pi}{2})}{n-1} \Big]\Bigg]
[/itex]

step 6 I have canceled out the zero cosine and sine terms

[itex]
\displaystyle \frac{V}{2\pi}\Bigg[\Big[\frac{\cos(n\pi)}{n+1} + \frac{\cos(n\pi)}{n-1} \Big] - \Big[\frac{\sin(n\frac{\pi}{2})}{n+1} + \frac{ \sin(n\frac{\pi}{2})}{n-1} \Big]\Bigg] + \frac{V}{2\pi}\Bigg[\Big[-\frac{\cos(n2\pi)}{n+1} - \frac{\cos(n2\pi)}{n-1} \Big] - \Big[-\frac{ \sin(n\frac{3\pi}{2})}{n+1} + \frac{ \sin(n\frac{3\pi}{2})}{n-1} \Big]\Bigg]
[/itex]

Step 7 canceled out the 1 and -1 terms

[itex]
\displaystyle \frac{V}{2\pi}\Bigg[\frac{2n\cos(n\pi)-2n\sin(n\frac{\pi}{2})-2n\cos(n2\pi)-2\sin(n\frac{3\pi}{2}))}{n^2-1}\Bigg]
[/itex]

step 8 consolidated

Here is where I am stuck to carry on... I I have made a mistake somewhere because inputting my expression doesn't yield the same results as the answer given in the old thread.
milesyoung said:

Maths isn't my strong point and I would love to know where I have gone wrong.

Thanks again
EL
 
  • #11
(2 threads merged)
 
  • #12
earthloop said:
Sorry I am not following you, can you show me more visually what you mean?

The part of step 5 I was referring to is:
##\displaystyle \ - \left[-\frac{- \sin(\frac{\pi}{2})\sin(n\frac{\pi}{2})}{n+1} - \frac{ \sin(\frac{\pi}{2})\sin(n\frac{\pi}{2})}{n-1} \right] \ ##

What you should have for the corresponding part of step 6 is:
##\displaystyle \ - \left[\frac{\sin(n\frac{\pi}{2})}{n+1} - \frac{ \sin(n\frac{\pi}{2})}{n-1} \right] \ ##

not
##\displaystyle \ - \left[\frac{\sin(n\frac{\pi}{2})}{n+1} + \frac{ \sin(n\frac{\pi}{2})}{n-1} \right] \ ##
 
  • #13
Thanks for the continual effort SammyS!

The corrected final term is [itex]
\displaystyle \frac{V}{2\pi}\Bigg[\frac{2n\cos(n\pi)+2\sin(n\frac{\pi}{2})-2n\cos(n2\pi)-2\sin(n\frac{3\pi}{2}))}{n^2-1}\Bigg]
[/itex]

Matlab simplifys this to [itex]\frac{2\, v\, \sin\!\left(\frac{n\, \mathrm{pi}}{2}\right)\, \left(2\, {\sin\!\left(\frac{n\, \mathrm{pi}}{2}\right)}^2 + n\, \sin\!\left(\frac{3\, n\, \mathrm{pi}}{2}\right) - 1\right)}{\mathrm{pi}\, \left(n^2 - 1\right)}[/itex]

I'm not sure how this has been simplified, any ideas?

The new expression yields almost identical results to the compared answer, except my results are all negative.

my results:
n=1 gives indeterminate
n=3 gives -v/pi
n=5 gives -v/(3*pi)
n=7 gives -v/(3*pi)
n=9 gives -v/(5*pi)

In comparison to the "answer" table
LINK
MSP17121f96cife4i2gdcgc00002434g869827d62c7.gif

Also... a comparison between the actual expression worked out by wolfram LINK
MSP29121dce93e162eg538100001d1929d5eha1ihi0.gif

Compared with my final expression simplified in wolfram LINK
MSP78541i2bbffb083c9h0500003he2be18i7ecac6g.gif

gives
MSP78621i2bbffb083c9h0500004c7905ecgi4h2900.gif


I can see the differences are that one expression is negative, the other isn't (explaining why I have negative answers) and the top part of the expression, N is multiplied by the cos term, not the sin term.

So close!

I will have another thorough check of all my workings out later today, but do you have any insight into how I can simplify the final expression as much as possible, so that it resembles something like what matlab/wolfram spits out?

Thanks again
 
  • #14
I get the impression that you're stumped in two ways. One is the indeterminate nature of coefficient, a1 . The other is that you're not quite producing the correct values for the other coefficients.

Let's look at what's going on with a1.

earthloop said:

Homework Equations


upload_2015-5-18_20-17-46-png.83661.png


The Attempt at a Solution


...
##\displaystyle \frac{V}{2\pi}\int_{\frac{\pi}{2}}^{\pi}\sin(\omega t+n\omega t)+\sin(\omega t -n\omega t)\delta\omega t + \frac{V}{2\pi}\int_{\frac{3\pi}{2}}^{2\pi}\sin(\omega t+n\omega t)+\sin(\omega t -n\omega t)\delta\omega t##

In step two I have used the "product to sum" identity
[itex]\displaystyle \sin\alpha\cos\beta = \frac{1}{2}[\sin(\alpha+\beta)+\sin(\alpha-\beta)][/itex]

[itex]
\displaystyle u=\omega t \pm n\omega t \\ \delta u = (n \pm 1)\color{red}{\delta\omega t} \\ \delta\omega t = \frac{\delta u}{n\pm 1}\\ \\ \frac{V}{2\pi}\Big[-\frac{\cos(\omega t + n \omega t)}{n+1} - \frac{\cos(\omega t - n \omega t)}{n-1} \Big]_{\frac{\pi}{2}}^{\pi} + \frac{V}{2\pi}\Big[-\frac{\cos(\omega t + n \omega t)}{n+1} - \frac{\cos(\omega t - n \omega t)}{n-1}\Big]_{\frac{3\pi}{2}}^{2\pi} \\
[/itex]

Step 3 I have integrated by parts (By the Way: This is simply u-substitution, not integration by parts.)

[itex]
\displaystyle \frac{V}{2\pi}\Bigg[\Big[-\frac{\cos(\pi + n \pi)}{n+1} - \frac{\cos(\pi - n \pi)}{n-1} \Big] - \Big[-\frac{\cos(\frac{\pi}{2} + n \frac{\pi}{2})}{n+1} - \frac{\cos(\frac{\pi}{2} - n \frac{\pi}{2})}{n-1} \Big]\Bigg] + \frac{V}{2\pi}\Bigg[\Big[-\frac{\cos(2\pi + n 2\pi)}{n+1} - \frac{\cos(2\pi - n 2\pi)}{n-1} \Big] - \Big[-\frac{\cos(\frac{3\pi}{2} + n \frac{3\pi}{2})}{n+1} - \frac{\cos(\frac{3\pi}{2} - n \frac{3\pi}{2})}{n-1} \Big]\Bigg]
[/itex]

step 4 expanding out the limits
...

Thanks again
EL
I did suggest in a previous post, that you simply evaluate you're initial integral directly with a value of 1 inserted for n.
but...

Let's what it is about n = 1 that causes the general result you have to be in error. (the indeterminate thing)

It's just the (n-1) factor which produces the problem. So let's consider the following indefinite integral.
##\displaystyle\ \int \sin(\omega t -n\omega t)\delta\omega t ##​

First of all, if n = 1, then the integrand becomes sin(0) which is zero, thus the definite integral resulting from this is zero.

If you consider the substitution, ##\ u=\omega t - n\omega t\ ##, you get ##\displaystyle\ \delta u = (1-n)\delta\omega t\ ##. (Maybe this is the source of your sign error.)

When you solve for ##\ \delta\omega t\ ##, you get ##\displaystyle\ \delta\omega t = \frac{\delta u}{1-n}\ ##.

See the problem if n = 1 ?
 
Last edited:
  • #15
Ok yes, got it, thanks for that! I can see how [itex]a_{1}=-\frac{v}{pi}[/itex]. Sadly I haven't had a time today to check my expression, but I will tomorrow, I'm sure I will find the mistake!

Thanks again
EL
 
  • #16
Ok I have managed to get the correct results, after correcting the substitution to 1-n and rewriting the expression. Thanks for your help!

I now have simplified the expression as much as I can to
[itex]\displaystyle\frac{v\bigg(\cos(n\pi)+n\sin(n\frac{\pi}{2})-\cos(n2\pi)-n\sin(n\frac{3\pi}{2})\bigg)}{\pi(1-n^2)}[/itex]

Yet wolfram still simplifies it even more into :
[itex] - \frac{2\, v\, \sin\!\left(\frac{n\, \mathrm{\pi}}{2}\right)\, \left(\sin\!\left(\frac{3\, n\, \mathrm{\pi}}{2}\right) - n\, \cos\!\left(n\, \mathrm{\pi}\right)\right)}{\mathrm{\pi}\, \left(n^2 - 1\right)}[/itex]

Any idea how it achieved this? A trig identity? I couldn't see where any would help me.

After this I'll be well prepared for working out [itex]b_{n}[/itex]! :woot:

Thanks again
EL
 
  • #17
earthloop said:
Ok I have managed to get the correct results, after correcting the substitution to 1-n and rewriting the expression. Thanks for your help!

I now have simplified the expression as much as I can to
[itex]\displaystyle\frac{v\bigg(\cos(n\pi)+n\sin(n\frac{\pi}{2})-\cos(n2\pi)-n\sin(n\frac{3\pi}{2})\bigg)}{\pi(1-n^2)}[/itex]

Yet wolfram still simplifies it even more into :
[itex] - \frac{2\, v\, \sin\!\left(\frac{n\, \mathrm{\pi}}{2}\right)\, \left(\sin\!\left(\frac{3\, n\, \mathrm{\pi}}{2}\right) - n\, \cos\!\left(n\, \mathrm{\pi}\right)\right)}{\mathrm{\pi}\, \left(n^2 - 1\right)}[/itex]

Any idea how it achieved this? A trig identity? I couldn't see where any would help me.

After this I'll be well prepared for working out [itex]b_{n}[/itex]! :woot:

Thanks again
EL
Difference to product.
 
  • #18
Ah ok got it now. Thanks very much for all the help!

EL
 

Related to Integration for Fourier coefficient

1. What is integration for Fourier coefficients?

Integration for Fourier coefficients is a mathematical technique used to determine the coefficients of a Fourier series. It involves calculating the definite integral of a function over a specified interval to find the values of the coefficients.

2. Why is integration necessary for finding Fourier coefficients?

Integration is necessary for finding Fourier coefficients because it allows us to determine the values of the coefficients for a given function. This is important because the coefficients represent the amplitudes of the individual frequency components in a Fourier series.

3. What is the formula for calculating Fourier coefficients using integration?

The formula for calculating Fourier coefficients using integration is:

an = (1/L) * ∫-LL f(x) * cos(nπx/L) dx
bn = (1/L) * ∫-LL f(x) * sin(nπx/L) dx

Where L is the period of the function and n is the index of the coefficient.

4. Can integration for Fourier coefficients be used for all types of functions?

Yes, integration for Fourier coefficients can be used for all types of functions as long as they satisfy certain conditions such as being piecewise continuous and having a finite number of discontinuities within the period.

5. Are there any limitations to using integration for Fourier coefficients?

One limitation of using integration for Fourier coefficients is that it may be computationally intensive for complex functions or functions with infinite discontinuities. In these cases, other methods such as numerical approximation may be more suitable.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
325
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
363
  • Calculus and Beyond Homework Help
Replies
5
Views
453
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
655
  • Calculus and Beyond Homework Help
Replies
1
Views
817
  • Calculus and Beyond Homework Help
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
Replies
4
Views
423
Back
Top