A first-order ODE dxdy=f(x,y) is separable if f(x,y)=g(x)h(y).
dxdy=g(x)h(y)⟹h(y)dy=g(x)dxIntegrating both sides: ∫h(y)dy=∫g(x)dx+C.
Example. Solve dxdy=xy.
Separating: ydy=xdx. Integrating: ln∣y∣=2x2+C. Thus y=Cex2/2 where C=0 Plus the trivial solution y=0.
A linear first-order ODE has the form
dxdy+P(x)y=Q(x)Theorem 2.1 (Integrating Factor). The solution is
y(x)=e−∫P(x)dx(∫Q(x)e∫P(x)dxdx+C)Proof. Multiply both sides by μ(x)=e∫P(x)dx:
dxd(μy)=μdxdy+μPy=μdxdy+μ"y=μ(dxdy+Py)=μQIntegrating: μy=∫μQdx+C. Solving for y gives the result. ■
Problem. Solve y′+x2y=x2 for x>0.
Solution. P(x)=2/x, Q(x)=x2.
μ(x)=e∫2/xdx=e2lnx=x2.
y=x−2(∫x2⋅x2dx+C)=x−2(5x5+C)=5x3+x2C. ■
The ODE M(x,y)dx+N(x,y)dy=0 is exact if ∂y∂M=∂x∂N.
When exact, there exists Ψ(x,y) such that ∂x∂Ψ=M and ∂y∂Ψ=N And the solution is Ψ(x,y)=C.
Theorem 2.2. If M and N have continuous partial derivatives on a connected domain D Then Mdx+Ndy=0 is exact if and only if My=Nx.
Proof. If exact, M=Ψx and N=Ψy So My=Ψxy=Ψyx=Nx by Clairaut. Conversely, if My=Nx Define Ψ(x,y)=∫x0xM(t,y)dt+∫y0yN(x0,s)ds. Then Ψx=M(x,y) and Ψy=∫x0xMy(t,y)dt+N(x0,y)=∫x0xNx(t,y)dt+N(x0,y)=N(x,y)−N(x0,y)+N(x0,y)=N(x,y). ■
Problem. Solve (2xy+3)dx+(x2−1)dy=0.
Solution. M=2xy+3, N=x2−1. Check: My=2x=Nx. Exact.
Ψx=2xy+3⟹Ψ=x2y+3x+h(y).
Ψy=x2+h′(y)=x2−1⟹h′(y)=−1⟹h(y)=−y.
Solution: x2y+3x−y=C. ■
If My=Nx One can sometimes find an integrating factor μ(x,y) such that (μM)y=(μN)x.
Case 1: If NMy−Nx depends only on x Then μ(x)=e∫NMy−Nxdx.
Case 2: If MNx−My depends only on y Then μ(y)=e∫MNx−Mydy.
A Bernoulli equation has the form
dxdy+P(x)y=Q(x)ynWhere n=0,1. The substitution v=y1−n transforms it into a linear equation:
dxdv+(1−n)P(x)v=(1−n)Q(x)Example. Solve y′+y=y2ex.
Here n=2 So set v=y−1. Then v′=−y−2y′ And the equation becomes v′−v=−ex. Integrating factor: e−x. So (ve−x)′=−1 Giving ve−x=−x+C, v=−xex+Cex And y=1/(C−x)ex.
Theorem 2.3 (Picard-Lindelöf). If f and ∂f/∂y are continuous on a rectangle Containing (x0,y0) Then the IVP y′=f(x,y), y(x0)=y0 has a unique solution in some Neighbourhood of x0.
Several substitutions reduce specific equations to separable or linear form:
- Homogeneous equations: y′=f(y/x). Set v=y/x.
- Equations of the form y′=f(ax+by+c): set v=ax+by+c.
An ODE of the form dxdy=F(xy) is called homogeneous (not to be Confused with the linearity sense). The substitution v=y/x I.e., y=vx Gives y′=v+xv′ So the equation becomes:
v+xdxdv=F(v)⟹xdxdv=F(v)−vThis is separable: F(v)−vdv=xdx.
Problem. Solve y′=xyx2+y2.
Solution
Solution. Rewrite as y′=y/x1+(y/x)2. This is homogeneous with F(v)=v1+v2.
Set y=vx: v+xv′=v1+v2=v+v1.
So xv′=v1 Giving vdv=xdx.
Integrating: 2v2=ln∣x∣+C. Since v=y/x:
2x2y2=ln∣x∣+C⟹y2=2x2(ln∣x∣+C). ■
A Riccati equation has the form
dxdy=q0(x)+q1(x)y+q2(x)y2If a particular solution y1(x) is known, the substitution y=y1+v1 reduces the Riccati equation to a linear first-order equation in v:
dxdv=−(q1+2q2y1)v−q2Example. Solve y′=1+x2−2xy+y2 given that y1=x is a particular solution.
Substituting y=x+1/v: y′=1−v′/v2. The equation becomes
1−v′/v2=1+x2−2x(x+1/v)+(x+1/v)2
1−v′/v2=1+x2−2x2−2x/v+x2+2x/v+1/v2
1−v′/v2=1+1/v2
−v′/v2=1/v2⟹v′=−1
So v=−x+C And y=x+C−x1.
Problem. A body at 90°C is placed in a room at 20°C. After 10 Minutes, its temperature is 60°C. When will it reach 30°C?
Solution
Solution. Newton’s law of cooling: dtdT=−k(T−20), T(0)=90.
This is separable: T−20dT=−kdt.
ln(T−20)=−kt+C⟹T=20+Ce−kt.
T(0)=90⟹C=70 So T=20+70e−kt.
T(10)=60⟹60=20+70e−10k⟹e−10k=4/7.
k=−101ln(4/7)=10ln(7/4).
For T=30: 30=20+70e−kt⟹e−kt=1/7⟹t=kln7=ln(7/4)10ln7.
Numerically: t≈0.559610⋅1.946≈34.8 minutes. ■
Problem. A tank contains 100 L of brine with 20 kg of salt. Fresh water enters at 3 L/min and The mixture leaves at 3 L/min. Find the amount of salt after 30 minutes.
Solution
Solution. Let Q(t) be the amount of salt (kg) at time t (min).
Rate of change: dtdQ=ratein−rateout=0−3⋅100Q.
dtdQ=−1003Q, Q(0)=20.
This is separable: QdQ=−1003dt.
lnQ=−1003t+C⟹Q=Ce−3t/100.
Q(0)=20⟹Q=20e−3t/100.
At t=30: Q(30)=20e−0.9≈20⋅0.4066≈8.13 kg. ■
Problem. Solve (3xy+2y2)dx+(x2+2xy)dy=0.
Solution
Solution. M=3xy+2y2, N=x2+2xy.
My=3x+4y, Nx=2x+2y. Since My=Nx Not exact.
Check Case 1: NMy−Nx=x2+2xyx+2y=x(x+2y)x+2y=x1.
This depends only on x So μ(x)=e∫1/xdx=x.
Multiply: (3x2y+2xy2)dx+(x3+2x2y)dy=0.
M~=3x2y+2xy2, N~=x3+2x2y.
M~y=3x2+4xy=N~x. Now exact.
Ψx=3x2y+2xy2⟹Ψ=x3y+x2y2+h(y).
Ψy=x3+2x2y+h′(y)=x3+2x2y⟹h′(y)=0⟹h(y)=0.
Solution: x3y+x2y2=C. ■
Given a one-parameter family of curves F(x,y,C)=0 The orthogonal trajectories are curves that intersect every member of the family at right angles. To find them:
- Find the differential equation dxdy=f(x,y) of the given family.
- Replace dxdy with −dydx (equivalently, negate the slope).
- Solve the new ODE.
Example. Find the orthogonal trajectories of y=Cx2.
dxdy=2Cx=x2y.
Orthogonal trajectories satisfy dxdy=−2yx.
Separating: 2ydy=−xdx. Integrating: y2=−2x2+C Or 2x2+y2=C. These are ellipses.
A first-order ODE dxdy=f(x,y) specifies the rate of change of y at every point (x,y). The solution is a curve that is everywhere tangent to the direction field defined by f.
Separable equations dxdy=g(x)h(y) describe systems where the rate of change factors into an x-dependent part and a y-dependent part. For example, exponential growth dtdP=rP has rate proportional to the current value: g(t)=r, h(P)=P.
Linear equations dxdy+P(x)y=Q(x) describe systems with a restoring or forcing term. The homogeneous part y′+P(x)y=0 has solution y=Ce−∫Pdx, which decays or grows depending on the sign of P. The particular solution captures the effect of the forcing Q.
Exact equations Mdx+Ndy=0 with My=Nx arise from conservative systems: there exists a potential function Ψ(x,y) such that the ODE becomes dΨ=0, giving Ψ=const as the solution. This is the same as saying the force field (M,N) is the gradient of a potential.
Newton’s law of cooling dtdT=−k(T−Tenv) is separable and describes exponential approach to equilibrium. The solution T(t)=Tenv+(T0−Tenv)e−kt shows that the temperature difference decays exponentially, with time constant 1/k.
Mixing problems model the concentration of a substance in a tank. The rate of change is rate in−rate out. If fresh fluid enters, the concentration decreases exponentially; if concentrated fluid enters, the concentration increases toward the input concentration.
Problem. Solve y′+xy=y2x3 for x>0.
Solution
This is a Bernoulli equation with n=2, P(x)=1/x, Q(x)=x3. Set v=y1−2=y−1. Then v′=−y−2y′, and the equation becomes
v′−xv=−x3This is linear in v. The integrating factor is μ(x)=e∫−1/xdx=e−lnx=1/x.
dxd(xv)=−x2Integrating: xv=−3x3+C, so v=−3x4+Cx.
Since v=y−1: y=Cx−x4/31=3Cx−x43.
■
Problem. A population grows according to the logistic equation dtdP=rP(1−KP), where r is the growth rate and K is the carrying capacity. Solve and interpret.
Solution
This is separable: P(1−P/K)dP=rdt. Using partial fractions:
P(1−P/K)1=P1+1−P/K1/K=P1+K−P1
Integrating: ln∣P∣−ln∣K−P∣=rt+C, so K−PP=Aert.
Solving for P: P=1+Be−rtK where B=K/P0−1 and P0=P(0).
Interpretation: As t→∞, P(t)→K (the carrying capacity). The population starts with exponential growth, transitions to logistic growth as P approaches K, and saturates at K. The inflection point occurs at P=K/2, where the growth rate is maximal. ■