Given a function I seek to find its derivative $$f(x) = \int_{\frac{1}{x}}^{\frac{e^x}{x}} \frac{\cos(xt)}{t} \, dt, \quad (x>0)$$My question is regarding the justification of the differentiation under the integral sign rather than how to do it.The theorems that I have at hand are the following.
$\textbf{Theorem 1}$Let $[a,b]$ compact interval, $J$ open interval, suppose that $f(x,t), \frac{\partial f}{\partial t}(x, t)$ continuous for $(x,t)\in [a,b]\times J$. Then $F(t) = \int_{a}^{b}\frac{\partial f}{\partial t}(x, t) \,dx\quad t\in J$.
$\textbf{Theorem 2 (For generalised domains)}$Suppose there are majorants $g(x), h(x)$ such that $\left| f(x,t) \right| \le g(x), \left| \frac{\partial f}{\partial t}(x, t) \right| \le h(x)$ and $\int_Ig(x)\,dx < \infty,\quad \int_Ih(x)\,dx < \infty $. We form $F(t) = \int_If(x,t)\, dx$ then $F(t)$ is differentiable and $F'(t) = \int_I\frac{\partial f}{\partial t}(x, t) \,dx$.
Now if we come back to the function I gave as an example if $x<\infty$ then the interval is compact it is also clear that the integrand and its derivative are continuous on that interval hence differentiation is justified as I understand. Now consider $x \to \infty$ if we use the second theorem a possible majorant is $\frac{1}{t}$ but leads to $x<\infty$. As I understand this is not possible as $x$ here is a variable. A similar issue occurs with bounding its derivative. Could anyone clarify what I am misunderstanding, or perhaps I am choosing the wrong majorants? Perhaps I have to assume that the interval is not generalised.
Thanks for any ideas and clarifications!