2.1 Separable Equations
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)dx
Integrating 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=0Plus the trivial solution y=0.
2.2 Linear First-Order Equations
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)=μQ
Integrating: μy=∫μQdx+C. Solving for y gives the result. ■
2.3 Worked Example: Linear Equation
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. ■
2.4 Exact Equations
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∂Ψ=NAnd the solution is Ψ(x,y)=C.
Theorem 2.2. If M and N have continuous partial derivatives on a connected domain DThen Mdx+Ndy=0 is exact if and only if My=Nx.
Proof. If exact, M=Ψx and N=ΨySo My=Ψxy=Ψyx=Nx by Clairaut. Conversely, if My=NxDefine Ψ(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). ■
2.5 Worked Example: Exact Equation
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. ■
2.6 Integrating Factors for Non-Exact Equations
If My=NxOne can sometimes find an integrating factor μ(x,y) such that (μM)y=(μN)x.
Case 1: If NMy−Nx depends only on xThen μ(x)=e∫NMy−Nxdx.
Case 2: If MNx−My depends only on yThen μ(y)=e∫MNx−Mydy.
2.7 Bernoulli Equations
A Bernoulli equation has the form
dxdy+P(x)y=Q(x)yn
Where 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=2So set v=y−1. Then v′=−y−2y′And the equation becomes v′−v=−ex. Integrating factor: e−x. So (ve−x)′=−1Giving ve−x=−x+C, v=−xex+Cex And y=1/(C−x)ex.
2.8 Existence and Uniqueness
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.
2.9 Substitution Methods
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.
2.10 Homogeneous Equations
An ODE of the form dxdy=F(xy) is called homogeneous (not to be Confused with the linearity sense). The substitution v=y/xI.e., y=vxGives y′=v+xv′ So the equation becomes:
v+xdxdv=F(v)⟹xdxdv=F(v)−v
This is separable: F(v)−vdv=xdx.
2.11 Worked Example: Homogeneous Equation
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′=v1Giving vdv=xdx.
Integrating: 2v2=ln∣x∣+C. Since v=y/x:
2x2y2=ln∣x∣+C⟹y2=2x2(ln∣x∣+C). ■
2.12 Riccati Equations
A Riccati equation has the form
dxdy=q0(x)+q1(x)y+q2(x)y2
If 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−q2
Example. 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+CAnd y=x+C−x1.
2.13 Worked Example: Newton’s Law of Cooling
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=70So 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. ■
2.14 Worked Example: Mixing Problem
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. ■
2.15 Worked Example: Integrating Factor
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=NxNot exact.
Check Case 1: NMy−Nx=x2+2xyx+2y=x(x+2y)x+2y=x1.
This depends only on xSo μ(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. ■
2.16 Orthogonal Trajectories
Given a one-parameter family of curves F(x,y,C)=0The 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+COr 2x2+y2=C. These are ellipses.
2.17 Common Pitfalls for First-Order ODEs
:::caution Common Pitfall When separating variables, dividing by h(y) can lose solutions where h(y)=0. Always check whether h(y)=0 yields valid solutions before dividing.
::: :::caution Common Pitfall Not every first-order ODE falls into a standard category. Equations like y′=ex2+sin(y2) cannot be solved by elementary methods and require numerical Techniques.
:::