# Thread: Solving integrals by parts :D

1. ## Solving integrals by parts :D

Hi, I'm having a little trouble solving an integral by parts, here is what I have so far:

The integral of xsin(x/2)dx

I let u(random letter) = x.
so du = dx.
and dv = sin(x/2).
and v = cos(x/2).

Then I do UV-the integral of dvu.

I then get:

xCos(x/2) - the integral of sin(x/2)x dx

And this is the part I get confused on, am I supposed to do:
xCos(x/2) - -Cos(x/2)x dx
which means
xCos(x/2) + Cos(x/2)x dx
And from here I am lost, does anyone know what I should do?

2. Originally Posted by vandorin
Hi, I'm having a little trouble solving an integral by parts, here is what I have so far:

The integral of xsin(x/2)dx

I let u(random letter) = x.
so du = dx.
and dv = sin(x/2).
and v = cos(x/2).

Then I do UV-the integral of dvu.

I then get:

xCos(x/2) - the integral of sin(x/2)x dx

And this is the part I get confused on, am I supposed to do:
xCos(x/2) - -Cos(x/2)x dx
which means
xCos(x/2) + Cos(x/2)x dx
And from here I am lost, does anyone know what I should do?
2. Its better to use the substitution $t=\frac{x}{2}$ First. then use integration by parts.

3. Originally Posted by vandorin
Hi, I'm having a little trouble solving an integral by parts, here is what I have so far:

The integral of xsin(x/2)dx

I let u(random letter) = x.
so du = dx.
and dv = sin(x/2).
and v = cos(x/2).

Then I do UV-the integral of dvu.

I then get:

xCos(x/2) - the integral of sin(x/2)x dx

And this is the part I get confused on, am I supposed to do:
xCos(x/2) - -Cos(x/2)x dx
which means
xCos(x/2) + Cos(x/2)x dx
And from here I am lost, does anyone know what I should do?
You have the wrong function for $V$

$V=-2cos\left(\frac{1}{2}x\right)$

You can check that by differentiating. Always make sure you have the right functions before you apply IBP.

Now you just need to apply the formula

$\int udv=uv-\int vdu$

$=-2xcos\left(\frac{1}{2}x\right)-\int -2cos\left(\frac{1}{2}x\right)dx$

You have the wrong function for $V$

$V=-2cos\left(\frac{1}{2}x\right)$

Now you just need to apply the formula

$\int udv=uv-\int vdu$

$=-2xcos\left(\frac{1}{2}x\right)-\int -2cos\left(\frac{1}{2}x\right)dx$

OH! Is v=-2xCos because v is the antiderivative of dv? so it is what you have to take the derivative of to get dv?

But I am confused as to why there is a -2 infront of the second cos?

5. Originally Posted by vandorin
OH! Is v=-2xCos because v is the antiderivative of dv? so it is what you have to take the derivative of to get dv?

But I am confused as to why there is a -2 infront of the second cos?
Correct. To find the "v", you will integrate "dv".
To find your "v", Evaluate $\int sin(\frac{x}{2}) dx=\int sin(\frac{1}{2}x)dx$
The result of this integral is your "v". (Take the constant of integration = 0).
To evaluate this integral, substitute $t=\frac{1}{2}x$.

6. Originally Posted by vandorin
OH! Is v=-2xCos because v is the antiderivative of dv? yes, but v=2cos, and u=x. The isn't an x infront of the cosine until we combine u and v in the formula $\int udv=uv-\int vdu$

so it is what you have to take the derivative of to get dv?

But I am confused as to why there is a -2 infront of the second cos?
Remember that the derivative of $[cos(x)=-sin(x)$ That's where the negative sign comes from. So if

$v=-2cos\left(\frac{1}{2}x\right)$

$\frac{dv}{dx}=sin\left(\frac{1}{2}x\right)$

7. Originally Posted by General
Correct. To find the "v", you will integrate "dv".
To find your "v", Evaluate $\int sin(\frac{x}{2}) dx=\int sin(\frac{1}{2}x)dx$
The result of this integral is your "v". (Take the constant of integration = 0).
To evaluate this integral, substitute $t=\frac{1}{2}x$.
Ok, thanks . I understand why my v was wrong now. I still don't understand why there would be a 2 in front of the second cos though? because I'm multiplying u*v - the integral of sin(1/2 x) x

So how does that come out to be -2cos etc? And plus my book is telling me the answer is something like
-2xCos(x/2)+4Sin(x/2)+c

I'm completely lost on everything except how to get the c haha.

8. Originally Posted by vandorin
Ok, thanks . I understand why my v was wrong now. I still don't understand why there would be a 2 in front of the second cos though? because I'm multiplying u*v - the integral of sin(1/2 x) x

So how does that come out to be -2cos etc? And plus my book is telling me the answer is something like
-2xCos(x/2)+4Sin(x/2)+c

I'm completely lost on everything except how to get the c haha.
I told you : Your "v" = $\int sin(\frac{1}{2}x) dx$ , and take the constant of the integration of this integral = 0.

You can not integrate this simple integral?

9. Originally Posted by General
I told you : Your "v" = $\int sin(\frac{1}{2}x) dx$ , and take the constant of the integration of this integral = 0.

You can not integrate this simple integral?
I can, and so the whole equation would look like:

-2xCos(1/2 x) - -2Cos(1/2x)x Because the integral of sin is -cos, but won't this equation come out to just be x? since the -2Cos(1/2 x) and +2Cos(1/2x) cancel out, so you are just left with x?

10. Originally Posted by vandorin
I can, and so the whole equation would look like:

-2xCos(1/2 x) - -2Cos(1/2x)x Because the integral of sin is -cos, but won't this equation come out to just be x? since the -2Cos(1/2 x) and +2Cos(1/2x) cancel out, so you are just left with x?
No, Your integration for the $\int v du$ is wrong.
If you apply the integration by parts for the original integral with $u=x$ and $dv=sin(\frac{x}{2}) dx$, you will face:
$-2xcos(\frac{x}{2}) + 2 \int cos(\frac{x}{2})dx$.
Now, integrate the new integral again. And be careful when you do that.

11. Originally Posted by General
No, Your integration for the $\int v du$ is wrong.
If you apply the integration by parts for the original integral with $u=x$ and $dv=sin(\frac{x}{2}) dx$, you will face:
$-2xcos(\frac{x}{2}) + 2 \int cos(\frac{x}{2})dx$.
Now, integrate the new integral again. And be careful when you do that.
Ah, I've got it now. I was thinking that the formula was "UV-DVU" When it is actually "UV-VDU" That is what was throwing me off. Thanks for the help!