QUESTION. It is looked for a closed solution for following real integrals
$\displaystyle\int_0^{\infty}\displaystyle\frac{\cos{ax}}{x^3+1}dx$ and $\displaystyle\int_0^{\infty}\displaystyle\frac{\sin{ax}}{x^3+1}dx$
while the constant $a$ can be of any value; not only $a = 0$ or $a \rightarrow \infty$.
To explain the meaning of $a$, the first integral is considered in a practical context. The integral can be used to describe the stress distribution in flanged beam near a loading point where $r$ describes the stiffness of the flange, $F$ is a single force and $t$ is the wall thickness of the web. For the stress at the web's top it holds:
$\sigma = \displaystyle\frac{F}{\pi t r} \displaystyle\int_0^{\infty}\displaystyle\frac{\cos{\frac{d}{r}x}}{x^3+1}dx$

For a distance far remote from the loading point (meaning $a = d/r = \infty$), the stress (as the integral) will amount zero. In contrast the stress (as the integral) is maximum for $a = d/r = 0$. In this case the $\cos$-function drops out. By contour integration one gets
$\displaystyle\int_0^{\infty}\displaystyle\frac{dx}{x^3+1} = \frac{2\pi\sqrt{3}}{9}$
To describe the stress distribution as a whole the knowledge of the integral for any value $a$ is required.
TRIED SOLUTION. I try to solve the aforementioned real integrals considering the following complex integral
$\displaystyle\oint_C f(z)\,dz = \displaystyle\oint_C\displaystyle\frac{e^{iaz}}{z^3+1}\cdot \log{z}\, dz= \displaystyle\oint_C\displaystyle\frac{\cos{az}}{z^3+1}\cdot \log{z}\, dz+ i \displaystyle\oint_C\displaystyle\frac{\sin{az}}{z^3+1}\cdot \log{z}\, dz$
I know that such an approach is appropriate for the integration of $\frac{1}{x^3+1}$ within the same limits.
By $\log{z}$ the considered complex-valued function $f(z)$ gets a branch point at $z = 0$. This point is connected with $+\infty$ to form a branch cut. The contour $C = C_1\cup C_2 \cup C_3 \cup C_4$ does not cross the branch cut (see picture).

