Solving first-order differential equations using separable variables, integrating factors, and linear methods.
What it is
A first-order ordinary differential equation relates an independent variable x, an unknown function y(x), and its first derivative y′(x):
F(x,y,y′)=0⟹dxdy=f(x,y)
Depending on the algebraic structure of f(x,y), they fall into several analytically solvable categories:
Separable: The derivative factors into independent single-variable functions:
dxdy=g(x)h(y)⟹∫h(y)dy=∫g(x)dx+C
First-order linear: Both y and y′ appear linearly:
dxdy+P(x)y=Q(x)
Solved by multiplying through by the canonical integrating factor μ(x)=exp(∫P(x)dx).
Exact equations: The differential form M(x,y)dx+N(x,y)dy=0 is the total exterior derivative of a scalar potential Φ(x,y):
dΦ=∂x∂Φdx+∂y∂Φdy=0⟺∂y∂M=∂x∂N
The implicit solution family consists of level contours Φ(x,y)=C.
Homogeneous of degree zero: Satisfies f(λx,λy)=f(x,y), reduced to separable form via substitution u=y/x.
Bernoulli equations: Nonlinear equations y′+P(x)y=Q(x)yn (n=0,1), transformed into linear ODEs via substitution u=y1−n.
Why it appears in physics
Any relaxation, charging, or dissipation process where the rate of change is proportional to current state level is governed by a first-order ODE:
Capacitor charging/discharging (RC circuit): By Kirchhoff's loop rule, Rdtdq+C1q=V(t).
A first-order ODE defines a tangent vector field across every point in the (x,y) plane:
v(x,y)=(1f(x,y))
The Picard-Lindelöf theorem guarantees that away from singular branch points, exactly one integral curve passes through each point.
Integral curves cannot intersect or cross in the plane, behaving exactly like steady streamlines in a 2D incompressible laminar fluid flow.
Euler integrating factor:
If not exact, a multiplier μ(x,y) such that (μM)dx+(μN)dy=0 is exact satisfies:
M∂y∂μ−N∂x∂μ=μ(∂x∂N−∂y∂M)
Closed-form solution for first-order linear ODE:
y(x)=μ(x)1[∫μ(x)Q(x)dx+C],μ(x)=e∫P(x)dx
What the result means
Transient vs. steady-state decomposition: In stable systems with P(x)=a>0, the solution splits into an exponentially vanishing transient (Ce−at→0) and a forced steady-state response driven by Q(t).
Characteristic relaxation time τ: For first-order dynamics, τ=1/P sets the natural relaxation timescale: at t=τ, 63.2% of the step response is accomplished; at t=5τ, steady state is practically reached (99.3%).
Smooth foliation: The parameter C sweeps a smooth 1-parameter family of non-intersecting trajectories across state space.
When not to use it
Inertial oscillatory systems: Autonomous 1D first-order ODEs are strictly monotonic; they cannot exhibit free oscillations or closed orbits without an explicit time-dependent periodic driver. True harmonic resonance requires second order.
Ignoring equilibrium roots: When dividing by h(y) during separation of variables, omitting roots h(y∗)=0 discards constant stationary states.
Treating Bernoulli equations as linear: Forgetting to substitute u=y1−n leads to invalid superposition.
Operational summary
Normalize to standard form: dxdy=f(x,y) or Mdx+Ndy=0.
Check separability: Can you factor f(x,y)=g(x)h(y)? If yes, separate and integrate.
Check linearity: Does it fit y′+P(x)y=Q(x)? If yes, compute μ(x)=e∫Pdx and integrate.
Check exactness: Does ∂yM=∂xN? If yes, integrate Mdx and determine h(y).
If inexact, test for integrating factors depending on x only: N∂yM−∂xN=f(x).
For Bernoulli forms y′+Py=Qyn, linearize via u=y1−n.
Procedure: Systematic Solution of First-Order ODEs
Before calculating
Isolate the derivative: Rewrite in standard form dxdy=f(x,y) or symmetric differential form M(x,y)dx+N(x,y)dy=0.
Confirm degree: Ensure derivatives are not raised to fractional or higher powers like (y′)2.
Inspect denominator roots: If dividing by any function of y, record zero roots beforehand (potential stationary equilibrium states).
Step 1: Identify the mathematical object
Classify the ODE following the decision hierarchy:
Separable?dxdy=g(x)h(y).
Linear?dxdy+P(x)y=Q(x).
Exact?Mdx+Ndy=0 with ∂y∂M=∂x∂N.
Homogeneous?M(λx,λy)=λkM and N(λx,λy)=λkN.
Bernoulli?dxdy+P(x)y=Q(x)yn.
Step 2: Choose the operation
If Separable:
Rearrange: h(y)dy=g(x)dx and integrate: ∫h(y)dy=∫g(x)dx+C.
Multiply the equation by μ(x), combining the left side into dxd[μ(x)y].
Integrate both sides: μ(x)y(x)=∫μ(x)Q(x)dx+C.
Isolate y(x)=μ(x)1∫μ(x)Q(x)dx+μ(x)C.
If Exact:
Integrate M with respect to x: Φ(x,y)=∫M(x,y)dx+g(y).
Differentiate with respect to y and equate to N: ∂y∂Φ=N(x,y).
Integrate g′(y) to find g(y).
Write the implicit solution: Φ(x,y)=C.
If Bernoulli (y′+Py=Qyn):
Divide by yn: y−ny′+Py1−n=Q.
Substitute u=y1−n⟹u′=(1−n)y−ny′.
Solve the resulting linear ODE: 1−n1u′+P(x)u=Q(x).
Step 3: Conserve units and signs
In μ(x)=e∫P(x)dx, ensure the exponent is dimensionless. If x is in seconds, P(x) must be in s−1.
In electrical circuits, preserve correct polarity across resistors and power sources.
Step 4: Calculate
Evaluate primitives using standard calculus rules.
Embed the integration constant +C immediately upon performing indefinite quadratures.
Step 5: Interpret the result
Apply the initial condition y(x0)=y0 to fix C.
Analyze asymptotic stability (t→∞): does the transient vanish while tracking the steady state?
Confirm dimensional consistency across all terms.
Self-check checklist
Did I test exactness by calculating both ∂yM and ∂xN?
Did I insert +C prior to isolating y?
Did I check whether h(y)=0 yielded singular solutions?
Is the integrating factor exponent dimensionless?
Does substituting the solution back into the ODE yield an identity?
Worked Examples: First-Order Equations
Step-by-step guided example
Problem
A series electrical circuit consists of a resistor R=50Ω, an inductor L=2.5H, and a DC voltage source V0=100V. At initial instant t=0, the switch is closed with zero initial current: i(0)=0A.
Formulate the differential equation for current i(t).
Solve the ODE using the integrating factor technique.
Determine the characteristic time constant τ, steady-state current i∞, and the time required to reach 90% of full steady current.
Detailed solution
Step 1: Governing ODE formulation
Applying Kirchhoff's voltage law around the loop:
Ldtdi+Ri=V0⟹dtdi+LRi=LV0
Substituting numerical values:
dtdi+2.550i=2.5100⟹dtdi+20i=40
This is a first-order non-homogeneous linear ODE with P(t)=20s−1 and Q(t)=40A/s.
Step 2: Integrating factor solution
The integrating factor is:
μ(t)=exp(∫20dt)=e20t
Multiplying through:
e20tdtdi+20e20ti=40e20t⟹dtd(i(t)e20t)=40e20t
Integrating both sides:
i(t)e20t=∫40e20tdt=2040e20t+C=2e20t+C
Isolating i(t):
i(t)=2+Ce−20t
Step 3: Imposing the initial condition
At t=0, i(0)=0:
0=2+Ce0=2+C⟹C=−2A
The particular solution is:
i(t)=2(1−e−20t)A
Step 4: Physical parameter evaluation
Steady-state current: As t→∞, e−20t→0:
i∞=2A=RV0=50100=2A
Inductive time constant τ:
τ=RL=502.5=0.05s=50ms
(The rate constant matches 1/τ=20s−1).
Time to reach 90% of steady state (i=1.8A):
1.8=2(1−e−20t)⟹0.1=e−20t⟹t=20ln10≈0.1151s=115.1ms≈2.3τ
Inverse example
Problem
In a colloidal sedimentation experiment, the depth profile of particle concentration C(x) (x≥0) follows:
C(x)=1+kxC0C0
where C0 is the surface concentration at x=0 and k>0 is an agglomeration coefficient.
Demonstrate that this distribution satisfies a non-linear first-order ODE (Bernoulli / separable type) and derive that governing differential equation.
Detailed solution
Step 1: Differentiating the profile
Compute dxdC:
dxdC=dxd[C0(1+kxC0)−1]=−kC02(1+kxC0)−2
Step 2: Expressing in terms of state variable C
Observe that:
C(x)=1+kxC0C0⟹C2(x)=(1+kxC0)2C02
Substitute into the derivative expression:
dxdC=−k((1+kxC0)2C02)=−kC2
Step 3: Differential equation conclusion
The governing differential equation is:
dxdC+kC2=0
This is an autonomous separable ODE and a classic Bernoulli equation with power n=2, characteristic of second-order bimolecular coagulation kinetics.
Common Errors: First-Order Equations
Error 1: Forgetting to normalize before identifying P(x)
In a(x)y′+b(x)y=c(x), picking P(x)=b(x) without first dividing through by the leading coefficient a(x).
Correction: The integrating factor requires canonical unit leading coefficient:
y′+a(x)b(x)y=a(x)c(x)⟹P(x)=a(x)b(x)
Error 2: Leaving the integration constant outside the reciprocal multiplier
Writing y(x)=μ(x)∫μQdx+C instead of the correct factored form:
y(x)=μ(x)1[∫μ(x)Q(x)dx+C]=yp(x)+Cμ(x)−1
Consequence: The constant C must decay along with the transient solution e−∫Pdx.
Error 3: Inverting cross-derivatives when testing exactness
In Mdx+Ndy=0, evaluating ∂xM and ∂yN rather than the genuine mixed second partials ∂yM and ∂xN.
Mnemonic rule: M accompanies dx, so test its sensitivity to the conjugate variable: ∂yM.
Error 4: Discarding singular equilibrium roots during variable separation
In dxdy=y(1−y), dividing through by y(1−y) without checking that y(t)=0 and y(t)=1 satisfy the ODE identically for all t.
Error 5: Neglecting the chain rule factor in Bernoulli transformations
Setting u=y1−n in y′+Py=Qyn but dropping the factor (1−n) when replacing y−ny′:
u′=(1−n)y−ny′⟹y−ny′=1−n1u′
Quick control rule
To verify your integrating factor μ(x): compute dxd(μ(x)y)=μy′+μ′y. It must equal μ(x)(y′+P(x)y) identically.
Physical Applications: First-Order Equations
1. Timing circuits and passive RC low-pass filters
Capacitor charging through resistance underlies 555-timer relaxation oscillators, passive low-pass filters, and input anti-aliasing circuitry:
dtdVC+RC1VC=RCVin(t)
The −3dB cutoff frequency fc=2πRC1 filters out high-frequency electromagnetic interference in sensor telemetry and audio electronics.
2. Sensor thermal response and dynamic compensation
A thermocouple or RTD sensor plunged into a fluid does not respond instantaneously; it tracks according to:
dtdTs+mcphATs=mcphATf(t)
where τ=hAmcp is the thermal response time constant. Correcting for this first-order lag is crucial in gas turbine pyrometry and fast-response environmental sensing.
3. Sedimentation dynamics and biological ultracentrifugation
The migration of macromolecules and organelles subjected to centrifugal fields obeys:
mdtdv=mω2r(1−ρparticleρfluid)−6πηRhv
Rapidly reaching terminal velocity (dtdv≈0), sedimenting velocity scales with the Svedberg unit (S), allowing separation of DNA, RNA, and protein complexes.
4. Pharmacokinetics and single-compartment clearance
Plasma concentration of a drug under continuous IV infusion at rate R0 with first-order hepatic/renal elimination satisfies:
VddtdC=R0−keVdC⟹dtdC+keC=VdR0
where Vd is distribution volume and ke elimination clearance. Solving this ODE sets steady-state therapeutic dosing regimes in clinical pharmacology.
5. Radiative transfer and optical depth in astrophysics
Radiation transfer through stellar atmospheres or molecular clouds without emission follows:
dsdIν=−κνρIν
where κν is spectral opacity. Integrating yields Iν(s)=Iν,0e−τν, defining optical depthτν=∫κνρds, essential for determining exoplanet atmospheric compositions via transmission spectroscopy.
Interdisciplinary connection
First-order ODEs drive continuous stirred-tank reactors (CSTR) in chemical engineering, information cascade dynamics across social networks, and exponential skill decay/memory retention models in cognitive science.
Guided Practice: First-Order Equations
Exercise 1: Free fall with quadratic aerodynamic drag
A skydiver of mass m=80kg falls under gravity (g=9.8m/s2) against air resistance proportional to velocity squared: Fd=−cv2 with c=0.2kg/m.
Formulate the separable ODE for v(t) starting from rest v(0)=0.
Compute the terminal velocity vL.
Solve for v(t) analytically by separation of variables.
Separation of variables:
vL2−v2dv=mcdt
Using partial fractions vL2−v21=2vL1(vL−v1+vL+v1):
2vL1lnvL−vvL+v=mct+C1
With v(0)=0⟹C1=0:
v(t)=vLtanh(vLgt)=62.61tanh(0.1565t)m/s
Exercise 2: Charging a capacitor with linearly ramping voltage (Linear ODE)
An RC circuit with R=1000Ω and C=10μF=10−5F is powered by a ramp generator: V(t)=10tV.
Given uncharged initial state q(0)=0C: