Help with this Trigonometry integral I've to find this integral:
$$\int_{\frac{\pi}{365}}^{\frac{365} {\pi}}\left(\frac{4^\pi}{\tan(x)}+\tanh^{-1}(x)-4\sec^2(x)\right)dx$$
So far as I know to go:
$$\int_{\frac{\pi}{365}}^{\frac{365} {\pi}}\left(\frac{4^\pi}{\tan(x)}+\tanh^{-1}(x)-4\sec^2(x)\right)dx=$$
$$\int_{\frac{\pi}{365}}^{\frac{365} {\pi}}\left(4^\pi\cdot \frac{1}{\tan(x)}+\tanh^{-1}(x)-4\sec^2(x)\right)dx=$$
$$\int_{\frac{\pi}{365}}^{\frac{365} {\pi}}\left(4^\pi \cot(x)+\tanh^{-1}(x)-4\sec^2( x)\right)dx$$
Thanks a lot!
 A: Hints:
$$\begin{align}&\int\frac{dx}{\tan x}=\int\frac{\cos x}{\sin x}dx=\log|\sin x|+C\\{}\\
&\int\arctan x\;dx\stackrel{\text{by parts}}=x\arctan x-\frac12\log\left(1+x^2\right)+C\\{}\\
&\int\sec^2x\;dx=\tan x+C\end{align}$$
A: The hyperbolic tangent is between $-1$ and $1$, so the inverse hyperbolic tangent is not defined outside that range.  At least, it's not real.
A: Hint. Each term of the integrand has an elementary antiderivative on an appropriate domain.


*

*We have


$$
\int\frac1{\tan x}\:dx=\int\frac{\cos x}{\sin x}=\ln (\sin x)+C.
$$ 


*

*Integrating by parts we have


$$
\int \tanh^{-1}(x)\:dx=x \tanh^{-1}(x)-\int\frac{x}{1-x^2}=x \tanh^{-1}(x)+\frac12 \ln\left(1-x^2\right)+C.
$$ 


*

*We have


$$
\int\sec^2(x)\:dx=\int\frac1{\cos^2 x}dx=\tan x+C.
$$
A: $$\int_{\frac{\pi}{365}}^{\frac{365}{\pi}}\left(\frac{4^\pi}{\tan(x)}+\tanh^{-1}(x)-4\sec^2(x)\right)dx$$
$$\int_{\frac{\pi}{365}}^{\frac{365}{\pi}}\left(\frac{4^\pi}{\tan(x)}+\tanh^{-1}(x)-4\sec^2(x)\right)dx=$$
$$\int_{\frac{\pi}{365}}^{\frac{365}{\pi}}\left(4^\pi\cdot \frac{1}{\tan(x)}+\tanh^{-1}(x)-4\sec^2(x)\right)dx=$$
$$\int_{\frac{\pi}{365}}^{\frac{365}{\pi}}\left(4^\pi \cot(x)+\tanh^{-1}(x)-4\sec^2(x)\right)dx=$$
$$\int_{\frac{\pi}{365}}^{\frac{365}{\pi}}\left(4^\pi \cot(x)\right)dx+\int_{\frac{\pi}{365}}^{\frac{365}{\pi}}\left(\tanh^{-1}(x)\right)dx+\int_{\frac{\pi}{365}}^{\frac{365}{\pi}}\left(4\sec^2(x)\right)dx=$$
$$4^\pi\cdot\int_{\frac{\pi}{365}}^{\frac{365}{\pi}}\left( \cot(x)\right)dx+\int_{\frac{\pi}{365}}^{\frac{365}{\pi}}\left(\tanh^{-1}(x)\right)dx+4\cdot\int_{\frac{\pi}{365}}^{\frac{365}{\pi}}\left(\sec^2(x)\right)dx=$$
$$4^\pi\cdot\left[\ln(\sin(x))\right]_{\frac{\pi}{365}}^{\frac{365}{\pi}}+\left[\frac{1}{2}\ln(1-x^2)+x\tanh^{-1}(x)\right]_{\frac{\pi}{365}}^{\frac{365}{\pi}}+4\cdot\left[\tan(x)\right]_{\frac{\pi}{365}}^{\frac{365}{\pi}}=$$
$$4^\pi\left(a\right)+\left(b\right)+4\left(c\right)\Longrightarrow$$

$$a=\ln\left(\sin\left(\frac{365}{\pi}\right)\right)-\ln\left(\sin\left(\frac{\pi}{365}\right)\right)$$
$$b=\left(\frac{1}{2}\ln\left(1-\left(\frac{365}{\pi}\right)^2\right)+\frac{365}{\pi}\cdot\tanh^{-1}\left(\frac{365}{\pi}\right)\right)-\left(\frac{1}{2}\ln\left(1-\left(\frac{\pi}{365}\right)^2\right)+\frac{\pi}{365}\cdot\tanh^{-1}\left(\frac{\pi}{365}\right)\right)$$
$$c=\tan\left(\frac{365}{\pi}\right)-\tan\left(\frac{\pi}{365}\right)$$
