Help with integral with parameter. I have this integral with parameter:
$$g(y)=\int_{0}^{\frac{\pi}{y}}\frac{\tan^2(xy)}{2x}dx$$

Also, $y&gt;0$
So i want to calculate $g'$.
How can i do this?
Any help would be really helpful.
Hint. Use the Leibniz integral rule. The first step is
$$g'(y)=\frac{\tan^2((\pi/y)\cdot y)}{2(\pi/y)}\cdot \frac{d}{dy}\left(\pi/y\right)
+\int_{0}^{\pi/y}\frac{d}{dy}\left(\frac{\tan^2(xy)}{2x}\right)dx.$$
$\newcommand{\angles}[1]{\left\langle\,{#1}\,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\Li}[1]{\,\mathrm{Li}_{#1}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$


  Lets consider a 'more' general case:&nbsp;$\ds{\,\mrm{G}\pars{y} \equiv \int_{0}^{\pi/y}{\mrm{f}\pars{xy} \over 2x}\,\dd x}$ for 'some'
  $\ds{\,\mrm{f}}$ such that $\ds{\mrm{G}\pars{y}}$ converges. Indeed,
  $\ds{\,\mrm{G}\pars{y}}$ is $\ds{y}$-independent:


\begin{align}
\mrm{G}\pars{y} &amp; =
\int_{0}^{\pi/y}{\mrm{f}\pars{xy} \over 2x}\,\dd x
\,\,\,\stackrel{x\ \equiv\ t/y}{=}\,\,\,
\int_{0}^{\pi}{\mrm{f}\pars{t} \over 2t}\,\dd t\quad\imp\quad
\color{#f00}{\mrm{G}'\pars{y}} = \color{#f00}{0}
\end{align}


  As pointed out by $\texttt{@Jack Lam}$, the "OP-original integral" diverges because
  $\ds{\tan^{2}\pars{t} = {1 \over \tan^{2}\pars{\pi/2 - t}} \sim
{1 \over \pars{t - \pi/2}^{2}}}$
  as $\ds{t \to \pi/2}$.