Intro to Differential Equations and Modeling

Proportionality, Constants, and Hooke's Law

  • Proportionality means two quantities scale together; to turn a proportional relationship into an equality, introduce a constant of proportionality.

    • If a force F is proportional to an extension x, we write F = k\,x where k is the proportionality constant.

    • In physics, the proportionality constant for a mass-spring system is called the spring constant.

    • A familiar example: gravitational force is F_g = m g when considering a mass in a gravitational field (downward direction).

    • The slope of the line relating force to extension is the proportionality constant; in this context, it is the spring constant.

  • This connects to Hooke's Law: the force exerted by an ideal spring is proportional to its displacement from equilibrium.

  • Idea to carry to differential equations: whenever we say something is proportional to something else, we introduce a constant to turn proportionality into an equality, which leads to modeling with equations.

From proportionality to differential equations and modeling

  • The class uses a biological modeling question: number of bacteria at time t, denoted by P(t).

  • We often cannot write a direct closed form formula for the quantity of interest; instead, we write a differential equation that governs the rate of change, e.g., \frac{dP}{dt} = f(P,t).

  • The object of study is the differential equation (DE) itself, and the goal is to "solve" it, i.e., find the function(s) P(t) that satisfy the DE.

  • A simple example of a DE that is easily solvable by separation of variables is

    • \frac{dP}{dt} = k P where k is a constant.

    • This is solvable by separable methods and leads to exponential growth/decay.

  • The process of solving a DE often yields a function, not a single number, which is a shift from many algebraic equations you solved earlier.

  • The phrase you may hear in modeling: "All models are wrong, but some are useful." This reflects that models are simplifications of reality, but can still provide valuable insights.

