JustToThePoint English Website Version
JustToThePoint en español

Basic Linear ODE. Mixing Models and Applications

The excitement of learning separates youth from old age. As long as you’re learning, you’re not old, Rosalyn S.Yalow

People are not who they say but rather who their actions reveal them to be… Be smart about it. Don’t fall for the bullshit, Ziad K. Abdelnour

Recall

Definition. A differential equation is an equation that involves one or more dependent variables, their derivatives with respect to one or more independent variables, and the independent variables themselves, e.g., $\frac{dy}{dx} = 3x +5y, y' + y = 4xcos(2x), \frac{dy}{dx} = x^2y+y, etc.$

It involves (e.g., $\frac{dy}{dx} = 3x +5y$):

Basic linear ODE

Basic linear ODE

In mathematics, a linear ordinary differential equation (ODE) is an equation involving an unknown function and its derivatives, characterized by the property that both the function and its derivatives appear linearly. This means that the unknown function and its derivatives are raised only to the first power. They are never multiplied together, nor are they composed within nonlinear functions (such as $\sin(y)$ or $e^y$). The general form for a first-order linear ODE is: a(x)y’ + b(x)y = c(x).

This property of linearity is fundamental. While most physical systems are inherently nonlinear, many can be accurately approximated by linear models over a specific range. This linearity allows mathematicians and engineers to utilize a vast and powerful toolkit of analytical solution methods that are unavailable for nonlinear systems. Consequently, linear ODEs are the bedrock of modeling in numerous fields, including:

In this article, we will explore different forms of linear ODEs, their applications, and their solutions, with a focus on understanding their behavior in real-world contexts.

Mathematical Definition of Linearity

An ODE of order n is linear if it can be expressed in the form: $a_n(t)\frac{d^ny}{dt^n} +a_{n-1}(t)\frac{d^{n-1}y}{dt^{n-1}} + ··· + a_1(t)\frac{dy}{dt} + a_0(t)y = q(t)$ where

The function y and its derivatives appear to the first power and are not multiplied together.

Homogeneous vs. Non-Homogeneous Equations

A crucial classification for linear ODEs depends on the forcing function $q(t)$.

  1. Homogeneous Linear ODE: If the forcing function is identically zero ($q(t) = 0$), the equation is said to be homogeneous:
    $a_1(t)y' + a_0(t)y = 0$.
    The trivial solution, $y(t)=0$, always satisfies a homogeneous equation.

  2. Non-Homogeneous Linear ODE: If the forcing function is not zero ($q(t) \neq 0$), the equation is non-homogeneous:
    $a_1(t)y' + a_0(t)y = q(t)$
    The general solution to a non-homogeneous equation is composed of the sum of the general solution to its associated homogeneous equation and a particular solution to the non-homogeneous equation.

Common Forms of First-Order Linear ODEs

First-order linear ODEs involve only the unknown function and its first derivative. Mastering these forms is the foundational step toward understanding more complex higher-order systems. They commonly appear in several equivalent structures:

Each of these forms arises in different real-world scenarios, which we will break down further.

Physical Application: Salt Mixing in a Tank

Deriving mathematical models for mixing substances is a prerequisite in chemical engineering, pharmacology, and environmental science.

Consider a well-mixed tank containing a solution of salt and water. A saltwater mixture flows in, and the well-mixed solution flows out. Let’s model how the mass of salt in the tank changes over time.

Let’s define the variables involved:

Basic Linear ODE

The tank is well-mixed, so the concentration of salt throughout the tank is uniform at all times, meaning the concentration of salt is uniform throughout the tank. Therefore, $C(t) = \frac{x(t)}{V}$

Flow Rate of Salt

Deriving the ODE via Conservation of Mass

The fundamental modeling principle is the principle of conservation of mass: the rate of change of the amount of substance in the tank equals the rate at which it enters minus the rate at which it leaves.

Mathematically, this translates to the differential equation:

$\frac{dx}{dt} = \text{Rate of Salt Inflow − Rate of Salt Outflow}$

Where the rates of salt flow are calculated as (Flow Rate) × (Concentration): $\text{Rate}_{\text{in}} = r \cdot C_e(t)$; $\text{Rate}_{\text{out}} = r \cdot C(t) = r \cdot \frac{x(t)}{V}$

Substituting these definitions into the conservation principle yields: $\frac{dx}{dt} = rC_e(t) - r\frac{x}{V}$

Rearranging terms to the standard form gives: $\boxed{\frac{dx}{dt} + \left(\frac{r}{V}\right)x = rC_e(t)}$

This equation states that the rate of change of salt in the tank $\frac{dx}{dt}$ is equal to the rate of salt inflow (the product of the inflow rate r and the concentration of the incoming solution Ce(t)) r·Ce(t) minus the rate of salt outflow (the product of the outflow rate r and the concentration of the solution in the tank C(t):) $r·\frac{x}{V}$, where C(t) = x⁄V is the concentration of salt in the tank at time t (since the tank is well-mixed).

