← Back to GATE Mathematics

Ordinary Differential Equations

Master first order ODEs, higher order linear equations, systems of ODEs, series solutions, and boundary value problems for GATE Mathematics.

First Order ODEs Higher Order Linear ODEs Systems of ODEs Series Solutions Boundary Value Problems
0% complete5 units
01
First Order ODEs

Techniques for solving first order ordinary differential equations and the fundamental existence-uniqueness theorem.

Separable, Exact, and Linear Equations

A first order ODE is any equation of the form $\frac{dy}{dx} = f(x, y)$. The main solvable types are:

  • Separable: $\frac{dy}{dx} = g(x)h(y)$ — separate variables and integrate both sides
  • Exact: $M(x,y)\,dx + N(x,y)\,dy = 0$ is exact if $\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}$; solution is $F(x,y) = C$ where $F_x = M$, $F_y = N$
  • Linear: $\frac{dy}{dx} + P(x)y = Q(x)$ — multiply by integrating factor $\mu(x) = e^{\int P(x)\,dx}$
★ Example
Solve the linear ODE $\dfrac{dy}{dx} + 2y = e^{-x}$.

Step 1: Integrating factor: $\mu(x) = e^{\int 2\,dx} = e^{2x}$.

Step 2: Multiply through: $e^{2x}\frac{dy}{dx} + 2e^{2x}y = e^{2x} \cdot e^{-x} = e^x$.

Step 3: The left side is $\frac{d}{dx}(e^{2x}y)$, so $\frac{d}{dx}(e^{2x}y) = e^x$.

Step 4: Integrate: $e^{2x}y = e^x + C$, giving $y = e^{-x} + Ce^{-2x}$.

Bernoulli Equations and Existence-Uniqueness

A Bernoulli equation has the form $\frac{dy}{dx} + P(x)y = Q(x)y^n$. The substitution $v = y^{1-n}$ reduces it to a linear equation.

Theorem — Picard's Existence and Uniqueness Consider the IVP $y' = f(x,y)$, $y(x_0) = y_0$. If $f$ and $\frac{\partial f}{\partial y}$ are continuous in a rectangle $R$ containing $(x_0, y_0)$, then there exists a unique solution $y(x)$ in some interval $|x - x_0| < h$.
★ Example
Solve the Bernoulli equation $\dfrac{dy}{dx} + y = xy^3$.

Step 1: Here $n = 3$, so substitute $v = y^{1-3} = y^{-2}$, giving $\frac{dv}{dx} = -2y^{-3}\frac{dy}{dx}$.

Step 2: Divide the ODE by $y^3$: $y^{-3}\frac{dy}{dx} + y^{-2} = x$, so $-\frac{1}{2}\frac{dv}{dx} + v = x$.

Step 3: Rearrange: $\frac{dv}{dx} - 2v = -2x$. This is linear with integrating factor $e^{-2x}$.

Step 4: $\frac{d}{dx}(e^{-2x}v) = -2xe^{-2x}$. Integrate by parts: $e^{-2x}v = xe^{-2x} - \frac{1}{2}e^{-2x} + C$.

Step 5: $v = x - \frac{1}{2} + Ce^{2x}$, so $y^{-2} = x - \frac{1}{2} + Ce^{2x}$, giving $y = \pm\left(x - \frac{1}{2} + Ce^{2x}\right)^{-1/2}$.

★ Key Takeaways — First Order ODEs
  • Always classify the ODE type first: separable, exact, linear, or Bernoulli
  • For exact equations, if $M_y \neq N_x$, look for an integrating factor $\mu(x)$ or $\mu(y)$
  • Picard's theorem guarantees local existence/uniqueness when $f$ and $f_y$ are continuous
02
Higher Order Linear ODEs

Systematic methods for solving linear ODEs of order two and higher with constant coefficients.

Homogeneous Equations with Constant Coefficients

