How to show that $\int_{0}^{\infty}e^{-x}(x^2+3x+3)\cos(x){\mathrm dx\over (1+x)^3}=1?$ How to show that $(1)$ is 
$$\int_{0}^{\infty}e^{-x}(x^2+3x+3)\cos(x){\mathrm dx\over (1+x)^3}=1?\tag1$$
$$x^2+3x+3=\left(x+{3\over 2}\right)^2+{3\over 4}$$
$$\int_{0}^{\infty}e^{-x}\cos(x){\mathrm dx\over (1+x)^3}+\int_{0}^{\infty}e^{-x}\left(x+{3\over 2}\right)^2\cos(x){\mathrm dx\over (1+x)^3}=I_1+I_2\tag2$$
$$(1+x)^{-3}=\sum_{n=0}^{\infty}(-1)^n{n+2\choose n}x^n$$
$$\sum_{n=0}^{\infty}(-1)^n{n+2\choose n}\int_{0}^{\infty}x^{n}e^{-x}\cos(x)\mathrm dx=I_1\tag3$$
$$\sum_{n=0}^{\infty}(-1)^n{n+2\choose n}\int_{0}^{\infty}x^{n}e^{-x}\left(x+{3\over 2}\right)^2\cos(x)\mathrm dx=I_2\tag4$$
 A: Start with partial fractions:
$$ \frac{x^2+3x+3}{(1+x)^3} = \frac{1}{1+x} + \frac{1}{(1+x)^2} + \frac{1}{(1+x)^3} $$
Now let
$$ J_k = \int_0^\infty e^{-(1+i)x}\frac{dx}{(1+x)^k} $$
Integrating by parts,
$$ J_k = \frac{1-i}{2} - \frac{((1-i)k}{2} J_{k+1} $$
Using this for $k=1$ and $k=2$,  $J_1 + J_2 + J_3$ simplifies to $1 - i/2$.
Your integral is the real part of this, namely $1$. 
A: What I should do is to consider $$I=\int\frac{e^{-x} \left(x^2+3 x+3\right) \cos (x)}{(x+1)^3}\,dx$$
$$J=\int\frac{e^{-x} \left(x^2+3 x+3\right) \sin (x)}{(x+1)^3}\,dx$$
$$K=I+iJ=\int\frac{e^{(-1+i) x} \left(x^2+3 x+3\right)}{(x+1)^3}\,dx$$ Because of the cube in denominator, let us assume that $$K={e^{(-1+i) x}}\frac {P_n(x)}{(x+1)^2}$$ where $P_n(x)$ is a polynomial of degree $n$. This makes
$$K'=e^{(-1+i) x} \frac{(x+1) P_n'(x)-(1-i) (x+(2+i)) P_n(x)}{(x+1)^3}$$ So, to have an $x^2$ in the numerator of the integrand, we need $n=1$. Let $P_1(x)=a+b x$ and replace in $K'$. This yields to $$x^2+3x+3=(-1+i) b x^2+ ((-1+i) a-(2-i) b)x-(3-i) a+b$$ Comparing coefficients, this leads to $$b=-\frac{1+i}2\qquad a=-1-\frac i2$$ So, we know $K$.
Now, use the bounds and take the real part of it to get your result.
A: By partial integration, we have
\begin{align}
&\int_0^{+\infty}\frac{e^{-x}\cos x}{1+x}dx
=\int_0^{+\infty}\frac{e^{-x}}{1+x}d\sin x\\
&=\left.\frac{e^{-x}\sin x}{1+x}\right|_0^{+\infty}
+\int_0^{+\infty}e^{-x}\sin x\left[\frac{1}{1+x}+\frac1{(1+x)^2}\right]dx\\
&=0-\int_0^{+\infty}e^{-x}\left[\frac{1}{1+x}+\frac1{(1+x)^2}\right]d\cos x\\
&=\left.e^{-x}\cos x\left[\frac{1}{1+x}+\frac{1}{(1+x)^2}\right]\right|_0^{+\infty}
-\int_0^{+\infty}e^{-x}\cos x\left[\frac{1}{1+x}+\frac2{(1+x)^2}+\frac2{(1+x)^3}\right]dx\\
&=2-\int_0^{+\infty}e^{-x}\cos x\left[\frac{1}{1+x}+\frac2{(1+x)^2}+\frac2{(1+x)^3}\right]dx,
\end{align}
then
$$
\int_0^{+\infty}e^{-x}\cos x\frac{x^2+3x+3}{(1+x)^3}dx
=\int_0^{+\infty}e^{-x}\cos x\left[\frac{1}{1+x}+\frac1{(1+x)^2}+\frac1{(1+x)^3}\right]dx
=1.
$$
