Mixing Problems and Exact Equations with Integrating Factors, MATH 441 – Study Notes
offline

Difficulty: Intermediate | Prerequisites: Separable equations, integrating factor for linear ODEs, partial derivatives, product rule.

Tags: mixing problem, tank problem, exact equation, integrating factor, exactness condition, M and N, partial derivatives, My = Nx, MATH 441, ordinary differential equations


TL;DR

Mixing (tank) problems translate a physical setup into a separable or linear ODE using a standard rate-in-minus-rate-out template. Exact equations are a different class entirely: they come from recognising that Mdx + Ndy = 0 is the total differential of some function F(x, y). When the equation is not exact, an integrating factor can force it to be. Both types are exam staples.


Key Terms

Mixing problem (tank problem)

A word problem where a substance (usually salt) flows into and out of a well-stirred tank, and you model the quantity Q(t) of the substance over time. In simple terms, you set up Q' = (rate in) - (rate out) and solve the resulting ODE.

Rate in / rate out

Rate in = (concentration of inflow) × (flow rate in). Rate out = (Q(t) / volume) × (flow rate out). The volume may be constant (if inflow rate equals outflow rate) or changing.

Exact equation

An equation M(x, y)dx + N(x, y)dy = 0 is exact if there exists a function F(x, y) such that ∂F/∂x = M and ∂F/∂y = N. In simple terms, the left side is already a perfect total differential dF = 0, so the solution is F(x, y) = C.

Exactness condition

∂M/∂y = ∂N/∂x. If this holds, the equation is exact. If it fails, you need an integrating factor.

Integrating factor (for exact equations)

A function μ that you multiply through the entire equation so that the result becomes exact. It can depend on x alone, y alone, or both, depending on the structure of (∂M/∂y - ∂N/∂x). Think of it as a correction multiplier that forces the exactness condition to hold.


Core Content

Mixing / Tank Problems

The modelling template

  • Identify the tank volume V(t). If inflow rate rᵢ equals outflow rate rₒ, then V is constant: V = V₀.

  • Define Q(t) as the quantity of substance in the tank at time t.

  • Write the ODE:

    • Q' = (concentration in) × rᵢ - (Q(t)/V(t)) × rₒ

  • If the inflow is pure water (concentration 0), the rate-in term vanishes.

Worked example: salt tank

  • Tank holds 200 gal, initial concentration 1 lb/gal, so Q(0) = 200 lb.

  • Fresh water flows in at 2 gal/min; well-mixed solution flows out at 2 gal/min.

  • Since rᵢ = rₒ = 2, volume stays at 200 gal.

  • Q' = 2 × 0 - 2 × Q/200 = -Q/100.

  • This is separable: dQ/Q = -dt/100.

  • Integrate: ln Q = -t/100 + c, so Q(t) = Ce^(-t/100).

  • Apply IC: Q(0) = 200, so C = 200. Final: Q(t) = 200 e^(-t/100).

Finding a specific time

  • "When does Q drop to 0.01 lb?"

  • 200 e^(-T/100) = 0.01

  • e^(T/100) = 20,000

  • T = 100 ln(20,000) = 100(4 ln 5 + 5 ln 2).

Variations to watch for

  • If rᵢ ≠ rₒ, the volume changes: V(t) = V₀ + (rᵢ - rₒ)t. The ODE becomes non-constant-coefficient.

  • If the inflow has nonzero concentration cᵢ, the rate-in term is cᵢ × rᵢ rather than zero.

  • Occasionally there are two tanks connected in series, each with its own ODE.

Exact Equations

Testing for exactness

  • Given M(x, y) dx + N(x, y) dy = 0, compute ∂M/∂y and ∂N/∂x.

  • If ∂M/∂y = ∂N/∂x, the equation is exact. Proceed to find F(x, y).

  • If ∂M/∂y ≠ ∂N/∂x, the equation is not exact. You need an integrating factor.

Solving an exact equation

  • Integrate M with respect to x: F(x, y) = ∫ M dx + h(y), where h(y) is an unknown function of y.

  • Differentiate F with respect to y and set it equal to N: ∂F/∂y = (∂/∂y) ∫ M dx + h'(y) = N.

  • Solve for h'(y), integrate to get h(y).

  • The solution is F(x, y) = C.

Finding an integrating factor μ(x)

  • If the equation is not exact, check whether (∂M/∂y - ∂N/∂x) / N depends on x alone.

  • If it does, then μ'/μ = (∂M/∂y - ∂N/∂x) / N, and μ(x) = e^(∫ that expression dx).

  • Multiply the entire equation by μ(x), confirm it is now exact, then solve as above.

Finding an integrating factor μ(y)

  • Alternatively, check whether (∂N/∂x - ∂M/∂y) / M depends on y alone.

  • If it does, μ(y) = e^(∫ that expression dy).

Worked example

  • Equation: (x + 2) sin y + x cos y · y' = 0.

  • M = (x + 2) sin y, N = x cos y.

  • ∂M/∂y = (x + 2) cos y, ∂N/∂x = cos y. These are not equal, so not exact.

  • Compute (∂M/∂y - ∂N/∂x) / N = ((x + 2) cos y - cos y) / (x cos y) = (x + 1)/x.

  • This depends on x alone. So μ'/μ = (x + 1)/x = 1 + 1/x.

  • Integrate: ln|μ| = x + ln|x|, so μ = xe^x.

  • Multiply through: e^x(x² + 2x) sin y + x²e^x cos y · y' = 0.

  • Verify: this is d/dx [x²e^x sin y] = 0 (the total differential of x²e^x sin y).

  • Solution: x²e^x sin y = C.


