Integrate $\tan^2(\frac{\pi}{12} \cdot y)$ Integrate $\tan^2(\frac{\pi}{12} \cdot y)$
Wolfram gives the answer:
$$\frac{12 \tan(\frac{\pi y}{12})}{\pi} -y + \text{constant}$$
But why is the value of $\tan^2$ not getting differentiated?
According to this rule, the answer should be:
$$\frac{\tan(\frac{\pi}{12} \cdot y)}{\frac{\pi}{12} \cdot (2-1)}$$
($\dfrac{\pi}{12}$ is a constant so it's not differentiated)
Also, what is meant by aX? In my case, what's my "aX"? $\frac{\pi}{12} \cdot y$? So does the "a" simply means what's before the variable y? $\frac{\pi}{12}$?
 A: Let $\frac{\pi}{12}\cdot y=t\implies \frac{\pi}{12}dy=dt\iff dy=\frac{12}{\pi}dt$
We have $$\int \tan^2\left(\frac{\pi}{12}\cdot y\right)dy=\int \tan^2 (t) \frac{12}{\pi}dt$$ $$=\frac{12}{\pi}\int \tan^2(t)dt$$
$$=\frac{12}{\pi}\int (\sec^2(t)-1)dt$$
$$=\frac{12}{\pi}\int\sec^2(t)dt-\frac{12}{\pi}\int dt$$
$$=\frac{12}{\pi}\tan(t)-\frac{12}{\pi}\cdot t+C$$
Setting $t=\frac{\pi}{12}\cdot y$
$$=\frac{12}{\pi}\tan\left(\frac{\pi}{12}\cdot y\right)-\frac{12}{\pi}\cdot \frac{\pi}{12}\cdot y+C$$
$$=\color{red}{\frac{12}{\pi}\tan\left(\frac{\pi}{12}\cdot y\right)-y+C}$$
A: While the rule 
$$\int \tan^n axdx = \frac{\tan^{n-1} ax}{a(n-1)} - \int \tan^{n-2}axdx$$
may superficially look as if it was derived by integrating by parts, it wasn't. We simply substitute $\sec^2 ax - 1$ for $\tan ^2ax$
$$\int \tan^n axdx = \int \tan^2ax\tan^{n-2} axdx=\int(\sec^2ax-1)\tan^{n-2}axdx$$
$$=\int\sec^2ax\tan^{n-2}axdx -\int\tan^{n-2}axdx$$
The first part is easily integrated by substituting $u=\tan ax\implies dx = \frac{du}{a\cdot\sec^2 ax}$
$$=\int\frac{u^{n-2}}{a}du - \int\tan^{n-2}axdx=\frac{u^{n-1}}{a(n-1)}-\int\tan^{n-2}axdx+C$$
$$=\frac{\tan^{n-1}ax}{a(n-1)}-\int\tan^{n-2}axdx+C$$
Applying the rule gives,
$$\int \tan^2\bigg(\frac{\pi}{12}y\bigg)dy=\frac{\tan^1ax}{\frac{\pi}{12}(2-1)}-\int\tan^0axdx=\frac{12}{\pi}\tan ax - \int dy$$
$$=\frac{12}{\pi}\tan ax - y+C$$
One final word, saying things like "what's before the variable y" is the first step to memorization mayhem. $a$ does not come before $y$, but rather, $a$ is multiplied by the variable of integration
$$\text{e.g.}\int \tan^n (ax)dx = \int\tan^n(x\cdot a) dx$$
A: I think you should forget about those integrating rules. It is better to learn techniques.
I think you have two problems here:
1) to find a primitive function of $\tan^2 y$.
Here I suggest that you recall the differentiation rule
$$
D\tan y=1+\tan^2y.
$$
It implies directly that
$$
\int \tan^2y\,dy=\int (1+\tan^2y)-1\,dy=\tan y-y.
$$
2) What happens with a primitive when scaling the argument.
In general if $F$ is a primitive function to $f$ (that is $\int f(y)\,dy=F(y)+C$, and $a\neq 0$,
$$
\int f(a y)\,dy = \frac{1}{a}F(ay).
$$
So, in your case $f(y)=\tan^2y$, and $a=\pi/12$, so
$$
\int \tan^2(\pi y/12)\,dy=\frac{1}{\pi/12}\bigl(\tan (\pi y/12)-\pi y/12\bigr)=\frac{12\tan(\pi y/12)}{\pi}-y.
$$
Of course, one could add a $C$ in the end to get all primitives.
A: Recall that $\int \tan^2 x\ dx = \int {\sin^2 x \over 1 - \sin^2 x} dx = -x + \tan x$, we find:
$\int \tan^2 \left( {\pi y \over 12} \right) d y = \frac{12 \tan \left(\frac{\pi  y}{12}\right)}{\pi }-y$
