Login

Concepts

Read through concept notes with worked explanations and diagrams, chapter by chapter.

Concept 04 / 06Differential Equations

Linear First-Order Equations, the Integrating Factor and Bernoulli's Equation

The standard form dy/dx + P(x) y = Q(x), deriving the integrating factor e^(integral P dx) from the product rule, the solution formula, linear equations in x, and Bernoulli's equation reduced to linear form.

Figure 1
A first-order DE is linear in yy if it can be written as dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)y = Q(x), where PP and QQ depend only on xx. 'Linear' means yy and y′y' appear only to the first power and are not multiplied together or inside other functions. The integrating factor. Multiply both sides by a function μ(x)\mu(x) chosen so that the left side becomes the derivative of a product: we want μy′+μPy=(μy)′=μy′+μ′y\mu y' + \mu Py = (\mu y)' = \mu y' + \mu'y. This requires μ′=μP\mu' = \mu P, whose solution is μ=e∫P dx\mu = e^{\int P\,dx} (the integrating factor, IF). Then (μy)′=μQ(\mu y)' = \mu Q, and integrating gives y⋅IF=∫Q⋅IF dx+Cy \cdot \text{IF} = \int Q \cdot \text{IF}\,dx + C. No constant is needed when computing the IF itself, since any one integrating factor works. A useful identity: eln⁡f(x)=f(x)e^{\ln f(x)} = f(x), so if ∫P dx\int P\,dx is a logarithm, the IF is an algebraic function. For example, P=2xP = \frac{2}{x} gives IF =x2= x^{2}; P=tan⁡xP = \tan x gives IF =sec⁡x= \sec x; P=−1xP = -\frac{1}{x} gives IF =1x= \frac{1}{x}. Always put the equation in standard form first: the coefficient of dydx\frac{dy}{dx} must be 11. For xdydx+2y=x2x\frac{dy}{dx} + 2y = x^{2}, divide by xx to get P=2xP = \frac{2}{x}, Q=xQ = x. Structure of the solution. The general solution is a particular solution plus CC times the solution of the homogeneous equation y′+Py=0y' + Py = 0, which is Ce−∫PCe^{-\int P}. The figure shows y′+y=xy' + y = x: every solution is x−1+Ce−xx - 1 + Ce^{-x}, and they all converge to the particular solution y=x−1y = x - 1 as xx grows, because the homogeneous part decays. Linear in xx. Sometimes the equation is linear when xx is treated as the dependent variable: dxdy+P(y)x=Q(y)\frac{dx}{dy} + P(y)x = Q(y). Then the IF is e∫P dye^{\int P\,dy} and x⋅IF=∫Q⋅IF dy+Cx \cdot \text{IF} = \int Q \cdot \text{IF}\,dy + C. A sign that this is needed: dydx=1x+y2\frac{dy}{dx} = \frac{1}{x + y^{2}}, which is not linear in yy but becomes dxdy−x=y2\frac{dx}{dy} - x = y^{2} when inverted. Bernoulli's equation: dydx+P(x)y=Q(x)yn\frac{dy}{dx} + P(x)y = Q(x)y^{n} with n≠0,1n \neq 0, 1. Divide by yny^{n}: y−ny′+Py1−n=Qy^{-n}y' + Py^{1-n} = Q. Substitute v=y1−nv = y^{1-n}, so v′=(1−n)y−ny′v' = (1 - n)y^{-n}y'. The equation becomes linear in vv: dvdx+(1−n)Pv=(1−n)Q\frac{dv}{dx} + (1 - n)Pv = (1 - n)Q. Solve with an integrating factor, then replace vv by y1−ny^{1-n}. The constant solution y=0y = 0 (for n>0n > 0) should be noted separately. Other substitutions producing linear equations: if the equation has the form f′(y)dydx+Pf(y)=Qf'(y)\frac{dy}{dx} + Pf(y) = Q, put v=f(y)v = f(y). For example, sec⁡2ydydx+xtan⁡y=x3\sec^{2}y\frac{dy}{dx} + x\tan y = x^{3} becomes linear in v=tan⁡yv = \tan y. Key Takeaways: - Standard form y′+Py=Qy' + Py = Q; IF =e∫P dx= e^{\int P\,dx}. - Solution: y⋅IF=∫Q⋅IF dx+Cy \cdot \text{IF} = \int Q \cdot \text{IF}\,dx + C. - eln⁡f=fe^{\ln f} = f: many integrating factors are algebraic. - If not linear in yy, check whether it is linear in xx. - Bernoulli: v=y1−nv = y^{1-n} gives v′+(1−n)Pv=(1−n)Qv' + (1 - n)Pv = (1 - n)Q. - f′(y)y′+Pf(y)=Qf'(y)y' + Pf(y) = Q: put v=f(y)v = f(y). - Pitfall: computing the IF before dividing by the coefficient of y′y'. Brain-Teaser 1: Solve xdydx+2y=x2x\frac{dy}{dx} + 2y = x^{2} with y(1)=1y(1) = 1. Solution: Standard form: y′+2xy=xy' + \frac{2}{x}y = x. IF =e2ln⁡x=x2= e^{2\ln x} = x^{2}. So (x2y)′=x3(x^{2}y)' = x^{3} and x2y=x44+Cx^{2}y = \frac{x^{4}}{4} + C. The condition y(1)=1y(1) = 1 gives 1=14+C1 = \frac{1}{4} + C, C=34C = \frac{3}{4}. So y=x24+34x2y = \frac{x^{2}}{4} + \frac{3}{4x^{2}}. Checking the product structure (x2y)′(x^{2}y)' confirms the IF: x2y′+2xyx^{2}y' + 2xy is exactly xx times the original left side. Brain-Teaser 2: Solve dydx=y2yln⁡y+y−x\frac{dy}{dx} = \frac{y}{2y\ln y + y - x}. Solution: It is not linear in yy, but invert: dxdy=2yln⁡y+y−xy=2ln⁡y+1−xy\frac{dx}{dy} = \frac{2y\ln y + y - x}{y} = 2\ln y + 1 - \frac{x}{y}. So dxdy+1yx=2ln⁡y+1\frac{dx}{dy} + \frac{1}{y}x = 2\ln y + 1, linear in xx. IF =eln⁡y=y= e^{\ln y} = y. Then (xy)′=2yln⁡y+y(xy)' = 2y\ln y + y, and ∫(2yln⁡y+y)dy=y2ln⁡y−y22+y22=y2ln⁡y\int(2y\ln y + y)dy = y^{2}\ln y - \frac{y^{2}}{2} + \frac{y^{2}}{2} = y^{2}\ln y (by parts). So xy=y2ln⁡y+Cxy = y^{2}\ln y + C. Swapping the roles of the variables is the key step whenever yy appears in a complicated way but xx appears linearly. Brain-Teaser 3: Solve the Bernoulli equation dydx+yx=x2y3\frac{dy}{dx} + \frac{y}{x} = x^{2}y^{3}. Solution: Here n=3n = 3, so put v=y−2v = y^{-2}, v′=−2y−3y′v' = -2y^{-3}y'. Dividing the equation by y3y^{3}: y−3y′+1xy−2=x2y^{-3}y' + \frac{1}{x}y^{-2} = x^{2}, that is, −12v′+vx=x2-\frac{1}{2}v' + \frac{v}{x} = x^{2}, or v′−2xv=−2x2v' - \frac{2}{x}v = -2x^{2}. IF =e−2ln⁡x=x−2= e^{-2\ln x} = x^{-2}. Then (x−2v)′=−2(x^{-2}v)' = -2, so x−2v=−2x+Cx^{-2}v = -2x + C and v=−2x3+Cx2v = -2x^{3} + Cx^{2}. Therefore 1y2=Cx2−2x3\frac{1}{y^{2}} = Cx^{2} - 2x^{3}. The substitution v=y1−nv = y^{1-n} converts the non-linear equation into a linear one, after which the standard method applies.