Expressing the Equation in Terms of Concentration

While the above equation describes the total mass x(t), scientists often find concentration C(t) to be a more practical variable. Recalling that C(t) = x⁄V, x(t) = VC(t) we differentiate with respect to time: $\frac{dx}{dt} = \frac{d}{dt}(VC(t)) =[\text{V is constant}] V \frac{dC}{dt}$, and we get: $V \frac{dC}{dt} + rC = rC_e(t)$

Dividing the entire equation by the constant volume V: $\frac{dC}{dt} + (\frac{r}{V})C = (\frac{r}{V})C_e(t)$.

Physical Significance of the Parameter k

Let’s define a new parameter, $k = r/V$. This is known as the dilution rate or the fractional flow rate, and its unit is inverse time ($1/t$, e.g., $1/\text{min}$). Physically, $k$ represents the fraction of the total tank volume that is replaced per unit time. It dictates the “speed” of the system

Substituting $k$ back into the concentration equation yields the generic dynamic model: $\boxed{\frac{dC}{dt} + kC = kC_e(t)}$

This is a first-order linear ordinary differential equation in proportional input form describing the salt concentration in the tank.

Intuitive Understanding of the Model

Solving the Dynamic Mixing Model

The generic first-order linear ODE derived above can be solved explicitly using the integrating factor method, $\frac{dC}{dt} + kC = kC_e(t)$

  1. Compute the Integrating Factor μ(t): $μ(t) = e^{\int kdt} = e^{kt}$
  2. Multiply both sides of the ODE by μ(t): $e^{kt}\frac{dC}{dt} + ke^{kt}C = ke^{kt}C_e(t)$. The left-hand side of the equation simplifies to: $\frac{d}{dt}(e^{kt}C)$
  3. Integrate Both Sides: $\int \frac{d}{dt}(e^{kt}C)dt = \int ke^{kt}C_e(t)dt ↭ e^{kt}C = k\int e^{kt}C_e(t)dt + C_1$ where C1 is the constant of integration determined by the initial concentration C(0).
  4. Solve for the Concentration C(t): $\boxed{C(t) = e^{-kt}[k\int e^{kt}C_e(t)dt + C_1]}$

This explicit solution allows engineers to predict the tank concentration C(t) over time for any initial condition C(0) and any varying incoming concentration profile $C_e(t)$.

Special Case: Constant Input Concentration

Consider the dynamic mixing mode $\frac{dC}{dt} + kC = kC_e(t)$, where k is the system rate constant (defined as flow rate r / tank volume V).

Suppose the concentration of the incoming substance, $C_e(t)$ is not changing over time. We define this constant input as $C_{input}$ or $C_0$.

  1. Integrate the Right-Hand side: $\int e^{kt}C_e(t)dt = C_0\int e^{kt}dt = \frac{C_0e^{kt}}{k} + C_2$
  2. Substitute back into the solution: $C(t) = e^{-kt}[k\int e^{kt}C_e(t)dt + C_1] = e^{-kt}[k(\frac{C_0e^{kt}}{k}) + kC_2 + C_1] = C_0 + kC_2e^{-kt} + C_1e^{-kt} = C_0 + (kC_2+C_1)e^{-kt} = C_0 + C'e^{-kt}$. $\boxed{C(t) = C_0 + C'e^{-kt}}$ where $C' = kC_2+C_1$. This is the general solution for concentration under constant input.
    The term $C_0$ represents the long-term stable concentration, and $C'e^{-kt}$ represents the system’s adjustment from its starting point.
  3. Applying Initial Conditions. Suppose we have an initial condition C(0) = Cinitial: $C_{initial} = C_0 + C'e^{-0·t} = C_0 + C'⇒ C' = C_{initial} -C_0$. The general solution to the differential equation with a constant input concentration is: $C(t) = C_0 + (C_{initial} -C_0)e^{-kt}$

This expression is a highly effective “shortcut formula” that models how any first-order constant input system moves from its initial state ($C_{initial}$) to its new input driving state ($C_{input}=C_0$).

Interpretation

Breaking down this solution formula into its parts gives us complete operational insight into the system dynamics over time:

Improved Example Problem Solution

By applying the specific solution formula for constant input derived above, we can solve complex physical problems, like the beer vat mixing scenario, much more efficiently and with fewer constant variables than using re-integration from scratch.

A vat contains 500 gallons of beer with an alcohol concentration of 4% (by volume). Beer with an alcohol concentration of 7% is pumped into the vat at a rate of 5 gallons per minute. The mixture is simultaneously pumped out at the same rate. Questions: (a) What is the amount of alcohol in the vat after an hour? (b) What is the percentage of alcohol after an hour?

