Short argument for asymptotic value of parameter integral 
I want to find the main term of the asymptotic expansion for $x\to 0^+$ for
$$f(x)=\int_0^{\pi/2} \dfrac{\cos t}{t+x}dt.$$

Now, clearly, the problem is at $t=0$ and the cosine is almost $1$ there, so I can replace the cosine with $1$ and I can find my result.
However, to justify this approach, my only tool is to use the estimation of the cosine between $1-\dfrac{t^2}2$ and $1$ in this interval for the difference between $f(x)$ and the expression where the cosine is replaced with $1$ which is ok, but not very pretty.

What is the cleanest argument that goes from the start of the expansion of the cosine to the start of the expansion of the function $f$ without using any irrelevant calculatory details?

(I would be as happy with a link to a similar problem or an appropriate theorem or a rough sketch as with a complete solution.)
 A: Note that
$$\eqalign{f(x)&=\int_0^{\pi/2}\frac{1}{t+x} dt-\int_0^{\pi/2}\frac{1-\cos t }{t+x}dt\cr
&=\ln\left(\frac{\pi}{2}+x\right)-\ln x-
\int_0^{\pi/2}\frac{1-\cos t }{t}dt+
\int_0^{\pi/2}\left(\frac{1}{t}-\frac{1}{t+x}\right)(1-\cos t )dt\cr
&=\ln\left(\frac{\pi}{2}+x\right)-\ln x-
\int_0^{\pi/2}\frac{1-\cos t }{t}dt+x
\int_0^{\pi/2}\frac{1-\cos t}{t(t+x)}dt
}$$
Clearly, for the last integral we have
$$
0\leq \int_0^{\pi/2}\frac{1-\cos t}{t(t+x)}dt\leq \int_0^{\pi/2}\frac{1-\cos t}{t^2}dt.
$$
Also, $\ln(\frac{\pi}{2}+x)=\ln\frac{\pi}{2}+{\cal O}(x)$, combining these we conclude that, as $x\to0^+$ we have
$$
f(x)=C-\ln x+{\cal O}(x)
$$
where,
$$C=\ln\left(\frac{\pi}{2}\right)-\int_0^{\pi/2}\frac{1-\cos t}{t}\,dt=-\gamma+\hbox{Ci}\left(\frac{\pi}{2}\right).$$
where $\gamma$ is Euler's constant and $\hbox{Ci}$ is the CosIntegral function.
$\qquad\square$
A: I do not know how much this could help you. Suppose you change variable $t=z-x$; then $$\int \dfrac{\cos t}{t+x}dt=\int \dfrac{\cos (z-x)}{z}dz=\text{Ci}(z) \cos (x)+\text{Si}(z) \sin (x)$$ where appear the sine and cosine integrals. So, going back to $t$ and computing the integral, we arrive to $$f(x)=\int_0^{\pi/2} \dfrac{\cos t}{t+x}dt=\left(\text{Ci}\left(x+\frac{\pi }{2}\right)-\text{Ci}(x)\right) \cos
   (x)+\left(\text{Si}\left(x+\frac{\pi }{2}\right)-\text{Si}(x)\right) \sin (x)$$ If we now consider that $x$ is small, the beginning of the corresponding Taylor series is $$f(x) \simeq\left(\text{Ci}\left(\frac{\pi }{2}\right)-\gamma
   \right)- \log (x)+\text{Si}\left(\frac{\pi }{2}\right) x+O\left(x^2\right)$$
