<s>[INST] How to solve the integral $\int \frac{4+12x}{({1-2x-3x^2})^\frac{2}{3}}\,dx$ $$\int \frac{4+12x}{({1-2x-3x^2})^\frac{1}{3}}\,dx$$
So first I tried setting $u = 1-2x-3x^2, du = -2-6x\,dx$
Which gives
$$-2\int u^\frac{-1}{3}du = \frac{-6 u^\frac{2}{3}}{2} =-3u^\frac{2}{3}$$
And ultimately:
$$-3(1-2x-3x^2)^\frac{2}{3}$$
For some odd reason when I take the derivative I'm getting something completely different, what's wrong with my substitution?
 [/INST] Let $u=1-2x-3x^2$, then $\mathrm{d}u=-\left(6x+2\right)\mathrm{d}x$
$$
\begin{align}
\int\frac{4+12x}{(1-2x-3x^2)^{1/3}}\,\mathrm{d}x
&=\int\frac{-2\,\mathrm{d}u}{u^{1/3}}\\
&=-3u^{2/3}+C\\[3pt]
&=-3\left(1-2x-3x^2\right)^{2/3}+C
\end{align}
$$

Looking at the answer in the question, this is pretty much exactly what was done. So the question is about what happened when the derivative was taken.
$$
\begin{align}
-3\frac{\mathrm{d}}{\mathrm{d}x}\left(1-2x-3x^2\right)^{2/3}
&=-2\left(1-2x-3x^2\right)^{-1/3}\frac{\mathrm{d}}{\mathrm{d}x}\left(1-2x-3x^2\right)\\
&=\frac{4+12x}{\left(1-2x-3x^2\right)^{1/3}}
\end{align}
$$
It's hard to tell what went wrong when you computed the derivative, since that wasn't shown.
</s>