- #1
dlacombe13
- 100
- 3
Homework Statement
∫ (x2+2x)cos(x) dx
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?