This appears to be a chain rule question, but I'm struggling with the setup. My attempt is as follows:
Let $F:\mathbb{R}^2\rightarrow\mathbb{R}$,
$F(u,v)=\int_u^{u^2}$tan$(v+y)dy$,
$u:\mathbb{R}\rightarrow\mathbb{R}^2$,
and $u(x)=(u(x),v(x))=(x,x)$.
Then writing $f(x)=(F\circ u)(x)$ allows for use of the chain rule:
$D(F\circ u)(x)=DF(u(x),v(x))Du(x)=\left[\frac{\partial F}{\partial u}\mbox{ }\frac{\partial F}{\partial v}\right]\begin{bmatrix}u'(x)\\v'(x)\end{bmatrix}=\frac{\partial F}{\partial u}(u(x))u'(x)+\frac{\partial F}{\partial v}(u(x))v'(x)$
Then by the Fundamental Theorem of Calculus,
$\frac{\partial F}{\partial u}=\frac{\partial}{\partial u}\int_u^{u^2}tan(v+y)dy=\mbox{tan}(v+u)=\mbox{tan}(x+x)=\mbox{tan(2x)}$
And similarly,
$\frac{\partial F}{\partial v}=\frac{\partial}{\partial v}\int_u^{u^2}\mbox{tan}(v+y)dy=\int_u^{u^2}\frac{\partial}{\partial v}\mbox{tan}(v+y)dy=\int_x^{x^2}\frac{\partial}{\partial x}\mbox{tan}(x+y)dy=\int_x^{x^2}\mbox{sec}^2(x+y)dy$
However at this point, I'm relatively convinced I'm making a major mistake, either with my entire substitution or with the way I'm handling the boundaries. Any advice is much appreciated.
Using Leibniz integral rule:
\begin{align} f'(x) &= 2x\tan(x+x^2) - \tan(2x) + \int_x^{x^2} \frac{dy}{\cos^2(x+y)}\\ &= 2x\tan(x+x^2) - \tan(2x)+ \tan(x+y)\Big|_x^{x^2}\\ &= (2x+1)\tan(x+x^2) - 2\tan(2x) \end{align}