As the complex-valued function contains three poles $z_k$ inside $C$ it holds:
$\displaystyle\oint_C\displaystyle\frac{e^{iaz}}{z^3+1}\cdot \log{z}\,dz = 2\pi i \displaystyle\sum_{k = 1, 2,3}{\operatorname{Res} f(z): z_k}$
Looking at the paths it can be stated:
- Path $C_2$: integral tends to zero for $R \rightarrow\infty$ (Jordan's Lemma)
- Path $C_3$: integral tends to zero for $\varepsilon \rightarrow 0$ (can be proven)
Paths $C_1$ and $C_4$ would cancel out each other if the considered complex-valued function did not contain $\log{z}$. Through $\log{z}$ both paths differ by their imaginary parts.
Path $C_1$: $\log{z} = \ln{r} + i \cdot 0$
Path $C_4$: $\log{z} = \ln{r} + i \cdot 2\pi$
After extending the integrals for $C_1$ and $C_4$ I end up with:
$\displaystyle\oint_C\displaystyle\frac{e^{iaz}}{z^3+1} dz = - \displaystyle\sum_{k = 1, 2,3}{\operatorname{Res} f(z): z_k}$
I know for sure that the real integrals that I am looking for tend to zero for high values $a$ due to the oscillation, see picture. But my solution does not. I fear my approach is not correct. I would deeply appreciate any comment or hint.

REMARK #1: I want to add some information on parity for the sake of completeness as Lucian raised that issue although this approach did not turn out to be successful for my case.
I split the original function into an even and odd part.
$f(x) = f_{even}(x) + f_{odd}(x)$
$\displaystyle\frac{\cos{ax}}{x^3+1}= -\displaystyle\frac{\cos{ax}}{x^6-1}+\displaystyle\frac{x^3\cos{ax}}{x^6-1}$
This led to following integral:
$\displaystyle\int_0^{\infty}\displaystyle\frac{\cos{ax}}{x^3+1}dx = \displaystyle -\frac{1}{2}\int_{-\infty}^{+\infty}\displaystyle\frac{\cos{ax}}{x^6-1}dx + \displaystyle\int_{0}^{+\infty}\displaystyle\frac{x^3\cos{ax}}{x^6-1}dx$
The different integration limits can be attributed to the symmetrical properties of the even function (meaning that integral from $-\infty$ to 0 equals integral from 0 to $+\infty$) that makes things easier.
I did the same splitting for the complex-valued function and chose the two contours shown in the picture.

The integration of the even function along $C$ can be easily done as the integral of path $C_2$ dies out for $R \rightarrow\infty$ (Jordan's Lemma - here it holds indeed). For pole $z_1$ only half of the residuum has to be account for, as this pole is located on the boundary of the considered contour.
When integrating the odd part, the integral along path $C_2$ vanishes for $R \rightarrow\infty$ (similar to Jordan's Lemma), too. But the contribution of path $C_3$ cannot be neglected, unfortunately.
REMARK #2: Differentiation under the integral sign using the third derivative
I generalize the integral by introducing a parameter $b$:
$I(b) = \displaystyle\int_0^{\infty}\displaystyle\frac{\cos{ax}}{x^3+1}\left(\frac{x^3b^3}{6}+\frac{b^3}{6} +1\right)dx$
For $b = 0$ I get the integral that I am looking for.
Now I determine the third derivative with respect to $b$ hoping that it turns into an expression that can be easily integrated with respect to $x$. As $\displaystyle\frac{\cos{ax}}{x^3+1}$ is considered as a constant while deriving with respect to $b$ I end up with
$\displaystyle\frac{d^3I(b)}{db^3} = \displaystyle\frac{d^3}{db^3}\displaystyle\int_0^{\infty}\displaystyle\frac{\cos{ax}}{x^3+1}\left(\frac{x^3b^3}{6}+\frac{b^3}{6} +1\right)dx = \displaystyle\int_0^{\infty}\displaystyle\frac{\cos{ax}}{x^3+1} \frac{\partial^3}{\partial b^3}\left(\frac{x^3b^3}{6}+\frac{b^3}{6} +1\right)dx$
Auxiliary calculations:
- $\displaystyle\frac{\partial}{\partial b}\left(\frac{x^3b^3}{6}+\frac{b^3}{6} +1\right) = \frac{x^3b^2}{2}+\frac{b^2}{2}$
- $\displaystyle\frac{\partial^2}{\partial b^2}\left(\frac{x^3b^3}{6}+\frac{b^3}{6} +1\right) = x^3 b+b$
- $\displaystyle\frac{\partial^3}{\partial b^3}\left(\frac{x^3b^3}{6}+\frac{b^3}{6} +1\right) = x^3 +1$
That gives a third derivative that does not converge.
$\displaystyle\frac{d^3I(b)}{db^3} = \displaystyle\int_0^{\infty}\cos{ax}\,dx = \left[\frac{1}{a}\sin{ax} \right]^{\infty}_0$
To conclude: although the used generalized integral does not seem to be appropriate, remark #2 regards the problem from a different angle that might be helpful for further discussions. Thanks to all contributors.
This is wrong, only the integral over half of $C_2$ - the upper half if $a > 0$, the lower half if $a < 0$ - tends to $0$ as $R\to\infty$ by Jordan's lemma. On the other half of $C_2$, the exponential $e^{iaz}$ blows up, $\lvert e^{iaz}\rvert = e^{-a\operatorname{Im} z}$, and that leads to the integral over that half of $C_2$ tending to a nonzero limit as $R\to \infty$.
– Daniel Fischer Dec 08 '14 at 15:48$$ \int_{0}^{\infty}\cos\left(, ax,\right),{\rm d}x =\pi\delta\left(, a,\right) $$ in a 'distribution sense'.
– Felix Marin Dec 10 '14 at 03:11