Ordinary Differential Equations
Master first order ODEs, higher order linear equations, systems of ODEs, series solutions, and boundary value problems for GATE Mathematics.
Techniques for solving first order ordinary differential equations and the fundamental existence-uniqueness theorem.
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}$
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}$.
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.
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}$.
- 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
Systematic methods for solving linear ODEs of order two and higher 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)$
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}$.
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.
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$.
- 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
Matrix methods for solving coupled systems of first order linear ODEs, with applications to stability analysis.
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$.
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}$.
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)
- 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
Power series and Frobenius methods for solving ODEs with variable coefficients, including classical equations.
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$.
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$.
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.
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
- 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
Sturm-Liouville theory, Green's functions, and eigenfunction expansions provide the framework for boundary value problems arising in physics and engineering.
- 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]$
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$
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.
- 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