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!

Need help factoring the solution to this integral

  1. Feb 10, 2016 #1
    1. The problem statement, all variables and given/known data
    ∫ (x2+2x)cos(x) dx

    3. The attempt at a solution
    I will not show the entire solution because it is quite long (had to use integration by parts twice), and my problem isn't with getting the solution. My problem is the book shows one answer (which is equivalent to mine, but factored in a way that I cannot seem to achieve).

    The answer I got (verified by symbolab and wolfram alpha)
    x2sin(x) - 2[sin(x) - xcos(x)] + 2[xsin(x) + cos(x)] + C
    Which I managed to factor (using rearranging and grouping) into:
    sin(x)(x2 + 2x - 2) + 2cos(x)(x + 1) + C

    The book's answer is very, very close to mine, but it is irking me that I do not know how to get it exactly as such:
    sin(x)(x2 + 2x) + 2cos(x)(x + 1) - 2sin(x) + C

    Could someone help me figure out how to turn my factored answer into the book's answer?
     
  2. jcsd
  3. Feb 10, 2016 #2
    You just need to multiply the first sine function out to get that ##-2\sin(x)## term in there. In full detail, write $$\sin(x)(x^2 + 2x - 2) = x^2 \sin(x) + 2x \sin(x) - 2 \sin(x) = \sin(x) (x^2 + 2x) - 2 \sin(x).$$
     
  4. Feb 10, 2016 #3

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Did you miss the fact that ##\sin(x) (x^2 + 2x - 2) = \sin(x)(x^2 + 2x) - 2 \sin(x)##?
     
  5. Feb 10, 2016 #4
    Yes I certainly did... I guess what I didn't realize was that it was just the basic property a(b+c) = ab+ac but in the form a(b+c+d) = a(b+c)+ad. Thanks for pointing out what I missed!
     
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: Need help factoring the solution to this integral
  1. Need help factoring (Replies: 4)

Loading...