<s>[INST] Where am I going wrong when attempting to evaluate the integral $\int { 3tan^{ 2 }(x)sec(x)dx } $ Evaluate the integral:
$$\int 3\tan^2(x)\sec(x) \,dx $$
We begin by taking the constant outside of the integral to get:
$$3\int \tan^2(x)\sec(x)\,dx $$
Next, we use the identity $\tan^2 (x)=\sec^2 (x)-1$ in order to get:
$$3\int (\sec^2 (x)-1)\sec(x)\,dx$$
We can now distribute the $\sec(x)$ in order to get:
$$3\int (\sec^3 (x)-\sec(x))\,dx$$
which can then be simplified further into:
$$3\int \sec^3 (x)\,dx -3\int \sec(x)\,dx $$
We know that $\int \sec(x)\,dx $ is equal to $\ln (|\sec { (x) } + \tan { (x) } ) +C$, so we can simplify to:
$$3\int \sec^2 { (x) }\,dx - 3\ln (|\sec(x)+\tan(x)) +C$$
Now we must integrate $3\int \sec^3(x)\,dx$. We can do this by integrating by parts:
We start by letting $f(x)=\sec(x)$, $f'(x)=\tan(x)\sec(x)$, $g(x)=\tan(x)$, $g'(x)=\sec^2(x)$
Then we evaluate the integral:
$$3\int { \sec ^{ 3 }{ (x) } dx } =3\sec { (x) } \tan { (x) } -3\int { \sec { (x) } dx } \\ 3\int { \sec ^{ 3 }{ (x) } dx } =3\sec { (x) } \tan { (x) } -3\int { \sec ^{ 3 }{ (x) } -\sec { (x) } dx } \\ 3\int { \sec ^{ 3 }{ (x) } dx } =3\sec { (x) } \tan { (x) } -3[\int { \sec ^{ 3 }{ (x) } dx } -\int { \sec { (x) } dx } ]\\ 3\int { \sec ^{ 3 }{ (x) } dx } =3\sec { (x) } \tan { (x) } -3\int { \sec ^{ 3 }{ (x) } dx } +3\int { \sec { (x) } dx } \\ 6\int { \sec ^{ 3 }{ (x) } dx } =3\sec { (x) } \tan { (x) } +3\int { \sec { (x) } dx } \\ 6\int { \sec ^{ 3 }{ (x) } dx } =3\sec { (x) } \tan { (x) } +3\ln { (|\sec { (x) } +\tan { (x) } |) } +C\\ \int { \sec ^{ 3 }{ (x) } dx } =\frac { 3\sec { (x) } \tan { (x) } +3\ln { (|\sec { (x) } +\tan { (x) } |) }  }{ 6 } +C\\ \int { \sec ^{ 3 }{ (x) } dx } =\frac { \sec { (x) } \tan { (x) } +\ln { (|\sec { (x) } +\tan { (x) } |) }  }{ 2 } +C$$
Finally, we can replace the $3\int { \sec ^{ 3 }{ (x) } dx }$ in $3\int { \sec ^{ 3 }{ (x) } dx } -3\ln { (|\sec { (x) } +\tan { (x) } |) } +C$ to get:
$$\frac { \sec { (x) } \tan { (x) } +\ln { (|\sec { (x) } +\tan { (x) } |) }  }{ 2 } -3\ln { (|\sec { (x) } +\tan { (x) } |) } +C$$

So, this appears to be the wrong answer, but even with the aid of wolfram alpha, and other online integral calculators,I cannot seem to pinpoint where I went wrong. I would appreciate help/guidance in this matter.
 [/INST] It seems that you forgot to multiply $\int\sec^3(x)dx$ by $3$ :  
$$\begin{align}&\int 3\tan^2(x)\sec(x) dx\\&=3\int \sec^3(x)dx-3\int \sec (x)dx\\&=\color{red}{3}\cdot \frac {\sec(x)\tan(x)+\ln|\sec(x)+\tan(x)|}{2}-3\ln|\sec(x)+\tan(x)|+C\\&=\frac 32\sec(x)\tan(x)-\frac 32\ln|\sec(x)+\tan(x)|+C\end{align}$$
</s>