

\subsection{Linear Solutions: First Order}
\textbf{Form:}$\quad y' + ay = b\quad $ \subtext{ $I \subset \R, \quad a,b: I \to \R$ }

\textbf{Approach:}
\begin{enumerate}
    \item Hom. Solution $f_1$ for: $y' + ay = 0$\\
    \subtext{Note that $\S$ has $\dim(\S) = 1$, so $f_1 \neq 0$ is a Basis for $\S$} 
    \item Part. Solution $f_0$ for $y' + ay = b$
\end{enumerate}
\textbf{Solutions:} $ f_0 + zf_1 \quad \text{ for } z \in \C $

\begin{subbox}{Explicit Homogeneous Solution}
    \smalltext{$A(x)$ is a primitive of $a$, $f(x_0) = y_0$}
    \begin{align*}
        f_1(x) &= z \cdot \exp(-A(x)) \\
        f_1(x) &= y_0 \cdot \exp(A(x_0) - a(x))
    \end{align*}
\end{subbox}

\method \textbf{Variation of Constants}: Treating $z$ as $z(x)$ yields:

\begin{subbox}{Explicit Inhomogeneous Solution}
    \smalltext{$A(x)$ is a primitive of $a$}
    $$
        f_0(x) = \underbrace{\left(\int b(x)\cdot\exp(A(x)) \right)}_{z(x)} \cdot \exp\left(-A(x)\right)
    $$
\end{subbox}

\method \textbf{Educated Guess}\\
Usually, $y$ has a similar form to $b$:

\begin{footnotesize}
    \begin{center}
        \begin{tabular}{ll}
            \hline
            $b(x)$ & \text{Guess} \\
            \hline
            $a \cdot e^{\alpha x}$                      & $b \cdot e^{\alpha x}$ \\
            $a \cdot \sin(\beta x)$                     & $c\sin(\beta x) + d\cos(\beta x)$\\
            $b \cdot \cos(\beta x)$                     & $c\sin(\beta x) + d\cos(\beta x)$\\
            $ae^{\alpha x} \cdot \sin(\beta x)$         & $e^{\alpha x}\left(c\sin(\beta x) + d\cos(\beta x)\right)$\\
            $be^{\alpha x} \cdot \cos(\beta x)$         & $e^{\alpha x}\left(c\sin(\beta x) + d\cos(\beta x)\right)$\\
            $P_n(x) \cdot e^{\alpha x}$                 & $R_n(x) \cdot e^{\alpha x}$\\
            $P_n(x) \cdot e^{\alpha x}\sin(\beta x)$    & $e^{\alpha x}\left( R_n(x) \sin(\beta x) + S_n(x) \cos(\beta x) \right)$\\
            $P_n(x) \cdot e^{\alpha x}\cos(\beta x)$    & $e^{\alpha x}\left( R_n(x) \sin(\beta x) + S_n(x) \cos(\beta x) \right)$\\
            \hline
        \end{tabular}
    \end{center}
\end{footnotesize}

\remark If $\alpha, \beta$ are roots of $P(X)$ with multiplicity $j$, multiply guess with a $P_j(x)$.

\subsection{Linear Solutions: Constant Coefficients}
\textbf{Form:} $ y^{(k)} + a_{k-1}y^{(k-1)} + \ldots + a_1y' + a_0y = b$\\
\subtext{Where $a_0, \ldots, a_{k-1} \in \C$ are constants, $b(x)$ is continuous.}

\subsubsection{Homogeneous Equations}
\smalltext{The idea is to find a Basis of $\S$:}

\definition \textbf{Characteristic Polynomial} $P(X) = \prod_{i=1}^{k} (X-\alpha_i)$

\remark The unique roots $\alpha_1,\ldots,\alpha_l$ form a Basis:
$$
    \text{span}(\S) = \{ x^je^{\alpha_i x} \sep i \leq l,\quad 0 \leq j \leq v_i \}
$$
\subtext{$v_1,\ldots,v_k$ are the Multiplicities of $\alpha_1,\ldots,\alpha_k$}

\remark If $\alpha_j = \beta + \gamma i \in \C$ is a root, $\bar{\alpha_j} = \beta - \gamma i$ is too.

