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!

Integration by parts

  1. Sep 11, 2014 #1
    1. The problem statement, all variables and given/known data
    Hello!

    I am having some trouble solving this integral by parts. I hope someone can help me.

    ##\int \cos(x)cos(kx) dx##

    It is need for a fourier series


    2. Relevant equations
    I am using this definition:

    ##\int f(x)g(x) dx = f(x)G(x)-\int f'(x)G(x) dx##

    since its an even function i need to find ##a_k## and ##a_0##, i've found ##a_0## no worries about that.



    3. The attempt at a solution

    ##\int f(x)g(x) dx = \frac{cos(x)sin(kx)}{k} - \int \frac{-sin(x)sin(kx)}{k}##

    I can't remember/see the next rule of integration when having two sin functions. Or am i doing something wrong?
     
    Last edited: Sep 11, 2014
  2. jcsd
  3. Sep 11, 2014 #2

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Any particular knowledge about k you can share with us ?

    Oh, and: use the template !
     
  4. Sep 11, 2014 #3
    k is just an integer thats about it.

    I'll remember that next time.
     
  5. Sep 11, 2014 #4

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    So what do you do when k = 1 ?
    Next question: what do you do when k = 2 ?
    And you can guess the third question, right ?
     
  6. Sep 11, 2014 #5
    I need it for a fourier series where the inteval is from [0, ##\pi## ]. f(x)=cos(x) so it is an even function which means i need to calculate ##a_0## and ##a_k##.

    It is ##a_k## who i am trying to calculate right now by parts, but i am stuck at it.
     
    Last edited: Sep 11, 2014
  7. Sep 11, 2014 #6

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Ah, so it concerns integrals with definite limits. Also something that would have been clearly described under 1.
    And you would have provided some relevant equations under 2. e.g. ##\sin k\pi=0##, etc.

    Never too late to catch up!
    1. The problem statement, all variables and given/known data


    2. Relevant equations


    3. The attempt at a solution

    Have to go now, perhaps others can take over...
     
  8. Sep 11, 2014 #7
    yeah sorry!

    Actually that is what confuses me. if ##\sink\pi=0## then there is only ##\frac{cos(x)sin(kx)}{k}## left? Does that mean that this is my ##a_k##??
     
    Last edited: Sep 11, 2014
  9. Sep 11, 2014 #8
    so when taking the interval into account i get the result ##a_k=\frac{-sin(k\pi)}{k}## which is wroooong
     
    Last edited: Sep 11, 2014
  10. Sep 11, 2014 #9

    gneill

    User Avatar

    Staff: Mentor

    The new integral looks very much like the initial one, only using sin() rather than cos(). Your instinct should be to apply Integration by Parts again, leading to something of the form:

    f(x) = g(x) - c*f(x)

    from which you can isolate f(x).
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Integration by parts
  1. Integration by parts (Replies: 6)

  2. Integration by Parts (Replies: 8)

Loading...