Integral x^2 sin(x) dx

Let I = ∫x^2 sinx dx

u = x^2
du = 2x dx

dv = sinx
v = -cosx

∫u dv = uv - ∫v du
= -x^2 cosx + ∫2x cosx dx

now, for ∫x cosx dx,

u = x
du = dx

dv = cosx dx
v = sinx

I = -x^2 cosx + 2(x sinx - ∫sinx dx)
= -x^2 cosx + 2x sinx + 2cosx + C
= 2x sinx + (2-x^2)cosx + C

To calculate the integral of x^2 * sin(x) dx, we can use integration by parts, which is a formula that allows us to integrate products of functions.

The integration by parts formula is ∫u * dv = uv - ∫v * du, where u and v are functions of x, and du and dv are their respective differentials.

Let's apply this formula to the integral of x^2 * sin(x) dx:

Step 1: Identify u and dv
u = x^2 (choose the polynomial function that becomes simpler when differentiated)
dv = sin(x) dx (choose the trigonometric function that is the derivative of its integral)

Step 2: Calculate du and v
To find du, differentiate u with respect to x:
du = d(x^2) = 2x dx

To find v, integrate dv with respect to x:
v = ∫sin(x) dx = -cos(x) (by integrating the standard integral of sin(x))

Step 3: Apply the integration by parts formula
∫x^2 * sin(x) dx = uv - ∫v * du

Using the formula, we have:
∫x^2 * sin(x) dx = x^2 * (-cos(x)) - ∫(-cos(x)) * (2x dx)

Simplifying the above expression, we get:
∫x^2 * sin(x) dx = -x^2 * cos(x) + 2 * ∫x * cos(x) dx

Step 4: Evaluate the remaining integral
To evaluate ∫x * cos(x) dx, we can once again use integration by parts.

Let's repeat the steps:

Step 1: Identify u and dv
u = x (choose the polynomial function that becomes simpler when differentiated)
dv = cos(x) dx (choose the trigonometric function that is the derivative of its integral)

Step 2: Calculate du and v
To find du, differentiate u with respect to x:
du = d(x) = dx

To find v, integrate dv with respect to x:
v = ∫cos(x) dx = sin(x) (by integrating the standard integral of cos(x))

Step 3: Apply the integration by parts formula
∫x * cos(x) dx = uv - ∫v * du

Using the formula, we have:
∫x * cos(x) dx = x * sin(x) - ∫sin(x) dx

Simplifying the above expression, we get:
∫x * cos(x) dx = x * sin(x) + ∫sin(x) dx

Step 4: Evaluate the remaining integral
To evaluate ∫sin(x) dx, we know that it is equal to -cos(x) (by integrating the standard integral of sin(x)).

Therefore, ∫x * cos(x) dx = x * sin(x) + (-cos(x)) = x * sin(x) - cos(x)

Finally, substituting this result back into the expression we obtained from step 3, we have:

∫x^2 * sin(x) dx = -x^2 * cos(x) + 2 * (x * sin(x) - cos(x))

So, the integral of x^2 * sin(x) dx is:
∫x^2 * sin(x) dx = -x^2 * cos(x) + 2 * x * sin(x) - 2 * cos(x) + C, where C is the constant of integration.