Converting Trig equation in Maple $$\frac{\sin^4(3x)}{18\cos^6(3x)} + \frac{\sin^4(3x)}{36\cos^4(3x)} = \frac{\tan^6(3x)}{18} + \frac{\tan^4(3x)}{12}$$
The answer on the left is what I got when I punched in the problem in Maple: $\operatorname{int}(\tan^3(3x)\cdot\sec(3x)^4, x)$
The answer on the right is my own using u-sub and a trig identity. I need to convert the Maple answer into the same form as the answer I came up with. Whether someone can show me how to do that in Maple somehow or manually would be greatly appreciated :). I tried to convert it manually and got to:
$$\frac{\tan^4(3x)\cdot(2+\cos^2(3x)))}{36\cos^2(3x)}$$
I'm not sure how to proceed past this point or even if this equation is correct so far.

Let's do this manually, since it's actually not that bad! I'll write in a condensed notation with $s=\sin(3x)$ and $c=\cos(3x)$ so I can type this more easily.
\begin{align*}
\frac{s^4}{18c^6} + \frac{s^4}{36c^4} &=\frac{s^4}{18c^6}-\frac{s^4}{18c^4} + \frac{s^4}{18c^4} + \frac{s^4}{36c^4} \\
&=\frac{s^4(c^2+s^2)}{18c^6} -\frac{s^4c^2}{18c^6}+\frac{s^4}{12c^4} \\
&= \frac{s^6}{18c^6} +\frac{s^4}{12c^4}
\end{align*}
Which is your answer!
