\documentclass[10pt,a5paper]{article}
\usepackage[svgnames, rgb]{xcolor}

\input{intro}

\lhead{\color{gray} Шарафатдинов Камиль 192}
\rhead{\color{gray} \texttt{sol0127}}
\title{ДЗ на 03.02}
\author{Шарафатдинов Камиль БПМИ-192}
\date{билд: \today}


% -- Here bet  dragons --
\begin{document}\thispagestyle{empty}

\maketitle
\clearpage
\setcounter{page}{1}

%\question{8.a}{
%    \[
%        \int \frac{2\sin^3 x + \cos^2 x \sin 2x}{\sin^4 x + 3 \cos^4 x} \dif x = \todo + C
%    \]
%}

    

\question{8.c}{
    \[
        \int \frac{\dif x}{\cosh^3 x + 3\cosh x} = \frac{
            2\arctan \sinh x - \arctan \frac{\sinh x}{2}
        }{6} + C
    \]
}
    \begin{align*}
        \int \frac{\dif x}{\cosh^3 x + 3\cosh x}
        &= \int \frac{\frac{\dif \sinh x}{\cosh x}}{\cosh^3 x + 3\cosh x}
            &\explain{
                \dif \sinh x = \cosh x \dif x
            } \\[8pt]
        &= \int \frac{\dif \sinh x}{\cosh^4 x + 3\cosh^2 x} \\[8pt]
        &= \int \frac{\dif \sinh x}{\br{ 1 + \sinh^2 x }^2 + 3\br {1 + \sinh^2 x}}
            &\explain{
                \cosh^2 x - \sinh^2 x = 1
            } \\[8pt]
        &= \int \frac{\dif u}{\br{ 1 + u^2 }^2 + 3\br {1 + u^2}}
            &\explain{
                u = \sinh x
            } \\[8pt]
        &= \int \frac{\dif u}{4 + 5u^2 + u^4} \\[8pt]
        &= \int \frac{\dif u}{\br{ u^2 + 1 } \br{ u^2 + 4 }} \\[8pt]
        &= \int \frac{\dif u}{3} \br{
            \frac{1}{ u^2 + 1 } - \frac{1}{ u^2 + 4 }
        } \\[8pt]
        &= \frac{1}{3} \br{
            \int \frac{du}{u^2 + 1} - \int \frac{du}{u^2 + 4}
        } \\[8pt]
        &= \frac{1}{3} \br{
            \arctan u - \frac{1}{2}\arctan \frac{u}{2}
        } + C
            &\explain{
                u = \sinh x
            }\\[8pt]
        &= \frac{1}{6} \br{
            2\arctan \sinh x - \arctan \frac{\sinh x}{2}
        } + C
    \end{align*}

\clearpage
\question{8.e}{
    \[
        \int \frac{\dif x}{\sin^4 x + \cos^4 x} = \frac{\sqrt{2}}{2} \br{
            \arctan \br{ \sqrt{2} \tan x + 1 } + \arctan  \br{ \sqrt{2} \tan x - 1 }
        } + C
    \]
}

    \[
        \sin^4 x + \cos^4 x =
        \br{ 1 - \cos^2 x }^2 + \cos^4 x =
        1 - 2\cos^2 x + 2\cos^4 x
    \]
    \[
        \dif x = \cos^2 x \dif\ (\tan x)
    \]
    \[
        1 + \tan^2 x = \frac{1}{\cos^2 x}
    \]

    \begin{align*}
        \int \frac{\dif x}{\sin^4 x + \cos^4 x}
            &= \int \frac{\cos^2 x \dif\ (\tan x)}{1 - 2\cos^2 x + 2\cos^4 x} \\[8pt]
            &= \int \frac{\dif\ (\tan x)}{\frac{1}{\cos^2 x} - 2 + 2\cos^2 x} \\[8pt]
            &= \int \frac{\dif\ (\tan x)}{1 + \tan^2 x - 2 + \frac{2}{1 + \tan^2 x}} \\[8pt]
            &= \int \frac{\dif u}{-1 + u^2 + \frac{2}{1 + u^2}} & [u = \tan x]\\[8pt]
            &= \int \frac{(1 + u^2) \dif u}{u^4 + 1} \\[8pt]
    \end{align*}

    По прошлой домашке мы знаем, что
    \[
        x^4 + 1 = (x^2 - \sqrt{2} x + 1)(x^2 + \sqrt{2} x + 1)
    \]

    Разложим на слагаемые:
    \[
        \frac{x^2 + 1}{x^4 + 1} =
        \frac{1}{2} \br{ \frac{1}{x^2 + \sqrt{2} x + 1} + \frac{1}{x^2 - \sqrt{2} + 1} }
    \]

    \begin{align*}
        \int \frac{1}{u^2 + \sqrt{2} u + 1}\dif u
            &= \int \frac{1}{\br{ u + \frac{\sqrt{2}}{2} }^2 + \frac{1}{2}}\dif u \\[8pt]
            &= \sqrt{2} \arctan \br{ \sqrt{2} u + 1 } + C_1 \\[16pt]
        \int \frac{1}{u^2 - \sqrt{2} u + 1}\dif u
            &= \int \frac{1}{\br{ u - \frac{\sqrt{2}}{2} }^2 + \frac{1}{2}}\dif u \\[8pt]
            &= \sqrt{2} \arctan \br{ \sqrt{2} u - 1 } + C_2 \\[8pt]
    \end{align*}

    \begin{gather*}
        \int \frac{\dif x}{\sin^4 x + \cos^4 x} =
        \int \frac{(\tan^2 x + 1) \dif\ \tan x}{\tan^4 x + 1} =\\[8pt] =
        \frac{\sqrt{2}}{2} \br{
            \arctan \br{ \sqrt{2} \tan x + 1 } + \arctan  \br{ \sqrt{2} \tan x - 1 }
        } + C
    \end{gather*}

