This is a very basic question, but i'm struggling with it. Can someone explain the rules when dividing a fraction like this: $$\frac{\cos(\pi x)\sin(\pi x)}{\Large{\frac{\cos(\pi x)}{\sin(\pi x)}}}$$
Is this equal to $\large{\frac{\cos(\pi x)\sin^{2}(\pi x)}{\cos(\pi x)}}$ or $\large{\frac{\cos(\pi x)\sin(\pi x)}{\cos(\pi x)\sin(\pi x)}} = 1$
And why is it equal to one of them but not the other? Also, could you show how one can get from $\large{\frac{\cos(\pi x)\sin(\pi x)}{\Large{\frac{\cos(\pi x)}{\sin(\pi x)}}}}$ to $\tan(\pi x)$?
Let $A = \cos(\pi x)$ and $B = \sin(\pi x)$, then $$\require{cancel}\frac{AB}{\frac{A}{B}} = \frac{AB}{\frac{A}{B}}\cdot\frac{B}{B} = \frac{ABB}{\frac{A}{\cancel{B}}\cancel{B}} = \frac{\bcancel{A}B^2}{\bcancel{A}} = B^2$$ First we multiplied by $1 = B/B$, after that we just simplified.
Therefore we have that $$\frac{\cos(\pi x)\sin(\pi x)}{\frac{\cos(\pi x)}{\sin(\pi x)}} = \sin^2(\pi x) $$ which is equal to the first of your two options.
For your second question, remember that $$\tan (x) = \frac{\sin(x)}{\cos(x)} $$ so to get from $\sin^2(\pi x)$ to $\tan (\pi x)$ we need to divide once by $\sin(\pi x)$ (to remove the square) and once by $\cos (\pi x)$, so in total divide by $\sin(\pi x) \cdot\cos(\pi x)$.