We discuss some facts about first-order differential equations for beginners. Such equations are important because many problems in our real life can be modeled as a differential equation.

We assume that the reader is familiar with the concept of continuous function primitives.

## First-order differential equations with constant coefficients

In algebra, we already studied algebraic equations where a variable is a number. Here we study equations where the variable is a function.

Let $a$ be a real number and $f:\mathbb{R}\to \mathbb{R}$ be a continuous function. We look for differential functions $u:\mathbb{R}\to \mathbb{R}$ such that\begin{align*}\dot{u}(x)=a u(x)+f(x).\end{align*} Here we denote $\dot{u}(x)=\frac{d}{dx}u(x)$, the derivative of the function $u$.

We recall that $\frac{d}{dx}e^{-a x}=ae^{-ax}.$ By multiplying the both sides of the above differential equation by $e^{-ax}$, we obtain $e^{-ax} \dot{u}(x)-a e^{-ax} u(x)= e^{-ax} f(x)$. Also, we write\begin{align*}\frac{d}{dx}\left( e^{-ax} u(x) \right)= e^{-ax} f(x) .\end{align*}By taking the integral between $0$ and $x$ in the both sides of this equation, we get \begin{align*} e^{-ax} u(x) =u(0)+\int^x_0 e^{-as}f(s)ds.\end{align*} Now by multiplying the both sides of the avove equality br $e^{ax},$ we obtain \begin{align*} u(x)=e^{ax}u(0)+\int^x_0 e^{a(x-s)}f(s)ds.\end{align*}

Cauchy problem: A first-order differential is a Cauchy problem if it take the following form \begin{align*} \begin{cases} \dot{u}(t)=a u(t),& t\in\mathbb{R},\cr u(t_0)=x.\end{cases}\end{align*} Here $t_0$ is the initial time and $x$ is the initial state. The solution to this Cauchy problem is $u(t)=e^{t a}x$.

## Equations with variable coefficients

In most cases the coefficients of differential equations are functions. These equations take the following form \begin{align*}a(x)\dot{u}(x)+b(x)u(x)=0,\end{align*}where $a(\cdot)$ and $b(\cdot)$ are continuous function such that $a(x)\neq 0$. This equation can be rewritten as\begin{align*} \frac{\dot{u}(x)}{u(x)}=-\frac{b(x)}{a(x)}.\end{align*} On the other hand, we recall that \begin{align*} \frac{d}{dx}\ln(|u(x)|)= \frac{\dot{u}(x)}{u(x)} .\end{align*} We then obtain \begin{align*} \ln(|u(x)|) =\int -\frac{b(x)}{a(x)} dx.\end{align*} Hence, we have\begin{align*} u(x)=e^{- \displaystyle \int \frac{b(x)}{a(x)} dx}.\end{align*}

Let consider the first example $(x-1)u’-2u=0$, here we have $a(x)=x-1$ and $b(x)=-2$. Then the solution is given by \begin{align*} u(x)= e^{\displaystyle \int \frac{2}{x-1} dx} =e^{ (2\ln(|x-1|+C)}= A e^{\ln((x-1)^2)}.\end{align*} Thus the solution of the differential equation is $u(x)=A(x-1)^2$, where $A$ is a real constante.