1. **State the problem:** We need to evaluate the integral $$\int \frac{x^2 + x + 5}{x^2 + 4x + 10} \, dx.$$\n\n2. **Rewrite the denominator:** Complete the square for the denominator:\n$$x^2 + 4x + 10 = (x^2 + 4x + 4) + 6 = (x+2)^2 + 6.$$\n\n3. **Express the numerator in terms of $(x+2)$:** Let $u = x+2$, then $x = u - 2$. Substitute into numerator:\n$$x^2 + x + 5 = (u-2)^2 + (u-2) + 5 = u^2 - 4u + 4 + u - 2 + 5 = u^2 - 3u + 7.$$\n\n4. **Rewrite the integral in terms of $u$:**\n$$\int \frac{u^2 - 3u + 7}{u^2 + 6} \, du.$$\n\n5. **Split the integral:**\n$$\int \frac{u^2 + 6 - 3u + 1}{u^2 + 6} \, du = \int \frac{u^2 + 6}{u^2 + 6} \, du - \int \frac{3u}{u^2 + 6} \, du + \int \frac{1}{u^2 + 6} \, du.$$\n\n6. **Simplify the first integral:**\n$$\int 1 \, du = u + C.$$\n\n7. **Evaluate the second integral:** Use substitution $w = u^2 + 6$, so $dw = 2u \, du$, then\n$$\int \frac{3u}{u^2 + 6} \, du = \frac{3}{2} \int \frac{dw}{w} = \frac{3}{2} \ln|w| + C = \frac{3}{2} \ln(u^2 + 6) + C.$$\n\n8. **Evaluate the third integral:** Recognize it as a standard form:\n$$\int \frac{1}{u^2 + a^2} \, du = \frac{1}{a} \arctan\left(\frac{u}{a}\right) + C,$$ where $a^2 = 6$, so $a = \sqrt{6}$. Thus,\n$$\int \frac{1}{u^2 + 6} \, du = \frac{1}{\sqrt{6}} \arctan\left(\frac{u}{\sqrt{6}}\right) + C.$$\n\n9. **Combine all parts:**\n$$\int \frac{x^2 + x + 5}{x^2 + 4x + 10} \, dx = u - \frac{3}{2} \ln(u^2 + 6) + \frac{1}{\sqrt{6}} \arctan\left(\frac{u}{\sqrt{6}}\right) + C,$$\nwhere $u = x + 2$.\n\n10. **Final answer:**\n$$\boxed{(x+2) - \frac{3}{2} \ln\left((x+2)^2 + 6\right) + \frac{1}{\sqrt{6}} \arctan\left(\frac{x+2}{\sqrt{6}}\right) + C}.$$
Integral Rational Beee2D
Step-by-step solutions with LaTeX - clean, fast, and student-friendly.