Differential equations: definitions, notation, and types

  • What is a differential equation? An equation that involves derivatives of an unknown function.

    • Example: for a function p(t), \frac{dp}{dt} = f(p,t) is a differential equation.

  • Independent vs dependent variables:

    • Independent variable is the variable you control/change (often time t or space variable x).

    • Dependent variable depends on the independent variable (e.g., p(t)).

    • In a DE, the left-hand side involves derivatives with respect to the independent variable.

  • Solutions of DEs are functions, not numbers.

    • Contrast with elementary algebra where solving for x yields a number; here, the solution is a function p(t) (or a family of functions depending on integration constants).

  • Order of a differential equation:

    • The order is determined by the highest derivative that appears.

    • First order: involves only first derivative (e.g., \frac{dy}{dx}).

    • Second order: involves up to the second derivative (e.g., \frac{d^2 y}{dx^2}).

    • Third order, etc. The order classifies the DE.

  • Ordinary differential equations (ODEs) vs Partial differential equations (PDEs):

    • ODEs have a single independent variable (e.g., t) and derivatives with respect to that variable.

    • PDEs involve partial derivatives with respect to multiple independent variables (e.g., \frac{\partial u}{\partial x}, \frac{\partial u}{\partial y}).

    • Example of PDE from the lecture: a temperature distribution on a plate, which depends on x and y, leading to a PDE such as

    • \frac{\partial u}{\partial x} + \frac{\partial u}{\partial y} = \sin x + y.

  • Systems of ODEs:

    • When more than one dependent variable evolves in time, you get a system of ODEs.

    • Example discussed: population dynamics with two species (e.g., rabbits and foxes). The state is a vector (x(t), y(t)) and the system is two equations for the two unknown functions.

    • Often written as a system of two equations with independent variable t; the solution is a pair of functions (x(t), y(t)).

  • Linear vs nonlinear DEs:

    • A differential equation is linear if it can be written in a form where the dependent variable and its derivatives appear to the first power and are not multiplied together, with coefficients that depend only on the independent variable (or are constants), and the dependent variable never appears inside nonlinear functions.

    • Standard linear form (example):

    • an(x) \frac{d^n y}{dx^n} + a{n-1}(x) \frac{d^{n-1} y}{dx^{n-1}} + \dots + a1(x) \frac{dy}{dx} + a0(x) y = f(x).

    • Nonlinear examples include any of the following: the derivative appears squared (e.g., \left(\frac{dy}{dx}\right)^2), the dependent variable appears inside a nonlinear function (e.g., \sin(y) or e^{y}), or derivatives multiply each other (e.g., \left(\frac{dy}{dx}\right) \cdot y).

  • Partial derivatives and PDEs are introduced but not the main focus of the current course; PDEs require more advanced techniques (e.g., heat equation, Laplace equation) often covered later.

  • Examples discussed in class for terminology and intuition:

    • First-order linear DE example: \frac{dy}{dx} + y = x.

    • Second-order linear DE example: \frac{d^2 y}{dx^2} + 3\frac{dy}{dx} + 2 y = \sin x.

    • A nonlinear second-order example given for contrast: equations where derivatives appear squared or inside nonlinear functions.

  • Notation and conventions:

    • Independent variable often denoted by t or x; the corresponding dependent variable is denoted as a function of that independent variable (e.g., p(t) or y(x)).

    • Derivative notation: prime notation is common (e.g., y' = \frac{dy}{dx}, y'' = \frac{d^2 y}{dx^2}).

    • In PDE contexts, you may see u(x,y), with partial derivatives like \frac{\partial u}{\partial x} and so on.

Worked examples and verification techniques (substitution checks)

  • Example 1: Verify that y(x) = x e^{x} is a solution of y'' - 2 y' + y = 0.

    • Compute derivatives:

    • y'(x) = (x+1) e^{x}

    • y''(x) = (x+2) e^{x}

    • Substitute into the DE:

    • y'' - 2 y' + y = (x+2)e^{x} - 2(x+1)e^{x} + x e^{x} = [x+2 - 2x - 2 + x] e^{x} = 0.

    • Conclusion: y(x) = x e^{x} satisfies the DE, hence is a solution.

  • Example 2: Verify that y(t) = \cos(2t) + \frac{1}{13}e^{3t} solves y'' + 4y = e^{3t}.

    • Compute derivatives:

    • y'(t) = -2 \sin(2t) + \frac{3}{13} e^{3t}

    • y''(t) = -4 \cos(2t) + \frac{9}{13} e^{3t}

    • Compute LHS: y'' + 4y = (-4\cos(2t) + \frac{9}{13}e^{3t}) + 4\left(\cos(2t) + \frac{1}{13}e^{3t}\right) = 0\cdot\cos(2t) + \frac{13}{13} e^{3t} = e^{3t}.$n- Therefore, the function satisfies the DE.

    • Note: The instructor discussed two verification approaches: (i) substitute into LHS and simplify to show equality with RHS; (ii) compute RHS and show it equals the LHS, but you should start from LHS to make the verification explicit.

  • Example 3: Verify that the function p(t) = \frac{2 e^{t}}{1 + 2 e^{t}} satisfies the logistic-type DE \frac{d p}{dt} = p\,(1 - p).

    • Compute derivative using quotient rule:

    • Let p = \frac{2 e^{t}}{1 + 2 e^{t}}. Then
      \frac{d p}{dt} = \frac{(2 e^{t})(1 + 2 e^{t}) - (2 e^{t})(2 e^{t})}{(1 + 2 e^{t})^{2}} = \frac{2 e^{t}}{(1 + 2 e^{t})^{2}}.

    • Compute the right-hand side:

    • p(1 - p) = \frac{2 e^{t}}{1 + 2 e^{t}} \left(1 - \frac{2 e^{t}}{1 + 2 e^{t}}\right) = \frac{2 e^{t}}{1 + 2 e^{t}} \cdot \frac{1}{1 + 2 e^{t}} = \frac{2 e^{t}}{(1 + 2 e^{t})^{2}}.

    • Since \frac{d p}{dt} = p(1 - p), the given function is indeed a solution.

  • Methodological takeaway: when verifying a solution, substitute the function and its derivatives into the differential equation and show that the left-hand side equals the right-hand side; if you prefer, you can manipulate the right-hand side to match the left-hand side, but starting from the left-hand side is recommended to keep the logic clear.

Key concepts recap and quick references

  • Solutions to DEs are functions, not numbers:

    • The graph of the solution is typically a function plot, e.g., p(t) versus t.

  • The order of a DE corresponds to the highest derivative that appears.

  • Linear vs nonlinear:

    • Linear: derivatives appear to first power and are not inside nonlinear functions of the dependent variable.

    • Nonlinear: derivatives appear squared, multiplied together, or appear inside nonlinear functions of the dependent variable.

  • ODE vs PDE:

    • ODE: single independent variable; all derivatives are ordinary derivatives with respect to that variable.

    • PDE: multiple independent variables; derivatives are partial derivatives.

  • Systems of DEs: multiple dependent variables evolving together, e.g., a predator-prey or competing species model; leads to a system of coupled ODEs.

  • Separable methods (e.g., for \frac{dP}{dt} = k P) lead to exponential solutions:

    • Separation of variables gives
      \frac{1}{P}\,dP = k\,dt \quad\Rightarrow\quad \ln P = k t + C \quad\Rightarrow\quad P(t) = C e^{k t}.

  • Practical note: in modeling and problem solving, there is often more than one approach to verify a solution; the preferred approach is to start from the left-hand side of the DE and show it equals the right-hand side after substitution.

  • Real-world relevance:

    • Physics and engineering frequently use linear ODEs because they are easier to solve and analyze.

    • Biology and ecology provide rich examples (population growth, predator-prey dynamics) that are modeled by systems of DEs.

    • The logistic equation models constrained growth and yields sigmoid (S-shaped) solutions; a common form is
      \frac{d p}{dt} = r p\left(1 - \frac{p}{K}\right),
      with general solution p(t) = \frac{K}{1 + A e^{-r t}}.

    • In the class, a specific case used is \frac{d p}{dt} = p(1-p) with solution shape similar to the general logistic form.

  • Final note on modeling mindset:

    • Models are simplifications; choose appropriate level of detail for the problem.

    • Good modeling practice mixes intuition, mathematical technique, and critical evaluation of assumptions.

Quick cheat-sheet for identifying linearity and order

  • To test linearity:

    • Check if derivatives appear with no powers and are not multiplied by each other or by non-linear functions of the dependent variable.

    • If you see something like \left(\frac{dy}{dx}\right)^2 or $\sin(y) or product of derivatives, it is nonlinear.

  • To determine order:

    • Look for the highest derivative present; that is the order (e.g., highest derivative is \frac{d^{n}y}{dx^{n}}$$, so order is n).

  • When in doubt, rewrite the DE in standard linear form and compare to the general linear template for clarity.

Practical tips for exams

  • When given a function, plugging into the DE and simplifying is the standard verification method.

  • Remember: the solution to a DE is a function, not a single value; expect functional answers and sometimes constants of integration.

  • Practice separating variables for simple growth models to obtain exponential behavior, and recognize logistic-type equations when carrying capacity or saturation is present.

  • Don’t rely on shortcuts that assume equality without a proper substitution and simplification; show the chain from LHS to RHS explicitly.