Differential Equations Tutorial
Learn Differential Equations step by step: 39 lessons in 9 chapters with examples, quizzes, diagrams and projects.
Start learning →
of lessons completed
Getting Started
- What Is a Differential Equation? Learn what a differential equation is, how to classify ODEs and PDEs by order and linearity, and how to check that a function is a solution, with Python and SymPy.
- Direction Fields and Solution Curves Learn to read and draw slope fields for first-order ODEs, follow solution curves through them, and spot equilibria and trends without solving, using NumPy and Matplotlib.
- Initial Value Problems, Existence and Uniqueness Learn what an initial value problem is, when a solution exists and is unique (Picard-Lindelof), and see non-uniqueness and finite-time blow-up demonstrated in Python.
- Modeling with Differential Equations Turn real situations into ODEs: population growth, Newton's cooling, mixing tanks and falling objects. Learn the modeling recipe and check each model with Python.
First-order ODEs
- Separable Differential Equations Solve separable first-order ODEs by separating variables and integrating. Handle lost solutions, implicit answers and initial conditions, verified with SymPy and SciPy.
- Linear First-order Equations and Integrating Factors Solve y' + p(t)y = g(t) with an integrating factor. Learn the derivation, transient versus steady-state parts, and apply it to circuits and mixing, checked in Python.
- Exact Equations and Integrating Factors for Exactness Recognize exact ODEs M dx + N dy = 0 with the partial-derivative test, find the potential function, and rescue non-exact equations with integrating factors, using SymPy.
- Substitutions: Homogeneous and Bernoulli Equations Turn hard first-order ODEs into easy ones with substitutions: y = vx for homogeneous equations, v = y^(1-n) for Bernoulli, and v = ax+by+c. Verified in Python.
- Autonomous Equations, Equilibria and Stability Analyze y' = f(y) with the phase line: find equilibria, classify them as stable or unstable, study logistic growth and harvesting, and meet bifurcations, with Python.
Second-order Linear ODEs
- Homogeneous Second-order Equations with Constant Coefficients Solve a*y'' + b*y' + c*y = 0 with the characteristic equation. Learn superposition, the Wronskian, and the distinct-real-roots case, verified with SymPy and NumPy.
- Complex and Repeated Roots Finish the constant-coefficient second-order ODE: oscillating solutions from complex roots via Euler's formula, and the (C1 + C2 t) form for repeated roots, verified in Python.
- Undetermined Coefficients Solve a*y'' + b*y' + c*y = g(t) by guessing the form of a particular solution: polynomials, exponentials, sines and cosines, plus the resonance rule. Checked with SymPy.
- Variation of Parameters Learn variation of parameters for y'' + p y' + q y = g(t): derive the Wronskian formula, solve cases like tan t and 1/t where guessing fails, and verify with SymPy and SciPy.
- Oscillators, Springs and Resonance Model spring-mass systems with m y'' + c y' + k y = F(t): free vibrations, damping ratio, forced response, beats and resonance, with Python simulations and checks.
Laplace Transforms
- The Laplace Transform Learn the Laplace transform definition, compute transforms from the integral, use linearity, shifting and derivative rules, and build a transform table, checked with SymPy.
- Inverse Laplace Transforms and Partial Fractions Invert Laplace transforms by matching the table: partial fractions for distinct, repeated and complex poles, completing the square, with SymPy and NumPy residue checks.
- Solving ODEs with Laplace Transforms Solve linear ODE initial value problems with the Laplace transform: transform, solve for Y(s), invert. Covers forcing, systems, transfer functions, with Python checks.
- Step Functions, Impulses and Convolution Handle discontinuous and impulsive forcing with the Heaviside step, Dirac delta and convolution theorem; derive the impulse response and Green's function with Python checks.
Systems and Phase Planes
- Systems of First-order ODEs Learn how a system of first-order ODEs describes coupled quantities, how to turn any higher-order equation into a system, and how to solve one with SciPy.
- Linear Systems and Eigenvalues Solve u' = Au with eigenvalues and eigenvectors, handle complex and repeated eigenvalues, use the matrix exponential, and check everything in Python.
- Phase Portraits Read the phase plane: draw vector fields and trajectories for linear systems, recognize nodes, saddles, spirals and centers, and plot them with Matplotlib.
- Nonlinear Systems and Linearization Find equilibria of nonlinear systems, linearize with the Jacobian matrix, classify stability, and test the predictions on a pendulum and predator-prey model.
Series and Special Functions
- Power Series Solutions of ODEs Solve linear ODEs with variable coefficients using power series: derive recurrence relations, handle ordinary points, find the radius of convergence, and verify in Python.
- The Frobenius Method Solve ODEs at regular singular points with the Frobenius method: indicial equation, the three root cases, recurrence relations and Python checks.
- Bessel and Legendre Functions Meet the two most famous special-function ODEs: Bessel's equation for circular problems and Legendre's equation for spheres, with series, orthogonality and SciPy checks.
Numerical Methods
- The Euler Method from Scratch Build Euler's method for ODEs from the tangent-line idea, measure its local and global error, see first-order convergence, and extend it to systems in Python.
- Runge-Kutta Methods Learn Runge-Kutta methods: midpoint and classical RK4, order of accuracy, Butcher tableaus, and a convergence study that shows why RK4 is the workhorse.
- Adaptive Steps and solve_ivp Understand adaptive step-size control with embedded Runge-Kutta pairs, write your own controller, and use SciPy's solve_ivp with tolerances, dense output and events.
- Stiff Equations and Stability Learn what makes an ODE stiff, why explicit methods blow up on the test equation, how implicit methods such as backward Euler stay stable, and how to pick a solver.
- Boundary Value Problems and Shooting Solve ODE boundary value problems numerically: the shooting method with root finding, finite-difference matrices, SciPy's solve_bvp, and checks against exact solutions.
PDEs and Applications
- Introduction to Partial Differential Equations Start with PDEs: what makes an equation partial, the heat, wave and Laplace equations, elliptic-parabolic-hyperbolic classification, boundary conditions, and transport by characteristics.
- Separation of Variables and Fourier Series Master separation of variables: split a PDE into ODEs, solve the eigenvalue problem, build solutions from Fourier sine series, and see convergence and the Gibbs effect in Python.
- The Heat Equation Solve the 1D heat equation exactly with Fourier series and numerically with explicit and implicit finite differences, including stability limits, in Python.
- The Wave Equation Understand the 1D wave equation: d'Alembert's traveling waves, standing-wave Fourier solutions for a plucked string, the CFL condition and a leapfrog scheme in Python.
- Laplace's Equation and Potential Problems Study Laplace and Poisson equations: harmonic functions, the maximum principle, a series solution on a rectangle and Jacobi relaxation on a grid with NumPy.
Projects and Practice
- Project: Predator and Prey Model Build a complete predator-prey project: simulate Lotka-Volterra, add logistic growth, analyze equilibria with the Jacobian, and fit parameters to noisy data with SciPy.
- Project: Epidemic Modeling with SIR Model an epidemic with the SIR equations: simulate, derive R0, peak and final size, test interventions and vaccination, and extend to SEIR using SciPy.
- Project: Driven Oscillators and Resonance Explore a forced, damped oscillator: the steady-state amplitude formula, resonance peak, beats, quality factor and the RLC circuit analogy, checked against numerical simulation.
- Practice Problems: Systems, Series, Numerics and PDEs Ten worked practice problems covering linear systems, phase planes, series solutions, Frobenius, Euler and RK4, stiffness, heat, wave and Laplace equations, checked with SymPy.