# int xsin^2x dx Find the indefinite integral

To solve the indefinite integral, we follow int f(x) dx = F(x) +C

where:

f(x) as the integrand function

F(x) as the antiderivative of f(x)

C as the constant of integration.

For the given integral problem: int x sin^2(x) dx, we may apply integration by parts: int u *dv = uv - int v *du .

We may let:

u = x  then du =1 dx or dx

dv= sin^2(x) dx then v = x/2 - sin(2x)/4

Note: From the table of integrals, we have int sin^2(ax) dx = x/2 - sin(2ax)/(4a) . We apply this on v =int dv =intsin^2(x) dx   where a =1 .

Applying the formula for integration by parts, we have:

int x sin^2(x) dx= x*(x/2 - sin(2x)/4 ) - int (x/2 - sin(2x)/4 ) dx

=x^2/2 - (xsin(2x))/4 - int (x/2 - sin(2x)/4 ) dx

For the integral:  int (x/2 - sin(2x)/4 ) dx , we may apply the basic integration property: : int (u-v) dx = int (u) dx - int (v) dx .

int (x/2 - sin(2x)/4 ) dx =int (x/2) dx -int sin(2x)/4 ) dx

 = 1/2 int x dx - 1/4 int sin(2x) dx .

Apply the Power rule for integration:

int x^n dx = x^(n+1)/(n+1) +c

1/2 int x dx = 1/2*x^(1+1)/(1+1)

= 1/2* x^2/2

= x^2/4

Apply the basic integration formula for sine function: int sin(u) du = -cos(u) +C .

Let: u =2x then du = 2 dx or (du)/2 = dx .

1/4 int sin(2x) dx = 1/4 int sin(u) * (du)/2

= 1/4 *1/2 int sin(u) du

= 1/8 (-cos(u))

= -cos(u)/8

Plug-in u = 2x on -cos(u)/8 , we get: 1/4 int sin(2x) dx =-cos(2x)/8 .

Combining the results, we get:

int (x/2 - sin(2x)/4 ) dx =x^2/4 - (-cos(2x)/8) +C

 =x^2/4+ cos(2x)/8 +C

Then, the complete indefinite integral will be:

int x sin^2(x) dx=x^2/2 - (xsin(2x))/4 - int (x/2 - sin(2x)/4 ) dx

=x^2/2 - (xsin(2x))/4 -(x^2/4+ cos(2x)/8) +C

=x^2/2 - (xsin(2x))/4 - x^2/4 - cos(2x)/8 +C

= (x^2)/4- (xsin(2x))/4- cos(2x)/8 +C