Results 1 to 4 of 4

Math Help - Integrating a piecewise trig function by parts

  1. #1
    Member
    Joined
    Jun 2012
    From
    Georgia
    Posts
    180
    Thanks
    22

    Integrating a piecewise trig function by parts

    The initial equation to integrate is is: B(n) = 0.4k * (integral(x*sin(n*pi*x),x,0,1/2) - integral(x*sin(n*pi*x),x,1/2,1) + integral(sin(n*pi*x),x,1/2,1))

    I keep getting B(n) = 0.4/(n*pi)^2 * (2*sin(n*pi)/2 - cos(n*pi) + cos(n*pi)/2)

    which is nowhere near the right answer. Help, please. The integration by parts is killing me. I know how to do it, but I keep messing up on it and I'm not sure where.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Behold, the power of SARDINES!
    TheEmptySet's Avatar
    Joined
    Feb 2008
    From
    Yuma, AZ, USA
    Posts
    3,764
    Thanks
    78

    Re: Integrating a piecewise trig function by parts

    Quote Originally Posted by phys251 View Post
    The initial equation to integrate is is: B(n) = 0.4k * (integral(x*sin(n*pi*x),x,0,1/2) - integral(x*sin(n*pi*x),x,1/2,1) + integral(sin(n*pi*x),x,1/2,1))

    I keep getting B(n) = 0.4/(n*pi)^2 * (2*sin(n*pi)/2 - cos(n*pi) + cos(n*pi)/2)

    which is nowhere near the right answer. Help, please. The integration by parts is killing me. I know how to do it, but I keep messing up on it and I'm not sure where.
    I don't know how much calculus you have taken, but if you are okay with exchanging integrals and derivatives you can do some "nifty" tricks.

    Here is the first one

    B(n)=.4k \int_{0}^{.5}x\sin(n \pi x)dx

    We can rewrite the integrand as a derivative with respect to n to get

    B(n)=.4k \int_{0}^{.5}\frac{-1}{\pi} \frac{d}{dn} \left( \cos(n \pi x) \right) dx

    Now if you exchange the integral and the derivative you get (This step should be verified)

    B(n)= -\frac{0.4k}{\pi} \frac{d}{dn}\int_{0}^{.5} \left( \cos(n \pi x) \right) dx

    Now we can take the integral with respect to x to get

    -\frac{0.4k}{\pi} \frac{d}{dn}\left( \frac{\sin(n \pi x)}{\pi n}\right)\bigg|_{0}^{\frac{1}{2}}

    \frac{0.4k}{\pi} \frac{d}{dn}\left( \frac{\sin\left(\frac{n \pi}{2} \right))}{\pi n}\right)

    \frac{0.4k}{\pi} \left( \frac{\pi}{2}\cdot \frac{\cos\left(\frac{n \pi}{2} \right))}{\pi n}- \frac{\sin\left(\frac{n \pi}{2} \right))}{\pi n^2}\right)
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Jun 2012
    From
    Georgia
    Posts
    180
    Thanks
    22

    Re: Integrating a piecewise trig function by parts

    Shouldn't this step:

    \frac{0.4k}{\pi} \frac{d}{dn}\left( \frac{\sin\left(\frac{n \pi}{2} \right))}{\pi n}\right)

    be negative?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member
    Joined
    Jun 2012
    From
    Georgia
    Posts
    180
    Thanks
    22

    Re: Integrating a piecewise trig function by parts

    Also, I can't get the right answer for the - integral(x*sin(n*pi*x),x,1/2,1) term.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. integrating trig function
    Posted in the Calculus Forum
    Replies: 3
    Last Post: June 11th 2012, 01:32 PM
  2. Replies: 14
    Last Post: October 7th 2011, 09:45 PM
  3. Integrating by Parts
    Posted in the Calculus Forum
    Replies: 4
    Last Post: January 18th 2010, 04:05 PM
  4. Integrating by parts ?
    Posted in the Calculus Forum
    Replies: 9
    Last Post: November 11th 2009, 10:03 PM
  5. integration by parts/ inverse trig function
    Posted in the Calculus Forum
    Replies: 3
    Last Post: November 10th 2008, 01:31 PM

Search Tags


/mathhelpforum @mathhelpforum