For the equation $a_n y^{(n)} + a_{n-1} y^{(n-1)} + \cdots + a_1 y' + a_0 y = 0$, substitute $y = e^{rx}$ to get the characteristic equation $a_n r^n + \cdots + a_1 r + a_0 = 0$.

  • Distinct real roots $r_1, r_2, \ldots$: general solution $y = C_1 e^{r_1 x} + C_2 e^{r_2 x} + \cdots$
  • Repeated root $r$ of multiplicity $m$: contributes $e^{rx}(C_1 + C_2 x + \cdots + C_m x^{m-1})$
  • Complex roots $\alpha \pm i\beta$: contribute $e^{\alpha x}(C_1 \cos\beta x + C_2 \sin\beta x)$
★ Example
Solve $y'' - 4y' + 4y = 0$.

Step 1: Characteristic equation: $r^2 - 4r + 4 = (r-2)^2 = 0$, so $r = 2$ (repeated).

Step 2: General solution: $y = (C_1 + C_2 x)e^{2x}$.

Non-homogeneous Equations

For $L[y] = g(x)$, the general solution is $y = y_h + y_p$ where $y_h$ is the homogeneous solution and $y_p$ is a particular solution.

Method — Undetermined Coefficients When $g(x)$ is a polynomial, exponential, sine/cosine, or product thereof, guess $y_p$ of the same form with unknown coefficients. If any term in the guess duplicates a homogeneous solution, multiply by $x$ (or $x^2$, etc.) until no duplication occurs.
Method — Variation of Parameters For $y'' + p(x)y' + q(x)y = g(x)$ with fundamental solutions $y_1, y_2$: $$y_p = -y_1 \int \frac{y_2 g}{W}\,dx + y_2 \int \frac{y_1 g}{W}\,dx$$ where $W = y_1 y_2' - y_2 y_1'$ is the Wronskian.
★ Example
Find a particular solution of $y'' + y = \sec x$ using variation of parameters.

Step 1: Homogeneous solutions: $y_1 = \cos x$, $y_2 = \sin x$. Wronskian: $W = \cos^2 x + \sin^2 x = 1$.

Step 2: $y_p = -\cos x \int \frac{\sin x \cdot \sec x}{1}\,dx + \sin x \int \frac{\cos x \cdot \sec x}{1}\,dx$.

Step 3: $\sin x \cdot \sec x = \tan x$ and $\cos x \cdot \sec x = 1$.

Step 4: $y_p = -\cos x \int \tan x\,dx + \sin x \int 1\,dx = -\cos x \cdot (-\ln|\cos x|) + x\sin x$.

Result: $y_p = \cos x \ln|\cos x| + x\sin x$.

★ Key Takeaways — Higher Order Linear ODEs
  • The characteristic equation determines the structure of all homogeneous solutions
  • Undetermined coefficients works for polynomial/exponential/trig forcing; variation of parameters is universal
  • The Wronskian $W \neq 0$ guarantees linear independence of solutions
03
Systems of ODEs

Matrix methods for solving coupled systems of first order linear ODEs, with applications to stability analysis.

Matrix Exponential Method

A system $\mathbf{x}' = A\mathbf{x}$ where $A$ is a constant $n \times n$ matrix has the general solution $\mathbf{x}(t) = e^{At}\mathbf{x}_0$. In practice, we find the eigenvalues and eigenvectors of $A$.

★ Example
Solve the system $\mathbf{x}' = \begin{pmatrix}1 & 1 \\ 4 & 1\end{pmatrix}\mathbf{x}$.

Step 1: Characteristic equation: $(1-\lambda)^2 - 4 = \lambda^2 - 2\lambda - 3 = (\lambda - 3)(\lambda + 1) = 0$. Eigenvalues: $\lambda_1 = 3$, $\lambda_2 = -1$.

Step 2 ($\lambda_1 = 3$): $(A - 3I)\mathbf{v} = 0$: $\begin{pmatrix}-2&1\\4&-2\end{pmatrix}\mathbf{v} = 0$ gives $v_1 = \begin{pmatrix}1\\2\end{pmatrix}$.