\question{8.g}{
    \[
        \int \frac{\dif x}{a \sin x + b \cos x + c}, \qquad c > \sqrt{a^2 + b^2}
    \]
}

    Найдем такой интеграл в предположении $a > 1$:

    \begin{align*}
        \int \frac{\dif x}{\sin x + a}
        &= \int \frac{\frac{2 \dif u}{1 + u^2}}{\frac{2u}{1 + u^2} + a}
            &\explain{
                \displaystyle u = \tan \frac{x}{2}\\[8pt]
                \displaystyle \dif x = \frac{2 \dif u}{1 + u^2}\\[8pt]
                \displaystyle \sin x = \frac{2u}{1 + u^2}
            } \\[8pt]
        &= \int \frac{2\dif u}{2u + a + au^2} \\[8pt]
        &= \int \frac{2\dif u}
            {\br{ \sqrt{a} u + \frac{1}{\sqrt{a}} }^2 + 1 - \frac{1}{a}} \\[8pt]
        &= \int \frac{2\dif u}
            {\br{ \sqrt{a} u + \frac{1}{\sqrt{a}} }^2 + \frac{a^2 - 1}{a}} \\[8pt]
        &= \frac{2}{\sqrt{a}}\int \frac{\dif v}{v^2 + \frac{a^2 - 1}{a}}
            &\explain{
                v = \sqrt{a} u + \frac{1}{\sqrt{a}}\\
                \dif v = \sqrt{a} \dif u
            } \\[8pt]
        &= \frac{2\sqrt{a}}{\sqrt{a}\sqrt{a^2 - 1}}
            \arctan \br{ \frac{\sqrt{a} v}{\sqrt{a^2 - 1}} } + C \\[8pt]
        &= \frac{2}{\sqrt{a^2 - 1}}
            \arctan \br{ \frac{\sqrt{a} v}{\sqrt{a^2 - 1}} } + C \\[8pt]
        &= \frac{2}{\sqrt{a^2 - 1}}
            \arctan \br{ \frac{au + 1}{\sqrt{a^2 - 1}} } + C
            &\explain{
                v = \sqrt{a} u + \frac{1}{\sqrt{a}}
            } \\[8pt]
        &= \frac{2}{\sqrt{a^2 - 1}}
            \arctan \br{ \frac{a \tan \frac{x}{2} + 1}{\sqrt{a^2 - 1}} } + C
    \end{align*}

    Теперь, непосредственно задание

    \begin{align*}
        \int \frac{\dif x}{a \sin x + b \cos x + c}
        &= \int \frac{\dif x}{r \br{ \frac{a}{r} \sin x + \frac{b}{r} \cos x} + c }
            &\explain{
                \displaystyle r = \sqrt{a^2 + b^2}
            } \\[8pt]
        &= \frac{1}{r} \int \frac{\dif x}{\cos \phi \sin x + \sin \phi \cos x + c/r}
            &\explain{
                \displaystyle \phi = \arccos \frac{a}{r} = \arcsin \frac{b}{r}
            } \\[8pt]
        &= \frac{1}{r} \int \frac{\dif x}{\sin \br{ \phi + x } + c/r} \\[8pt]
        &= \frac{1}{r} \int \frac{\dif u}{\sin \br{ u } + c/r}
            &\explain{
                u = \phi + x\\
                du = dx
            } \\[8pt]
        &= \frac{2}{r\sqrt{\dfrac{c^2}{r^2} - 1}}
            \arctan \br{
                \frac
                    {\displaystyle \frac{c}{r} \tan \frac{u}{2} + 1}
                    {\displaystyle \sqrt{\frac{c^2}{r^2} - 1}}
            } + C
            &\explain{\text{По доказанному}}\\[8pt]
        &= \frac{2}{\sqrt{c^2 - r^2}}
            \arctan \br{
                \frac
                    {\displaystyle \frac{c}{r} \tan \frac{\arccos \dfrac{a}{r}}{2} + 1}
                    {\displaystyle \sqrt{\frac{c^2}{r^2} - 1}}
            } + C \\[8pt]
        &= \frac{2}{\sqrt{c^2 - r^2}}
            \arctan \br{
                \frac
                    {\displaystyle c \tan \frac{\arccos \dfrac{a}{r}}{2} + r}
                    {\displaystyle \sqrt{c^2 - r^2}}
            } + C \\[8pt]
        &= \frac{2}{\sqrt{c^2 - a^2 - b^2}}
            \arctan \br{
                \frac
                    {\displaystyle c \tan \frac{\arccos \dfrac{a}{\sqrt{a^2 + b^2}}}{2} + \sqrt{a^2 + b^2}}
                    {\displaystyle \sqrt{c^2 - a^2 - b^2}}
            } + C \\[8pt]
    \end{align*}