\smalltext{If only solutions in $\R$ are considered, this can be rewritten:}
$$
c_1e^{\alpha_j x} + c_2e^{\alpha_i x} = e^{\beta x}\left( c_1\cos(\gamma x) + c_2\sin(\gamma x) \right)
$$

\begin{subbox}{Explicit Homogeneous Solution}
    \smalltext{Using $\alpha_1,\ldots,\alpha_k$ from $P(X)$ s.t. $\alpha_i \neq \alpha_j$, $z_i \in \C$ arbitrary}
    $$
    f(x) = \prod_{i=1}^{k} z_i \cdot e^{\alpha_i x} \quad\text{with}\quad f^{(j)(x)} = \prod_{i=1}^{k} z_i \cdot \alpha_i^j e^{\alpha_i x}
    $$
    \smalltext{Multiple roots: same scheme, using the basis vectors of $\S$}
\end{subbox}
\subtext{Solutions exist $\forall Z = (z_1,\ldots,z_k)$ since that system's $\det(M_Z) \neq 0$.}

\subsubsection{Inhomogeneous Equations}

\method \textbf{Undetermined Coefficients}: An educated guess.
\begin{enumerate}
    \item $b(x) = cx^d \cdot e^{\alpha x} \implies f_p(x) = Q(x)e^{\alpha x}$\\
    \subtext{$\deg(Q) \leq d + v_\alpha$, where $v_\alpha$ is $\alpha$'s multiplicity in $P(X)$}
    \item $\begin{rcases*}
        b(x) = cx^d \cdot \cos(\alpha x) \\
        b(x) = cx^d \cdot \sin(\alpha x)
    \end{rcases*} f_p = Q_1(x)\cos(\alpha x) + Q_2(x)\sin(\alpha x)$
    \subtext{$\deg(Q_{1,2}) \leq d + v_\alpha$, where $v_\alpha$ is $\alpha$'s multiplicity in $P(X)$}
\end{enumerate}

\remark \textbf{Applying Linearity}\\ 
If $b(x) = \sum_{i=1}^{n} b_i(x)$, A solution for $b(x)$ is $f(x) = \sum_{i=1}^{n} f_i(x)$\\
\subtext{Sometimes called \textit{Superposition Principle} in this context.}

\subsection{Other Methods}

\method \textbf{Change of Variable}\\
If $f(x)$ is replaced by $h(y) = f(g(y))$, then $h$ is a sol. too.\\
\subtext{Changes like $h(t) = f(e^t)$ may lead to, i.e. ODEs in constant coeffs}

\begin{footnotesize}
    \textbf{Example:} $2xy' - y = 0$ \\
    Using substitution: $x = e^t,\quad h(t) = y(e^t),\quad h'(t) = e^t \cdot y'(e^t)$
    \begin{enumerate}
        \item $2x \cdot y'(x) = 2 \cdot h'(t)$
        \item $-y(x)$ = $-h(t)$
    \end{enumerate}
    So: $2xy' - y \overset{\text{sub}}{=} 2h'(t) - h(t) = 0$ \\
    Yields: $h(t) = \alpha \cdot e^\frac{t}{2} \overset{\text{resub}}{\implies} y(x) = \alpha \cdot e^\frac{\ln(x)}{2} = \alpha \cdot \sqrt{x}$
\end{footnotesize}

\begin{subbox}{Separation of Variables}
    \smalltext{Form: $ y' = a(y)\cdot b(x) $}
    $$
    \int \frac{1}{a(y)}\ \text{d}y = \int b(x) \dx + c
    $$
\end{subbox}
\subtext{Usually $\int 1/a(y)\ \text{d}y$ can be solved directly for $\ln|a(y)|+c$.}

\subsection{Method Overview}
\begin{footnotesize}
    \begin{center}
        \begin{tabular}{l|l}
            \textbf{Method} & \textbf{Use case} \\
            \hline
            Variation of constants      & LDE with $\ord(F)=1$              \\
            Characteristic Polynomial   & Hom. LDE w/ const. coeff.         \\
            Undetermined Coefficients   & Inhom. LDE w/ const. coeff.       \\
            Separation of Variables     & ODE s.t. $y' = a(y)\cdot b(x)$    \\
            Change of Variables       & e.g. $y' = f(ax + by + c)$          \\
        \end{tabular}
    \end{center}
\end{footnotesize}