Step 1: Define Physical Variables and System Constants: The vat contains V = 500 gallons of beer with Cinitial = 4% = 0.04 alcohol, so initially, the amount of alcohol is: A(0) = V·Cinitial = 500 × 0.04 = 20 gallons of alcohol. Inflow and Outflow Rate: r = 5 gal/min. Incoming Alcohol Concentration: Ce(t) = 7% = 0.07.

Step 2: Set Up the Differential Equation

Let A(t) be the amount of alcohol in the vat at time t (measured in gallons). The concentration of alcohol in the vat at time t is: $C(t) = \frac{A(t)}{V} = \frac{A(t)}{500}$ because concentration = amount of alcohol⁄volume.

The rate of alcohol inflow and outflow can be written as: $\frac{dA}{dt} = \text{Rate of Alcohol Inflow - Rate of Alcohol Outflow} = rC_e(t) -r\frac{A(t)}{V} = 5\text{gal/min}·0.07 -5\text{gal/min}·\frac{A}{500}$

Thus, the differential equation becomes: $\frac{dA}{dt}=0.35 -0.01A, A(0) = 20, A(60)?$

Step 3: Solve the Differential Equation. This is a separable differential equation. Let’s separate the variables: $\frac{1}{0.35 -0.01A}dA = dt$.

Integrate both sides: $\int \frac{1}{0.35 -0.01A}dA = \int dt ⇒ \frac{1}{-0.01}ln|0.35 -0.01A| = t + C_1 ⇒[\text{Simplifying:}] ln|0.35 -0.01A| = -0.01(t + C_1) ↭ ln|0.35 -0.01A| = -0.01t + C_2$ where C2 = -0.01·C1 is a new constant of integration.

On the left-hand side, the integral requires a substitution u = 0.35 - 0.01A, so du = -0.01dA.

$ln|0.35 -0.01A| = -0.01t + C_2 ↭[\text{Take exponentials of both sides to solve for A:}] |0.35 -0.01A| = e^{-0.01t + C_2}↭ |0.35 -0.01A| = C_3e^{-0.01t}$ where C3 = eC2

$0.35 -0.01A = ± C_3e^{-0.01t} ↭ -0.01A = -0.35 + C_4e^{-0.01t}$ where C4 = ± C3.

Solving for A, $A = \frac{-0.35}{-0.01}+\frac{C_4}{-0.01}e^{-0.01t} ↭ A = 35 + C_5e^{-0.01t}$ where $C_5 = \frac{C_4}{-0.01}⇒[\text{Let C = C₅. Applying the initial conditions}] A(0) = 20 = 35 + Ce^{-0.01·0} ↭ C = 20 -35 = -15 ⇒[\text{Thus, the general solution is:}] A = 35 + Ce^{-0.01t} = 35 -15e^{-0.01t}$

Step 4: Calculate Amount of Alcohol After One Hour (60 minutes). $A(60) = 35 -15e^{-0.01·60} = 35 -15e^{-0.6}≈ 26.77$ gallons of alcohol. So, after an hour (60 minutes), the vat contains approximately 26.7 gallons of alcohol.

Step 5: Calculate the Percentage of Alcohol After One Hour. Alcohol Concentration = $\frac{A(60)}{500} x 100$% $= \frac{26.77}{500} x 100 = 0.0535 x 100 = 5.35$% is the percentage of alcohol after an hour. After 60 minutes, the alcohol concentration has risen from its initial 4% up to approximately 5.35%, trending toward the input of 7%.

Bibliography

This content is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License and is based on MIT OpenCourseWare [18.01 Single Variable Calculus, Fall 2007].
  1. NPTEL-NOC IITM, Introduction to Galois Theory.
  2. Algebra, Second Edition, by Michael Artin.
  3. LibreTexts, Calculus and Calculus 3e (Apex). Abstract and Geometric Algebra, Abstract Algebra: Theory and Applications (Judson).
  4. Field and Galois Theory, by Patrick Morandi. Springer.
  5. Michael Penn, and MathMajor.
  6. Contemporary Abstract Algebra, Joseph, A. Gallian.
  7. YouTube’s Andrew Misseldine: Calculus. College Algebra and Abstract Algebra.
  8. MIT OpenCourseWare [18.03 Differential Equations, Spring 2006], YouTube by MIT OpenCourseWare.
  9. Calculus Early Transcendentals: Differential & Multi-Variable Calculus for Social Sciences.
Bitcoin donation

JustToThePoint Copyright © 2011 - 2026 Anawim. ALL RIGHTS RESERVED. Bilingual e-books, articles, and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun. Social Issues, Join us.

This website uses cookies to improve your navigation experience.
By continuing, you are consenting to our use of cookies, in accordance with our Cookies Policy and Website Terms and Conditions of use.