\clearpage

\question{10}{
    \[
        \int \frac{\dif x}{(a\sin x + b\cos x)^n}
    \]
}

    Найдем рекуррентную формулу для следующего интеграла:
    \begin{align*}
        \int \frac{\dif x}{\sin^n x}
        &= -\int \frac{\dif \cos x}{\sin^{n + 1} x}\\[6pt]
        &= -\frac{\cos x}{\sin^{n + 1} x} -
            \int \br{ \frac{1}{\sin^{n + 1} x} }' \cos x \dif x
            &\explain{
                \displaystyle \int Fg \dif x = FG - \int fG \dif x\\
                \displaystyle F = \frac{1}{\sin^{n + 1} x}\\[10pt]
                \displaystyle g = \frac{\dif \cos x}{\dif x}\\
                \displaystyle G = \cos x
            } \\[8pt]
        &= -\frac{\cos x}{\sin^{n + 1} x} -
            (n + 1) \int \frac{\cos^2 x \dif x}{\sin^{n + 2} x} \\[8pt]
        &= -\frac{\cos x}{\sin^{n + 1} x} -
            (n + 1) \int \frac{(1 - \sin^2 x) \dif x}{\sin^{n + 2} x} \\[8pt]
        &= -\frac{\cos x}{\sin^{n + 1} x} -
            (n + 1) \int \frac{\dif x}{\sin^{n + 2} x} +
            (n + 1) \int \frac{\dif x}{\sin^n x}
    \end{align*}

    Пусть $\displaystyle J_n = \int \frac{\dif x}{\sin^n x}$.

    Переобозначим $n = n + 2$ в полученном интеграле, чтобы формула получилась красивой
    \begin{align*}
        J_{n - 2} &= -\frac{\cos x}{\sin^{n - 1} x} - (n - 1) J_n + (n - 1) J_{n - 2}\\[8pt]
        (n - 1)J_n &= -\frac{\cos x}{\sin^{n - 1} x} + (n - 2)J_{n - 2}\\[8pt]
        J_n &= \frac{\cos x}{(1 - n) \sin^{n - 1} x} + \frac{n - 2}{n - 1}J_{n - 2}
    \end{align*}

    Тогда:
    \begin{align*}
        I_n = \int \frac{\dif x}{(a\sin x + b\cos x)^n}
        &= \frac{1}{r} \int \frac{\dif x}{(\frac{a}{r}\sin x + \frac{b}{r}\cos x)^n}
            &\explain{
                \displaystyle r = \sqrt{a^2 + b^2}
            } \\[8pt]
        &= \frac{1}{r} \int \frac{\dif x}{(\cos \phi \sin x + \sin \phi \cos x)^n}
            &\explain{
                \displaystyle \phi = \arccos \frac{a}{r} = \arcsin \frac{b}{r}
            } \\[8pt]
        &= \frac{1}{r} \int \frac{\dif x}{(\sin (\phi + x))^n} \\[8pt]
        &= \frac{\cos (\phi + x)}{r(1 - n) \sin^{n - 1} (\phi + x)} +
            \frac{n - 2}{n - 1} I_{n - 2} \\[8pt]
        &= \frac{\cos (\arccos{\frac{a}{\sqrt{a^2 + b^2}}} + x)}
                {\sqrt{a^2 + b^2}(1 - n) \sin^{n - 1} (\arccos{\frac{a}{\sqrt{a^2 + b^2}}} + x)} +
            \frac{n - 2}{n - 1} I_{n - 2}
    \end{align*}

\end{document}