Step 3 ($\lambda_2 = -1$): $(A + I)\mathbf{v} = 0$: $\begin{pmatrix}2&1\\4&2\end{pmatrix}\mathbf{v} = 0$ gives $v_2 = \begin{pmatrix}1\\-2\end{pmatrix}$.

Step 4: General solution: $\mathbf{x}(t) = C_1 e^{3t}\begin{pmatrix}1\\2\end{pmatrix} + C_2 e^{-t}\begin{pmatrix}1\\-2\end{pmatrix}$.

Phase Portraits and Stability

The eigenvalues of $A$ determine the qualitative behaviour of $\mathbf{x}' = A\mathbf{x}$:

  • Real, distinct, same sign: Node (stable if both negative, unstable if both positive)
  • Real, opposite sign: Saddle point (always unstable)
  • Complex $\alpha \pm i\beta$: Spiral (stable if $\alpha < 0$, unstable if $\alpha > 0$); pure imaginary gives a center
  • Repeated eigenvalue: Star node (if diagonalizable) or degenerate node (if not)
Definition — Stability The equilibrium $\mathbf{x} = \mathbf{0}$ of $\mathbf{x}' = A\mathbf{x}$ is asymptotically stable if all eigenvalues of $A$ have negative real parts, stable if all eigenvalues have non-positive real parts (and purely imaginary eigenvalues are simple), and unstable otherwise.
★ Key Takeaways — Systems of ODEs
  • Eigenvalues of $A$ determine the solution structure and stability of $\mathbf{x}' = A\mathbf{x}$
  • For defective eigenvalues (algebraic > geometric multiplicity), use generalized eigenvectors
  • Phase portrait classification is a common GATE question type
04
Series Solutions

Power series and Frobenius methods for solving ODEs with variable coefficients, including classical equations.

Power Series Near Ordinary Points

If $x_0$ is an ordinary point of $y'' + P(x)y' + Q(x)y = 0$ (meaning $P$ and $Q$ are analytic at $x_0$), then there exists a power series solution $y = \sum_{n=0}^{\infty} a_n (x - x_0)^n$ with radius of convergence at least as large as the distance to the nearest singularity of $P$ or $Q$.

