Example 12. Find $\int\left(2^{3 x}-1\right)^{2} \cdot 4^{x} d x$.
$$
\begin{aligned}
& \int\left(2^{3 x}-1\right)^{2} \cdot 4^{x} d x=\int\left(2^{6 x}-2 \cdot 2^{3 x}+1\right) \cdot 2^{2 x} d x= \\
&=\int\left(2^{8 x}-2^{5 x+1}+2^{2 x}\right) d x=\frac{1}{8} \cdot \frac{2^{8 x}}{\ln 2}-\frac{1}{5} \cdot \frac{2^{5 x+1}}{\ln 2}+\frac{1}{2} \cdot \frac{2^{2 x}}{\ln 2}+C= \\
&=\left(2^{8 x-3}-\frac{1}{5} \cdot 2^{5 x+1}+2^{2 x-1}\right) \cdot \frac{1}{\ln 2}+C
\end{aligned}
$$

Solution. Under the integral, we perform the operations.

$$
\begin{aligned}
& \int\left(2^{3 x}-1\right)^{2} \cdot 4^{x} d x=\int\left(2^{6 x}-2 \cdot 2^{3 x}+1\right) \cdot 2^{2 x} d x= \\
&=\int\left(2^{8 x}-2^{5 x+1}+2^{2 x}\right) d x=\frac{1}{8} \cdot \frac{2^{8 x}}{\ln 2}-\frac{1}{5} \cdot \frac{2^{5 x+1}}{\ln 2}+\frac{1}{2} \cdot \frac{2^{2 x}}{\ln 2}+C= \\
&=\left(2^{8 x-3}-\frac{1}{5} \cdot 2^{5 x+1}+2^{2 x-1}\right) \cdot \frac{1}{\ln 2}+C
\end{aligned}
$$