543. Find the integrals:
1) $\int \frac{d x}{2 \sin x - \cos x}$
2) $\int \frac{d x}{5 + 4 \cos a x}$
3) $\int \frac{\tan x \, d x}{1 - \cot^2 x}$;
4) $\int \frac{e^{3 x} \, d x}{e^{2 x} + 1}$.
Solution. 1) Assuming $\operatorname{tg} \frac{x}{2}=z$ and replacing $\sin x, \cos x$ and $d x$ with their expressions in terms of $z$ derived from this substitution, we get

$$
\begin{gathered}
\int \frac{d x}{2 \sin x-\cos x}=\int \frac{2 d z}{z^{2}+4 z-1}=2 \int \frac{d(z+2)}{(z+2)^{2}-5}= \\
=\frac{1}{\sqrt{5}} \ln \left|\frac{z+2-\sqrt{5}}{2+2+\sqrt{5}}\right|+C=\frac{1}{\sqrt{5}} \ln \left|\frac{2-\sqrt{5}+\operatorname{tg} \frac{x}{2}}{2+\sqrt{5}+\operatorname{tg} \frac{x}{2}}\right|+C .
\end{gathered}
$$

2) Assuming $\operatorname{tg} \frac{a x}{2}=z$, according to rule I we have

$$
\cos a x=\frac{1-z^{2}}{1+z^{2}}, \quad d x=\frac{2 d z}{a\left(1+z^{2}\right)}
$$

$\int \frac{d x}{5+4 \cos a x}=\frac{2}{a} \int \frac{d z}{z^{2}+9}=\frac{2}{3 a} \operatorname{arctg} \frac{z}{3}+C=\frac{2}{3 a} \operatorname{arctg}\left(\frac{1}{3} \operatorname{tg} \frac{a x}{2}\right)+C$.

3) Assuming $\operatorname{tg} x=z$, according to rule II we get

$$
\begin{aligned}
\int \frac{\operatorname{tg} x d x}{1-\operatorname{ctg}^{2} x}= & \int \frac{z^{3} d z}{z^{4}-1}=\frac{1}{4} \int \frac{d\left(z^{4}-1\right)}{z^{4}-1}=\frac{1}{4} \ln \left|z^{4}-1\right|+ \\
& +C=\frac{1}{4} \ln \left|\operatorname{tg}^{4} x-1\right|+C
\end{aligned}
$$

4) Applying the substitution $e^{x}=z$, we get $d x=\frac{d z}{2}$ and

$$
\begin{aligned}
& \int \frac{e^{3 x} d x}{e^{2 x}+1}=\int \frac{z^{3} d z}{\left(z^{2}+1\right) z}=\int \frac{z^{2} d z}{z^{2}+1}=\int\left(1-\frac{1}{z^{2}+1}\right) d z= \\
& =\int d z-\int \frac{d z}{z^{2}+1}=z-\operatorname{arctg} z+C=e^{x}-\operatorname{arctg} e^{x}+C
\end{aligned}
$$

Find the integrals: