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!

Integral with sine(x) and x multiplied

  1. Feb 28, 2015 #1

    Maylis

    User Avatar
    Gold Member

    1. The problem statement, all variables and given/known data
    I'm doing a physics problem, but I'm stuck on the math part. My integral is

    $$ \frac {2 \sqrt {15}}{a^{3}} \int_{0}^{a} \hspace{0.01 in} sin(\frac {n \pi}{a} x)x(a-x) dx $$
    Where ##a## is a constant, and ##n = 1,2,3,...##

    2. Relevant equations


    3. The attempt at a solution
    I will separate these into two integrals

    $$ \frac {2 \sqrt {15}}{a^{3}} \Big [ \int_{0}^{a} ax \hspace{0.01 in} sin(\frac {n \pi}{a}x) dx - \int_{0}^{a} x^{2} \hspace {0.01 in} sin( \frac {n \pi}{a} x) \Big ] dx $$

    But from here, I know I could look up on the internet some sort of integral table, but the one I found

    upload_2015-3-1_0-13-19.png
    upload_2015-3-1_0-14-0.png
    Is this integral reasonable to solve by hand, or is it just better to use the table?
     
  2. jcsd
  3. Feb 28, 2015 #2

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    It's just integration by parts. Try doing x*sin(x) using the method. It would be good practice.
     
  4. Feb 28, 2015 #3

    Maylis

    User Avatar
    Gold Member

    Okay, that was a fun little exercise to do the integration by parts (it's been a couple years)

    So for the first term
    $$ \frac {2 \sqrt {15}}{a^{3}} \int_{0}^{a} ax \hspace{0.01 in} sin(\frac {n \pi}{a}x) \hspace {0.01 in} dx $$
    I will set ##u = x##, ##du = dx##, ##dv = sin(\frac {n \pi}{a} x) dx##, ##v = - \frac {a}{n \pi} \hspace {0.01 in} cos (\frac {n \pi}{a} x)##
    So using integration by parts (and cancelling the ##a## term in the integral with the one outside)
    $$ \int u \hspace {0.01 in} dv = uv - \int v \hspace {0.01 in} du $$

    $$ \frac {2 \sqrt {15}}{a^{2}} \Big [ x \frac {-a}{n \pi} \hspace {0.01 in} cos (\frac {n \pi}{a} x) - \int - \frac {a}{n \pi} \hspace {0.01 in} cos (\frac {n \pi}{a} x) \hspace {0.01 in} dx \Big ] $$
    $$ \frac {2 \sqrt {15}}{a^{2}} \Big [ x \frac {-a}{n \pi} \hspace {0.01 in} cos (\frac {n \pi}{a} x) + \frac {a^{2}}{n^{2} \pi^{2}} \hspace {0.01 in} sin(\frac {n \pi}{a} x) \Big ] \bigg |_{0:a} $$
    $$ \frac {2 \sqrt {15}}{a^{2}} \Big [ \frac {-a^{2}}{n \pi} \hspace {0.01 in} cos (n \pi) + \frac {a^{2}}{n^{2} \pi^{2}} \hspace {0.01 in} sin(n \pi) \Big ] $$
    The first term reduces to
    $$ \frac {-2 \sqrt {15}}{n \pi} \hspace {0.01 in} cos (n \pi) + \frac {2 \sqrt {15}}{n^{2} \pi^{2}} \hspace {0.01 in} sin(n \pi) $$

    Now for the second term
    ##u = x^{2}##, ##du = 2x \hspace {0.01 in} dx##, ##dv = sin(\frac {n \pi}{a} x) dx##, ##v = - \frac {a}{n \pi} \hspace {0.01 in} cos (\frac {n \pi}{a} x)##
    $$ \frac {2 \sqrt {15}}{a^{3}} \Big [ x^{2} \frac {-a}{n \pi} \hspace {0.01 in} cos (\frac {n \pi}{a} x) + \frac {1}{2} \int \frac {a}{n \pi} \hspace {0.01 in} cos (\frac {n \pi}{a} x) \hspace {0.01 in} dx \Big ]$$
    $$ \frac {2 \sqrt {15}}{a^{3}} \Big [ x^{2} \frac {-a}{n \pi} \hspace {0.01 in} cos (\frac {n \pi}{a} x) + \frac {a^{2}}{2n^{2} \pi^{2}} \hspace {0.01 in} sin (\frac {n \pi}{a} x) \Big ] \bigg |_{0:a} $$
    $$ \frac {2 \sqrt {15}}{a^{3}} \Big [ \frac {-a^{3}}{n \pi} \hspace {0.01 in} cos (n \pi) + \frac {a^{2}}{2n^{2} \pi^{2}} \hspace {0.01 in} sin (n \pi) \Big ]$$
    The second term reduces to
    $$ \frac {-2 \sqrt{15}}{n \pi} \hspace {0.01 in} cos (n \pi) + \frac {\sqrt {15}}{an^{2} \pi^{2}} \hspace {0.01 in} sin (n \pi) $$

    Now going all the way back, I have to subtract these terms,
    $$\Big [ \frac {-2 \sqrt {15}}{n \pi} \hspace {0.01 in} cos (n \pi) + \frac {2 \sqrt {15}}{n^{2} \pi^{2}} \hspace {0.01 in} sin(n \pi) \Big ] - \Big [\frac {-2 \sqrt{15}}{n \pi} \hspace {0.01 in} cos (n \pi) + \frac {\sqrt {15}}{an^{2} \pi^{2}} \hspace {0.01 in} sin (n \pi) \Big ] $$

    Simplifying to
    $$ c_{n} = \frac {\sqrt {15}}{n^{2} \pi^{2}} \hspace {0.01 in} sin(n \pi) \big (2 - \frac {1}{a} \big ) $$
     
    Last edited: Feb 28, 2015
  5. Feb 28, 2015 #4

    Maylis

    User Avatar
    Gold Member

    I think the author just used a table, not sure if his solution is equivalent to mine
    upload_2015-3-1_1-21-22.png
     
  6. Feb 28, 2015 #5

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Are you aware that ##\sin(n\pi)=0## so you got ##0##?
     
  7. Feb 28, 2015 #6

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    A useful alternative method is to use "differentiation under the integral sign". Here is how it works.

    We have ##\sin(\theta) = \text{Im}\: e^{i \theta}##, where ##\text{Im}## denotes the imaginary part. Also: the integral of the imaginary part equals the imaginary part of the integral (for integration over real numbers). So, if we write
    [tex] F(k) = \int_0^a e^{i x k/a} \, dx [/tex]
    we can use the facts that
    [tex] \frac{d}{dk} e^{i k x /a} = \frac{i x}{a} e^{i k x/a} [/tex]
    and
    [tex] \frac{d^2}{dk^2} e^{i k x/a} = -\frac{x^2}{a^2} e^{i k x/a} [/tex]
    to get
    [tex] \int_0^a x(a-x) e^{i k x/a} \, dx = \left( 1 + \frac{a^2}{i} \frac{d}{dk} + a^2 \frac{d^2}{dk^2} \right) F(k) [/tex]
    You can easily find ##F(k)##, take the derivatives above, and simplify. Then you can take the imaginary part, to get the integral with ##\sin(k x /a)## in the integrand. Finally, you can set ##k = n \pi## and simplify further.
     
    Last edited: Feb 28, 2015
  8. Feb 28, 2015 #7

    Maylis

    User Avatar
    Gold Member

    Where did I go wrong in my integration? Everything seems to check out...I overlooked that I got zero, but at least it is connect if ##n## is even...but my solution is for all ##n##
     
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: Integral with sine(x) and x multiplied
  1. Integrate X²e^-x² (Replies: 11)

  2. Integral of x(e^x) (Replies: 1)

  3. Integrating sine^x (Replies: 5)

Loading...