Formulas / Diagrams

Mixing model:

Q' = cᵢ rᵢ - (Q / V) rₒ

Exactness test:

∂M/∂y = ∂N/∂x

Integrating factor (x only):

μ'/μ = (∂M/∂y - ∂N/∂x) / N, provided this is a function of x alone.

Integrating factor (y only):

μ'/μ = (∂N/∂x - ∂M/∂y) / M, provided this is a function of y alone.


Real-World Applications

Tank mixing models are used directly in chemical engineering for modelling reactors and dilution processes, in environmental science for pollutant dispersion in lakes, and in pharmacokinetics for drug concentration in the bloodstream. Exact equations and integrating factors arise whenever a physical system has a conserved quantity (energy, for instance) that can be expressed as a function F(x, y) = C. The integrating factor technique generalises to thermodynamics, where temperature serves as an integrating factor for the heat differential.


Common Misconceptions

  • In mixing problems, students often write the outflow concentration as the inflow concentration rather than Q(t)/V(t). The outflow carries the current tank concentration, which changes with time.

  • When testing for exactness, students sometimes differentiate M with respect to x instead of y (or N with respect to y instead of x). Remember: ∂M/∂y and ∂N/∂x, cross-differentiate.

  • A frequent error when finding μ(x) is dividing (∂M/∂y - ∂N/∂x) by M instead of N. The formula for a μ that depends on x alone divides by N.

  • Students occasionally multiply only M or only N by μ. The integrating factor must multiply the entire equation (both M and N) before you test for exactness or solve.


Why It Matters / Exam Flags

⚠️ Mixing problems will always state inflow rate, outflow rate, and concentrations. Translate each into the template Q' = (rate in) - (rate out) before doing any algebra.

⚠️ For exact equations, the exam will typically ask you to (1) show it is not exact, (2) find an integrating factor, and (3) solve. All three steps must appear in your answer.

⚠️ When the problem specifies "find μ(x)" or "find μ(y)," it is telling you which form to try. If it does not specify, check both.

⚠️ After multiplying by μ, always verify the new equation is exact before solving. This catches arithmetic errors early.


Quick Self-Test

  1. Fill in the blank: In a constant-volume tank problem, Q' = cᵢ rᵢ - (Q / ________) rₒ.

  1. True or false: If ∂M/∂y = ∂N/∂x, you need an integrating factor.

  1. Fill in the blank: To find μ(x), compute (∂M/∂y - ∂N/∂x) / ________ and check it depends only on x.

  1. True or false: The outflow concentration in a mixing problem is always equal to the inflow concentration.

  1. True or false: After finding F(x, y) for an exact equation, the general solution is F(x, y) = C.

Answers: 1. V (volume). 2. False (it is already exact). 3. N. 4. False (it is Q(t)/V(t)). 5. True.


Practice Q&A

Q: A 200-gal tank starts with 200 lb of salt. Fresh water flows in at 2 gal/min and the well-mixed solution flows out at 2 gal/min. Write the ODE for Q(t).

A: Q' = 0 - (Q/200) × 2 = -Q/100. Initial condition: Q(0) = 200.

Q: Solve this ODE and find Q(t).

A: Separate: dQ/Q = -dt/100. Integrate: Q = Ce^(-t/100). Apply IC: C = 200, so Q(t) = 200e^(-t/100).

Q: Find the time T when Q(T) = 0.01 lb.

A: 200e^(-T/100) = 0.01, so e^(T/100) = 20,000, giving T = 100 ln(20,000).

Q: For (x + 2) sin y + x cos y · y' = 0, show the equation is not exact.

A: M = (x + 2) sin y, N = x cos y. ∂M/∂y = (x + 2) cos y, ∂N/∂x = cos y. Since (x + 2) cos y ≠ cos y, the equation is not exact.

Q: Find the integrating factor μ(x) for the above equation.

A: (∂M/∂y - ∂N/∂x) / N = ((x+2) cos y - cos y) / (x cos y) = (x+1)/x. Integrate: ln|μ| = x + ln|x|, so μ = xe^x.

Q: After multiplying by μ = xe^x, what is the solution?

A: The equation becomes d(x²e^x sin y) = 0, so x²e^x sin y = C.


Connections to Other Topics

Mixing problems are an application of first-order linear and separable ODEs, so they tie back to the techniques in the Bernoulli and separable equations notes. Exact equations connect forward to potential functions in multivariable calculus: finding F(x, y) from its partial derivatives is the same skill as finding a potential function for a conservative vector field. The integrating factor for exact equations is a generalisation of the integrating factor used for linear ODEs, which is itself the special case where μ depends on one variable and the equation has a particular structure.


Related Terms / Search Tags

mixing problem, tank problem, salt tank, dilution ODE, rate in rate out, exact equation, exactness condition, My = Nx, integrating factor, μ(x), μ(y), total differential, potential function, conservative field, MATH 441 exam 1, applied ODE