★ Example
Find a power series solution of $y'' - xy = 0$ (Airy's equation) about $x_0 = 0$.

Step 1: Substitute $y = \sum_{n=0}^{\infty} a_n x^n$, so $y'' = \sum_{n=2}^{\infty} n(n-1)a_n x^{n-2}$.

Step 2: $y'' - xy = 0$ becomes $\sum_{n=2}^{\infty} n(n-1)a_n x^{n-2} - \sum_{n=0}^{\infty} a_n x^{n+1} = 0$.

Step 3: Re-index: set $m = n-2$ in the first sum and $m = n+1$ in the second to align powers of $x^m$.

Step 4: This gives $2a_2 + \sum_{m=1}^{\infty}[(m+2)(m+1)a_{m+2} - a_{m-1}]x^m = 0$.

Step 5: So $a_2 = 0$ and $a_{m+2} = \frac{a_{m-1}}{(m+2)(m+1)}$ for $m \geq 1$.

The recurrence gives two independent solutions built from $a_0$ and $a_1$.

Frobenius Method and Special Equations

If $x_0$ is a regular singular point (meaning $(x-x_0)P(x)$ and $(x-x_0)^2 Q(x)$ are analytic), we use the Frobenius method: assume $y = \sum_{n=0}^{\infty} a_n (x-x_0)^{n+r}$ and determine $r$ from the indicial equation.

Classical Equations Bessel's equation: $x^2 y'' + xy' + (x^2 - \nu^2)y = 0$ has solutions $J_\nu(x)$ (Bessel functions of the first kind).

Legendre's equation: $(1-x^2)y'' - 2xy' + n(n+1)y = 0$ has polynomial solutions $P_n(x)$ (Legendre polynomials) when $n$ is a non-negative integer.
  • If the indicial roots differ by a non-integer, Frobenius gives two independent solutions
  • If the roots are equal or differ by an integer, the second solution may involve a logarithmic term
★ Key Takeaways — Series Solutions
  • Classify the point first: ordinary, regular singular, or irregular singular
  • The indicial equation determines the leading power $r$ in the Frobenius series
  • Bessel and Legendre equations are standard GATE problems — know their basic properties
05
Boundary Value Problems

Sturm-Liouville theory, Green's functions, and eigenfunction expansions provide the framework for boundary value problems arising in physics and engineering.

Sturm-Liouville Theory
Definition — Sturm-Liouville Problem A Sturm-Liouville problem is an eigenvalue problem of the form $\frac{d}{dx}\left[p(x)\frac{dy}{dx}\right] + [q(x) + \lambda w(x)]y = 0$ on $[a,b]$ with boundary conditions at $x = a$ and $x = b$, where $p > 0$, $w > 0$ (weight function).
  • The eigenvalues $\lambda_1 < \lambda_2 < \cdots$ are real and form an increasing sequence tending to $\infty$
  • Eigenfunctions corresponding to distinct eigenvalues are orthogonal with respect to the weight $w$: $\int_a^b y_m(x) y_n(x) w(x)\,dx = 0$ for $m \neq n$
  • The eigenfunctions form a complete orthogonal set in $L^2_w[a,b]$
★ Example
Find the eigenvalues and eigenfunctions of $y'' + \lambda y = 0$, $y(0) = 0$, $y(\pi) = 0$.

Case $\lambda \leq 0$: The solutions are exponential or linear, and the only solution satisfying both boundary conditions is $y = 0$ (trivial). No eigenvalues here.

Case $\lambda > 0$: Write $\lambda = \mu^2$ with $\mu > 0$. Then $y = A\cos\mu x + B\sin\mu x$.

$y(0) = 0$ gives $A = 0$, so $y = B\sin\mu x$.

$y(\pi) = 0$ gives $B\sin\mu\pi = 0$. For nontrivial $y$, $\sin\mu\pi = 0$, so $\mu = n$ ($n = 1, 2, 3, \ldots$).

Result: Eigenvalues $\lambda_n = n^2$ with eigenfunctions $y_n(x) = \sin(nx)$ for $n = 1, 2, 3, \ldots$

Green's Functions and Eigenfunction Expansions
Definition — Green's Function The Green's function $G(x, \xi)$ for a linear differential operator $L$ with boundary conditions is the solution to $L[G] = \delta(x - \xi)$. It allows the solution of $L[y] = f(x)$ to be written as $y(x) = \int_a^b G(x, \xi) f(\xi)\,d\xi$.

Properties of Green's functions:

  • $G(x, \xi)$ satisfies the homogeneous equation for $x \neq \xi$
  • $G$ satisfies the boundary conditions
  • $G$ is continuous at $x = \xi$, but $G'$ has a jump discontinuity of $1/p(\xi)$
  • Symmetry: $G(x, \xi) = G(\xi, x)$ for self-adjoint problems

Eigenfunction expansion: If $\{\phi_n\}$ are the eigenfunctions of the associated Sturm-Liouville problem, then $f(x) = \sum_{n=1}^{\infty} c_n \phi_n(x)$ where $c_n = \frac{\int_a^b f(x)\phi_n(x)w(x)\,dx}{\int_a^b \phi_n^2(x)w(x)\,dx}$. This generalizes Fourier series.

★ Key Takeaways — Boundary Value Problems
  • Sturm-Liouville eigenvalues are always real and eigenfunctions are orthogonal
  • The standard example $y'' + \lambda y = 0$ with Dirichlet conditions gives $\lambda_n = n^2$, $\phi_n = \sin(nx)$
  • Green's functions convert BVPs into integral equations — know the jump condition
✎ Practice Problems
Problem 1
Solve the exact equation $(2xy + 3)\,dx + (x^2 + 4y)\,dy = 0$.
Show Solution ▼
Check: $M_y = 2x = N_x$, so exact. Find $F$: $F_x = 2xy + 3$ gives $F = x^2 y + 3x + g(y)$. Then $F_y = x^2 + g'(y) = x^2 + 4y$, so $g'(y) = 4y$ and $g(y) = 2y^2$. Solution: $x^2 y + 3x + 2y^2 = C$.
Problem 2
Find the general solution of $y'' + 4y' + 13y = 0$.
Show Solution ▼
Characteristic equation: $r^2 + 4r + 13 = 0$, so $r = \frac{-4 \pm \sqrt{16-52}}{2} = -2 \pm 3i$. General solution: $y = e^{-2x}(C_1 \cos 3x + C_2 \sin 3x)$.
Problem 3
Classify the stability of the equilibrium for $\mathbf{x}' = \begin{pmatrix}-1 & 2 \\ -2 & -1\end{pmatrix}\mathbf{x}$.
Show Solution ▼
Eigenvalues: $\lambda = \frac{-2 \pm \sqrt{4 - 20}}{2} = -1 \pm 2i$. Since the real part is $-1 < 0$, the equilibrium is an asymptotically stable spiral (stable focus). Trajectories spiral inward toward the origin.
Problem 4
Does the IVP $y' = \sqrt{|y|}$, $y(0) = 0$ have a unique solution? Why or why not?
Show Solution ▼
$f(x,y) = \sqrt{|y|}$ is continuous but $\frac{\partial f}{\partial y} = \frac{1}{2\sqrt{|y|}}$ is not continuous at $y = 0$. Picard's uniqueness condition fails. Indeed, both $y = 0$ and $y = \frac{1}{4}x^2$ (for $x \geq 0$) satisfy the IVP. So existence holds but uniqueness fails.
Problem 5
Find the eigenvalues of the Sturm-Liouville problem $y'' + \lambda y = 0$, $y'(0) = 0$, $y'(L) = 0$.
Show Solution ▼
For $\lambda > 0$: $y = A\cos(\sqrt{\lambda}\,x) + B\sin(\sqrt{\lambda}\,x)$. $y'(0) = 0$ gives $B = 0$. $y'(L) = -A\sqrt{\lambda}\sin(\sqrt{\lambda}\,L) = 0$, so $\sqrt{\lambda}\,L = n\pi$. Eigenvalues: $\lambda_n = (n\pi/L)^2$ for $n = 0, 1, 2, \ldots$ with eigenfunctions $y_n = \cos(n\pi x/L)$. Note $\lambda_0 = 0$ is an eigenvalue with eigenfunction $y_0 = 1$ (constant).
⚙ Interactive Quiz
1. The equation $\dfrac{dy}{dx} = \dfrac{y}{x}$ with $y(1) = 2$ has the solution:
A $y = 2e^x$
B $y = 2x$
C $y = x^2$
D $y = 2\ln x$
2. The general solution of $y'' + 9y = 0$ is:
A $C_1 e^{3x} + C_2 e^{-3x}$
B $C_1 \cos 3x + C_2 \sin 3x$
C $(C_1 + C_2 x)e^{3x}$
D $C_1 e^{3x} + C_2 xe^{3x}$
3. For the system $\mathbf{x}' = A\mathbf{x}$ with eigenvalues $\lambda = -2 \pm 3i$, the equilibrium is a:
A Center
B Saddle point
C Stable spiral
D Unstable spiral
4. The point $x = 0$ for Bessel's equation $x^2 y'' + xy' + (x^2 - \nu^2)y = 0$ is a:
A Ordinary point
B Regular singular point
C Irregular singular point
D Not a singular point
5. The eigenvalues of $y'' + \lambda y = 0$, $y(0) = 0$, $y(\pi) = 0$ are:
A $\lambda_n = n\pi$
B $\lambda_n = n^2$, $n = 1,2,3,\ldots$
C $\lambda_n = (2n-1)^2 / 4$
D $\lambda_n = n^2\pi^2$