# Integrate x cos x

#### Understand the Problem

The question is asking for the integral of the function x multiplied by the cosine of x. This requires applying integration techniques such as integration by parts.

$x \sin(x) + \cos(x) + C$

The final answer is $$x \sin(x) + \cos(x) + C$$

#### Steps to Solve

1. Identify components for integration by parts

Integration by parts formula is: $$\int u \ dv = uv - \int v \ du$$

For the integral $$\int x \cos(x) , dx$$, let: $u = x$ and $dv = \cos(x) , dx$

1. Differentiate and integrate components
• Differentiate $u = x$: $$\frac{du}{dx} = 1 \implies du = dx$$
• Integrate $dv = \cos(x) , dx$: $$v = \int \cos(x) , dx = \sin(x)$$
1. Substitute into the integration by parts formula

Substitute $u$, $v$, $du$, and $dv$ into the integration by parts formula: $$\int x \cos(x) , dx = x \sin(x) - \int \sin(x) , dx$$

1. Evaluate the remaining integral

The remaining integral is: $$- \int \sin(x) , dx$$

We know: $$\int \sin(x) , dx = -\cos(x)$$

Therefore: $$- \int \sin(x) , dx = \cos(x)$$

1. Combine results

Combine the results to obtain the final answer: $$\int x \cos(x) , dx = x \sin(x) + \cos(x) + C$$

where $C$ is the constant of integration.

The final answer is $$x \sin(x) + \cos(x) + C$$

A common mistake is incorrectly choosing $u$ and $dv$. Make sure to pick them such that the resulting integral is simpler to solve.