Answer
$$\int x\sin\frac{x}{2}dx=-2x\cos\frac{x}{2}+4\sin\frac{x}{2}+C$$
Work Step by Step
$$A=\int x\sin\frac{x}{2}dx$$
Take $u=x$ and $dv=\sin\frac{x}{2}dx$
We then have $du=dx$ and $v=-2\cos\frac{x}{2}$
Apply the formula $\int udv= uv-\int vdu$, we have $$A=x\times\Big(-2\cos\frac{x}{2}\Big)-\int-2\cos\frac{x}{2}dx$$
$$A=-2x\cos\frac{x}{2}+2\int\cos\frac{x}{2}dx$$
$$A=-2x\cos\frac{x}{2}+2\Big(2\sin\frac{x}{2}\Big)+C$$
$$A=-2x\cos\frac{x}{2}+4\sin\frac{x}{2}+C$$