<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's take the derivative:
$$g'(x)=(-3(1-2x-3x^2)^\frac{2}{3})'=-3 \frac 2 3 (1-2x-3x^2)^{\frac {-1}3}(-6x-2)$$
$$g'(x)=2 (1-2x-3x^2)^{\frac {-1}3}(6x+2)=\frac {12x+4}{(1-2x-3x^2)^{\frac {1}3}}$$
</s>