So I have two integration by parts problems that I am having trouble with. For both of these problems, I have the answer but I cannot figure out how to get there.

The first one is . First off, I made u = x^2 and dv = cos(x)dx. Next step, I found that du = 2xdx and v = sin(x). So going off of , I got . Simplifying that down further leaves me with . However, the answer is . What did I mess up?

And the second one is . I made u = x^2 and dv = . So that meant that du = 2xdx and v = 1/6(4x-1)^3/2. The next step left me with . Simplifying that further left me with . But, the correct answer is . Again, where did I mess up so badly?