Calculus II Home

Separable Differential Equations

    


A differential equation is an equation containing a function and its derivatives.

Example.

  1. \(\displaystyle\frac{dy}{dx}=y\sin x\)
  2. \(\displaystyle\frac{dv}{dt}=g-\frac{\gamma}{m}v\) (motion of a falling object)
  3. \(\displaystyle\frac{d^2\theta}{dt^2}+\frac{g\sin \theta}{L}=0\) (motion of a pendulum)
  4. \(\displaystyle\frac{\partial u}{\partial t}=k\frac{\partial^2u}{\partial x^2}\) (one-dimensional heat equation)

A differential equation that does not contain partial derivatives is called an ordinary differential equations (ODE). Note that an ODE has only one independent variable. The order of a differential equation is the the order of the highest derivative in it. Differential equations in above examples 1 and 2 have order 1. Differential equation in example 3 has order 2.

A separable ODE is of the form \[\frac{dy}{dx}=\frac{M(x)}{N(y)}.\]
Steps to solve:
\[\begin{align*} N(y)\,dy&=M(x)\, dx\\ \int N(y)\,dy&=\int M(x)\, dx + c.\\ \end{align*}\]


Example. Solve the following IVP (initial value problem) \[\begin{equation}\label{7} \frac{dy}{dx}=\frac{2x-3}{y-5},\; y(0)=3 \end{equation}\] and find the valid interval of the solution. Find the maximum value of the solution.
Solution. \[\begin{align} \frac{dy}{dx}&=\frac{2x-3}{y-5} \nonumber\\ (y-5)\,dy&=(2x-3)\,dx\nonumber\\ \int (y-5)\,dy&=\int (2x-3)\,dx\nonumber\\ \frac{y^2}{2}-5y&=2\frac{x^2}{2}-3x+c\nonumber\\ y^2-10y&=2(x^2-3x+c)\nonumber\\ y^2-10y-2x^2+6x-2c&=0 \;\;\;\;\;\;\;\; (1) \end{align}\] Note that the initial condition is \(y(0)=3\). So we have \[\begin{align*} 3^2-10\cdot 3-2c&=0\\ 2c&=-21 \end{align*}\] From (1) we get \[\begin{align*} y^2-10y-2x^2+6x+21&=0 \text{ (implicit solution)}\\ y&=\frac{10\pm \sqrt{100-4(-2x^2+6x+21)}}{2}\\ y&=\frac{10\pm 2\sqrt{25-(-2x^2+6x+21)}}{2}\\ y&=5\pm \sqrt{2x^2-6x+4} \end{align*}\] So we have two possible solutions: \[y=5+ \sqrt{2x^2-6x+4} \text{ and } y=5- \sqrt{2x^2-6x+4}.\] Note that the first one does note satisfy the initial condition \(y(0)=3\). Thus the solution is \[y=5- \sqrt{2x^2-6x+4} \text{ (explicit solution)}.\] Obviously the maximum value of the solution is 5 because \(\sqrt{2x^2-6x+4}\geq 0\). The solution is defined when \[\begin{align*} 2x^2-6x+4&\geq 0\\ 2(x^2-3x+2)&\geq 0\\ 2(x-1)(x-2)&\geq 0 \end{align*}\] The domain of \(y\) is \((-\infty,1]\cup [2,\infty)\). Because of the initial condition \(y(0)=3\), the valid interval of the solution is \((-\infty,1]\).


Example. Solve the following ODE. \[ \frac{dy}{dx}=e^{-y}x\cos x \] Solution. \[\begin{align*} \frac{dy}{dx}&=\frac{x\cos x}{e^y}&&\\ e^y\, dy&=x\cos x\, dx&\\ \int e^y\, dy&=\int x\cos x\, dx&\\ e^y &=\int u\, dv && u=x,\, dv=\cos x\, dx\\ &=uv-\int v\, du && du=dx,\, v=\int dv=\int \cos x\, dx=\sin x\\ &=x\sin x-\int \sin x\, dx &&\\ &=x\sin x+\cos x +c && \end{align*}\] The general solution is \(y=\ln|x\sin x+\cos x +c|\).


Last edited