   \textbf{4.} Spočtěte integrál:
      $$
            \int \frac{\sin^2 x - \cos^2 x}{\sin^4 x + \cos^4 x} \dx.
      $$

      \textbf{Řešení}
      $$
            \int \frac{\sin^2 x - \cos^2 x}{\sin^4 x + \cos^4 x} \dx =
            \int \frac{\cos^2 x(\tg^2 x - 1)}{\cos^4 x(\tg^4 x + 1)} \dx =
            \int \frac{\tg^2 x - 1}{\tg^4 x + 1} \cdot \frac{dx}{\cos^2 x}.
      $$
      Použijeme substituci $\tg x = t$, $\frac{dx}{\cos^2 x} = dt$:
      $$
            \int \frac{\tg^2 x - 1}{\tg^4 x + 1} \cdot \frac{dx}{\cos^2 x} \stackrel S=
            \int \frac{t^2 - 1}{t^4 + 1} \dt.
      $$
      Tento integrál spočítáme pomocí metody parciálních zlomků:
      \begin{multline*}
            \int \frac{t^2 - 1}{t^4 + 1} \dt =
            \int \frac{t^2 - 1}{(t^2 + \sqrt2 t + 1)(t^2 - \sqrt2 t + 1)} \dt =\\
            =\int \left(
                  \frac{-\frac{\sqrt 2}2 t - \frac 12}{t^2 + \sqrt2 t + 1} +
                  \frac{ \frac{\sqrt 2}2 t - \frac 12}{t^2 - \sqrt2 t + 1}
            \right) \dt =\\
            =
            -\frac{\sqrt 2}4 \int \frac{2t + \sqrt 2}{t^2 + \sqrt2 t + 1} \dt
            +\frac{\sqrt 2}4 \int \frac{2t - \sqrt 2}{t^2 - \sqrt2 t + 1} \dt \stackrel c=\\
            \stackrel c=
            -\frac{\sqrt 2}4 \log (t^2 + \sqrt2 t + 1)
            +\frac{\sqrt 2}4 \log (t^2 - \sqrt2 t + 1) \stackrel S=\\
            \stackrel S=
            -\frac{\sqrt 2}4 \log (\tg^2 x + \sqrt2 \tg^2 x + 1)
            +\frac{\sqrt 2}4 \log (\tg^2 x - \sqrt2 \tg^2 x + 1).
      \end{multline*}
