1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

A never ending integral?

  1. Sep 13, 2009 #1
    A never ending integral?(last post hopefully the solution :))

    1. The problem statement, all variables and given/known data

    I am trying to solve the integral

    [tex]\frac{1}{2\pi} \int_{0}^{\pi} e^{-inx} \cdot cos(x) dx [/tex]

    but it freaking never ends :(

    2. Relevant equations

    This should have been to be solve by integration by parts but I can never get the v in

    [tex]uv - \int v du [/tex] to get small enough to end the integral

    3. The attempt at a solution

    I take the orignal integral

    [tex]\frac{1}{2\pi} \int_{0}^{\pi} e^{-inx} \cdot cos(x) dx [/tex]

    let u = cos(x) and [tex]du = -sin(x) dx [/tex]

    then [tex] v = \frac{i \cdot e^{-inx}}{n}[/tex] since [tex]dv = e^{-inx} dx[/tex]

    thus [tex] \frac{1}{2\pi} \int_{0}^{\pi} e^{-inx} \cdot cos(x) dx = \frac{-sin(n\pi)}{n}+ (\frac{-cos(n\pi)}{n} - \frac{1}{n}) \cdot i - \int_{0}^{\pi} \frac{i \cdot e^{-inx}}{n} \cdot -sin(x) dx [/tex]

    If I do integration by parts a second time I get

    [tex]u = -sin(x), du = -cos(x) dx[/tex] and [tex]dv = \frac{i \cdot e^{-inx}}{n}[/tex] and thus [tex]v = \frac{i \cdot e^{-inx}}{n^2}[/tex]

    Which gives me

    [tex] -sin(x) \cdot \frac{i \cdot e^{-inx}}{n^2}|_{0}^{\pi} - \int_{0}_{\pi} \frac{i \cdot e^{-inx}}{n^2} \cdot -cos(x) dx [/tex]

    and I then end up with an expression which looks like this

    [tex]I = \frac{1}{2\pi} \int_{0}^{\pi} e^{-inx} \cdot cos(x) dx = \frac{-sin(n\pi)}{n}+ (\frac{-cos(n\pi)}{n} - \frac{1}{n}) \cdot i - \int_{0}^{\pi} \frac{i \cdot e^{-inx}}{n^2} \cdot -cos(x) dx [/tex]

    Dick, by solving it you mean

    [tex]I = \frac{1}{2\pi} \int_{0}^{\pi} e^{-inx} \cdot cos(x) dx + \int_{0}^{\pi} \frac{i \cdot e^{-inx}}{n^2} \cdot cos(x) dx = \frac{-sin(n\pi)}{n}+ (\frac{-cos(n\pi)}{n} - \frac{1}{n}) \cdot i [/tex]?

    Sincerely

    Susanne.
     
    Last edited: Sep 14, 2009
  2. jcsd
  3. Sep 13, 2009 #2
    Have you tried doing the integral from the integration by parts and then solving an equation for the original integral?
     
  4. Sep 13, 2009 #3

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    If that;s not enough of a hint for you, just do integration by pats twice , then make the substitution

    [tex]I=\frac{1}{2\pi} \int_{0}^{\pi} e^{-inx}\cos x dx[/tex]

    And solve the resulting equation for [itex]I[/itex].
     
  5. Sep 13, 2009 #4

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    As snipez90 said, if you let I=the original integral, then if you do integration by parts once more (so the sin turns back into a cos), you should get (a bunch of stuff)-I. So I=(a bunch of stuff)-I. Solve for I.
     
  6. Sep 13, 2009 #5
    made some changes to my original post.

    Is that what you are refering too?

    Am I not ment to get rid of the final integral???

    Sincerely

    Susanne.
     
  7. Sep 13, 2009 #6

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    I didn't check the details of the integration, but yes, that's the general idea. Now call I the integral of cos(x)*exp(-inx). It occurs on both sides of your equation. Solve for it.
     
  8. Sep 13, 2009 #7
    changed my post again,

    If my integration and if my rearranging of the equation is what you are refering too. Do I then as a final step covert the sum of the two integrals into one sum which then results in the right-hand side of the equation?
     
  9. Sep 13, 2009 #8

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    I'm not quite sure what you mean there, but what I meant is to write 'I' for the integral. So the left side of your equation is I/(2pi)+I*i/n^2. Factor the I out, like I*(1/(2pi)+i/n^2). Now solve for I.
     
  10. Sep 13, 2009 #9
    Silly me I found out that maybe I had to much to drink at the party

    anyway after using a lot of paper I found that the antiderivative of

    [tex]I = \frac{1}{2\pi} \cdot \int_{0}^{\pi} e^{-i \cdot n \cdot x} \cdot cos(x) dx[/tex]

    Has the antiderivative

    [tex]\frac{1}{2\pi} \cdot \frac{e^{-i \cdot n \cdot x} \cdot (sin(x) - \cdot i \cdot n \cdot cos(x))}{i^2 \cdot n^2 +1}|_ {0}^{\pi} [/tex]

    Which gives me

    [tex]c_n = \frac{-n \cdot sin(\pi \cdot n)}{2(n^2-1)\cdot \pi} + (\frac{-n \cdot cos(n \pi)}{2(n^2-1)\cdot \pi} - \frac{n}{2(n^2-1)\cdot \pi}) \cdot i[/tex]

    where [tex]c_n = \frac{1}{2\pi} \cdot \int_{-\pi}^{\pi} f(x) \cdot e^{-inx} dx [/tex]

    What I am suppose to show is that

    if the function f defined on the interval [tex]]-\pi,\pi[[/tex]

    where [tex]f(x) = \left( \begin{array}{ccc}0 & -\pi < x \leq 0 \\ cos(x) & 0 < x < \pi \end{array}[/tex]

    has a corresponding fourier series.

    on the form

    [tex]\sum_{-\infty}^{\infty} c_n \cdot e^{inx} }[/tex]


    I am new to Fourier series so I would like be sure have I covered all aspect of showing what the corresponding fourier series for f(x) is?

    Sincerely
    Susanne.
     
    Last edited: Sep 13, 2009
  11. Sep 13, 2009 #10

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    Your result for [itex]c_n[/itex] is correct, but the work you've shown on the integration leads me to believe you might still be a little lost.... If so ,first redo your integration by parts without forgetting the factor of 1/2pi...you should get:

    [tex]\begin{aligned}\frac{1}{2\pi} \int_{0}^{\pi} e^{-inx}\cos x \operator{d}x & =\frac{1}{2\pi} \left. \left[\frac{i}{n}e^{-inx}\cos x-\frac{1}{n^2}e^{-inx}\sin x\right]\right|_0^{\pi}+\frac{1}{2\pi n^2}\int_{0}^{\pi} e^{-inx}\cos x dx \\ & =-\frac{i(1+e^{-in\pi})}{2n\pi}+\frac{1}{2\pi n^2}\int_{0}^{\pi} e^{-inx}\cos x dx\end{aligned}[/tex]

    Do you have any trouble getting to this point?

    From here, just make the substitution [itex]I\equiv \frac{1}{2\pi}\int_{0}^{\pi} e^{-inx}\cos x dx[/itex] giving you:

    [tex]I=-\frac{i(1+e^{-in\pi})}{2n\pi}+\frac{1}{n^2}I[/tex]

    Then just solve for [itex]I[/itex]

    You can also simplify your final result for [itex]c_n[/itex], by noting that for integer values of [itex]n[/itex], you have [itex]\sin(n\pi)=0[/itex] and [itex]\cos(n\pi)=(-1)^n[/itex]
     
  12. Sep 13, 2009 #11
    Hi and thank you for your answer :)

    If I solve for I i get

    [tex] I - \frac{I}{n^2} = \frac{i(1+e^{-inx})}{2n\pi} <-> I - I = n^2\frac{i(1+e^{-inx})}{2n\pi} [/tex]

    am I then to understand that the above result with respect I is the same as my C_n in the previous post?

    Sincerely
    Susanne.
     
    Last edited: Sep 13, 2009
  13. Sep 13, 2009 #12

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    Huh?!:confused:

    Is this just a problem you are having with typing in [itex]\LaTeX[/itex] (i.e. a typo), or do you really mean this nonsensical gibberish?

    [tex] I - \frac{I}{n^2}=\left(1-\frac{1}{n^2}\right)I = \frac{i(1+e^{-inx})}{2n\pi}\implies I= \frac{i(1+e^{-inx})}{2n\pi\left(1-\frac{1}{n^2}\right)}[/tex]
     
  14. Sep 13, 2009 #13
    Latex typoo Sir :redface:

    Anyway to isolate I insert the old integral in place of I

    [tex]I=-\frac{i(1+e^{-in\pi})}{2n\pi}+\frac{1}{n^2}I[/tex]

    and get

    [tex]\frac{1}{2\pi} \int_{0}^{\pi} e^{-inx} \cdot cos(x) dx=-\frac{i(1+e^{-in\pi})}{2n\pi}+\frac{1}{n^2} \cdot \frac{1}{2\pi} \int_{0}^{\pi} e^{-inx} \cdot cos(x) dx[/tex]

    and this equals my C_n. Isn't that you are saying?
    Sincerely
    Susanne

    p.s. if x = [tex]x = \pi p[/tex] where [tex]p \in \mathbb{Z}[/tex]

    then find the sum of the series

    don't I just inserting any n+1 p into C_n and find the convergence sum?
     
    Last edited: Sep 13, 2009
  15. Sep 13, 2009 #14

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    No, what good would that do?!

    To isolate [itex]I[/itex] just use some basic algebra. Start with

    [tex]I=-\frac{i(1+e^{-in\pi})}{2n\pi}+\frac{1}{n^2}I[/tex]

    Subtract [itex]\frac{1}{n^2}I[/itex] from both sides of the equation. Then factor out [itex]I[/itex] on the LHS, and finally divide both sides of the equation by [itex](1-\frac{1}{n^2})[/itex].

    You have studied basic algebra right?
     
  16. Sep 13, 2009 #15
    Then if

    [tex]c_n = \frac{i(1+e^{-inx})}{2n\pi\left(1-\frac{1}{n^2}\right)}[/tex]

    then [tex]cos(x) = \frac{i(1+e^{-inx})}{2n\pi\left(1-\frac{1}{n^2}\right)} \cdot e^{inx} [/tex]

    next find the sum if [tex]x = \pi \cdot p[/tex] where [tex]p \in \mathbb{Z}[/tex]

    [tex]f(p\pi) = 1 = \sum_{n=1}^{\infty} (\frac{i(1+e^{-inx})}{2n\pi\left(1-\frac{1}{n^2}\right)} \cdot e^{in\pi})[/tex]

    this can be expanded [tex]\frac{1}{2\pi}\cdot i \cdot \sum_{n=1}^{N} (\frac{n(cos(n\pi)+1}{(n^2+1)}) = \sum_{n=1}^{N} \frac{\frac{n(cos(n\pi)+1}{(n-1)} = 2[/tex]

    This means that by sum expansion that the sum of the series is [tex]\frac{1}{2\pi} \cdot \mathrm{i}[/tex]

    Is that would the sum should be?

    Sincerely
    Susanne.
     
    Last edited: Sep 14, 2009
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook