Evaluate the integral: I = integral x^4cos x dx
Evaluate the integral: $$ I = \int x^4\cos x\,dx. $$
Explanation of Method
Integration by parts with $u=x^4$, $dv=\cos x\,dx$ reduces the power of $x$ by one. Repeating this three more times eventually eliminates the polynomial factor entirely, leaving only trig terms.
- Apply integration by parts four times in succession, each time reducing the power of $x$ by one.
- Combine all the resulting terms.
Step 1 · First integration by parts
Let $u=x^4$, $dv=\cos x\,dx$, so $du=4x^3dx$, $v=\sin x$:
$$ I = x^4\sin x - \int 4x^3\sin x\,dx. $$
Step 2 · Second integration by parts
Let $u=4x^3$, $dv=\sin x\,dx$, so $du=12x^2dx$, $v=-\cos x$:
$$ \int 4x^3\sin x\,dx = -4x^3\cos x + \int 12x^2\cos x\,dx. $$
Step 3 · Third integration by parts
Let $u=12x^2$, $dv=\cos x\,dx$, so $du=24x\,dx$, $v=\sin x$:
$$ \int 12x^2\cos x\,dx = 12x^2\sin x - \int 24x\sin x\,dx. $$
Step 4 · Fourth integration by parts
Let $u=24x$, $dv=\sin x\,dx$, so $du=24\,dx$, $v=-\cos x$:
$$ \int 24x\sin x\,dx = -24x\cos x + \int 24\cos x\,dx = -24x\cos x + 24\sin x. $$
Step 5 · Combine all pieces
Working back up through each substitution:
$$ \int 12x^2\cos x\,dx = 12x^2\sin x - \left(-24x\cos x+24\sin x\right) = 12x^2\sin x+24x\cos x-24\sin x. $$
$$ \int 4x^3\sin x\,dx = -4x^3\cos x + \left(12x^2\sin x+24x\cos x-24\sin x\right). $$
$$ I = x^4\sin x - \left(-4x^3\cos x+12x^2\sin x+24x\cos x-24\sin x\right). $$
Step 6 · Simplify
$$ I = x^4\sin x + 4x^3\cos x - 12x^2\sin x - 24x\cos x + 24\sin x + C. $$
Summary Table
| Round | Reduces |
|---|---|
| 1 | $x^4\to x^3$ |
| 2 | $x^3\to x^2$ |
| 3 | $x^2\to x$ |
| 4 | $x\to$ constant |
Additional Notes
- The integrand is defined for all real $x$.
- Each round of integration by parts alternates between $\sin x$ and $\cos x$ and flips a sign, producing the alternating pattern seen in the final answer: $+,+,-,-,+$ on the five terms.
- The result can be checked by differentiating $x^4\sin x+4x^3\cos x-12x^2\sin x-24x\cos x+24\sin x$; all the intermediate terms cancel in pairs, leaving only $x^4\cos x$.
Result
The solution to the integral is: