A first-order differential equation is said to be linear if the dependent variable (usually y) and its derivative dxdy appear only in the first degree and are not multiplied together.
The standard form of a first-order linear differential equation is:
dxdy+P(x)y=Q(x)
Here, P(x) and Q(x) are constants or functions of x only.
A few important observations:
dxdy+3y=ex is linear.
dxdy+y2=x is not linear because y is squared.
ydxdy=x is not linear because y and dxdy are multiplied.
So in a linear differential equation, both y and dxdy must occur only to the first power, and the coefficient of y must depend only on x.
The Integrating Factor (I.F.)
To solve a linear differential equation, we multiply the whole equation by a special function called the Integrating Factor (I.F.).
For the equation
dxdy+P(x)y=Q(x),
the Integrating Factor is
I.F.=e∫P(x)dx.
Why is this useful? Because after multiplying the equation by the I.F., the left-hand side becomes the exact derivative of the product y⋅I.F.:
I.F.⋅dxdy+P(x)⋅I.F.⋅y=dxd(y⋅I.F.).
This is the key idea behind the method.
Important logarithm rule
When simplifying the I.F., expressions of the form
elnf(x)
reduce to
f(x),
provided f(x)>0; in applied textbook work we often write the simplified algebraic form directly. For example,
e∫x2dx=e2ln∣x∣=eln(x2)=x2.
The General Solution
Once the Integrating Factor is found, multiply the equation
dxdy+P(x)y=Q(x)
by the I.F. Then the equation becomes
dxd(y⋅I.F.)=Q(x)⋅I.F..
Integrating both sides with respect to x, we get
y⋅(I.F.)=∫Q(x)⋅(I.F.)dx+C.
This is the standard formula for the general solution.
Step-by-step algorithm
Write the equation in the form dxdy+P(x)y=Q(x).
Identify P(x) and Q(x).
Find the Integrating Factor:
I.F.=e∫P(x)dx.
Use
y⋅(I.F.)=∫Q(x)⋅(I.F.)dx+C.
Simplify the result and, if needed, solve explicitly for y.
This method works only after the equation has been reduced to standard linear form.
The Alternate Form (Linear in x)
Sometimes the given differential equation is not linear in y, but it is linear in x if we treat x as the dependent variable and y as the independent variable.
Then the standard form becomes
dydx+P1(y)x=Q1(y).
Here, P1(y) and Q1(y) are constants or functions of y only.
The method is exactly analogous:
Integrating Factor:
I.F.=e∫P1(y)dy
General solution:
x⋅(I.F.)=∫Q1(y)⋅(I.F.)dy+C
So the core idea remains the same; only the roles of x and y are interchanged.
Example 1: Standard Linear Equation
Solve the differential equation: dxdy+2y=e3x.
Solution:
Step 1: Compare with the standard form
dxdy+Py=Q.
Here,
P=2,Q=e3x.
Step 2: Find the Integrating Factor.
I.F.=e∫2dx=e2x.
Step 3: Multiply the whole equation by e2x.
e2xdxdy+2e2xy=e5x.
The left-hand side is
dxd(ye2x).
So,
dxd(ye2x)=e5x.
Step 4: Integrate both sides.
ye2x=∫e5xdx+C=5e5x+C.
Step 5: Solve for y.
y=5e2xe5x+Ce−2x=5e3x+Ce−2x.
Answer:y=5e3x+Ce−2x
Example 2: Normalizing the Equation
Solve: xdxdy+2y=x2(x=0).
Solution:
Step 1: The coefficient of dxdy must be 1. Divide the entire equation by x:
dxdy+x2y=x.
So,
P=x2,Q=x.
Step 2: Find the Integrating Factor.
I.F.=e∫x2dx=e2ln∣x∣.
Since e2ln∣x∣=x2, we take
I.F.=x2.
Step 3: Multiply the equation by x2:
x2dxdy+2xy=x3.
The left side is
dxd(x2y).
Hence,
dxd(x2y)=x3.
Step 4: Integrate:
x2y=∫x3dx+C=4x4+C.
Step 5: Explicit form, if required:
y=4x2+x2C.
Answer:x2y=4x4+C
Example 3: Trigonometric Linear Equation
Solve: dxdy+ysecx=tanx.
Solution:
Step 1: Identify
P=secx,Q=tanx.
Step 2: Find the Integrating Factor.
We know
∫secxdx=ln∣secx+tanx∣.
Therefore,
I.F.=eln∣secx+tanx∣=secx+tanx.
Step 3: Apply the solution formula:
y(secx+tanx)=∫tanx(secx+tanx)dx+C.
Expand the integrand:
=∫(secxtanx+tan2x)dx+C.
Use the identity
tan2x=sec2x−1.
Then,
∫(secxtanx+sec2x−1)dx.
Step 4: Integrate term by term:
∫secxtanxdx=secx,∫sec2xdx=tanx,∫1dx=x.
So,
y(secx+tanx)=secx+tanx−x+C.
Answer:y(secx+tanx)=secx+tanx−x+C
Example 4: Initial Value Problem (IVP)
Find the particular solution of dxdy+ycotx=2x+x2cotx, given that y=0 when x=2π.
Solution:
Step 1: Identify
P=cotx,Q=2x+x2cotx.
Step 2: Find the Integrating Factor.
I.F.=e∫cotxdx=eln∣sinx∣=sinx.
Step 3: Multiply through by sinx:
ysinx=∫(2x+x2cotx)sinxdx+C.
Since cotx⋅sinx=cosx, this becomes
ysinx=∫(2xsinx+x2cosx)dx+C.
Step 4: Recognize the integrand as an exact derivative.
dxd(x2sinx)=2xsinx+x2cosx.
Therefore,
∫(2xsinx+x2cosx)dx=x2sinx.
So the general solution is
ysinx=x2sinx+C.
Step 5: Use the condition y=0 when x=2π.
0⋅sin(2π)=(2π)2sin(2π)+C0=4π2+CC=−4π2.
Step 6: Substitute back:
ysinx=x2sinx−4π2.
Answer:ysinx=x2sinx−4π2
Example 5: Linear in x (Alternate Form)
Solve: (y2+1)dydx+x=etan−1y.
Solution:
Step 1: Divide by (y2+1) to get standard linear form in x:
dydx+y2+11x=y2+1etan−1y.
Thus,
P1=y2+11,Q1=y2+1etan−1y.
Step 2: Find the Integrating Factor with respect to y:
I.F.=e∫y2+11dy=etan−1y.
Step 3: Apply the solution formula:
xetan−1y=∫y2+1etan−1y⋅etan−1ydy+Cxetan−1y=∫y2+1e2tan−1ydy+C.
Step 4: Use substitution.
Let
t=tan−1y⟹dt=y2+11dy.
Then the integral becomes
∫e2tdt=2e2t=2e2tan−1y.
Step 5: Final solution:
xetan−1y=21e2tan−1y+C.
Answer:xetan−1y=21e2tan−1y+C
Example 6: Finding the Integrating Factor
Find the Integrating Factor of the differential equation: xlnxdxdy+y=2lnx.
Solution:
Step 1: Divide by xlnx to normalize the equation:
dxdy+xlnx1y=x2.
So,
P(x)=xlnx1.
Step 2: Compute the Integrating Factor:
I.F.=e∫xlnx1dx.
Let
t=lnx⟹dt=x1dx.
Then
∫xlnx1dx=∫t1dt=ln∣t∣=ln(lnx).
Hence,
I.F.=eln(lnx)=lnx.
Answer: I.F. =lnx
Example 7: Involving Inverse Trigonometry
Solve: (1−x2)dxdy−xy=1.
Solution:
Step 1: Divide by (1−x2):
dxdy−1−x2xy=1−x21.
So,
P=−1−x2x,Q=1−x21.
Step 2: Find the Integrating Factor.
∫Pdx=∫−1−x2xdx.
Let
t=1−x2⟹dt=−2xdx.
Then
∫−1−x2xdx=21∫tdt=21ln∣t∣=21ln∣1−x2∣.
Hence,
I.F.=e21ln∣1−x2∣=∣1−x2∣.
In the standard textbook interval where 1−x2>0, this is written as
I.F.=1−x2.
Step 3: Apply the formula:
y1−x2=∫1−x211−x2dx+Cy1−x2=∫1−x21dx+C.
Step 4: Integrate:
∫1−x21dx=sin−1x.
So,
y1−x2=sin−1x+C.
Answer:y1−x2=sin−1x+C
Example 8: A Tricky Substitution Leading to an LDE
Solve: dxdy+y=y2ex.(This is a Bernoulli differential equation, reducible to a Linear Differential Equation.)
Solution:
Step 1: Divide the equation by y2:
y−2dxdy+y−1=ex.
Step 2: Use the substitution
v=y−1.
Then
dxdv=−y−2dxdy⟹y−2dxdy=−dxdv.
Substitute into the equation:
−dxdv+v=ex.
Multiply by −1:
dxdv−v=−ex.
This is linear in v.
Step 3: Identify
P=−1,Q=−ex.
So,
I.F.=e∫−1dx=e−x.
Step 4: Apply the formula:
ve−x=∫(−ex)(e−x)dx+C=∫(−1)dx+Cve−x=−x+C.
Step 5: Replace v=1/y:
ye−x=C−x.
Multiply by y:
e−x=y(C−x).
Answer:y(C−x)=e−x
Example 9: Complex Integration
Solve: xdxdy+y=xcosx+sinx.
Solution:
Step 1: Divide by x:
dxdy+x1y=cosx+xsinx.
Thus,
P=x1,Q=cosx+xsinx.
Step 2: Find the Integrating Factor:
I.F.=e∫x1dx=eln∣x∣=x.
Step 3: Apply the formula:
xy=∫(cosx+xsinx)xdx+Cxy=∫(xcosx+sinx)dx+C.
Step 4: Recognize the integrand:
dxd(xsinx)=xcosx+sinx.
So,
xy=xsinx+C.
Answer:xy=xsinx+C
Example 10: Recognizing Alternate Form
Solve: (x+2y3)dxdy=y.
Solution:
Step 1: Solving directly for dxdy does not give a linear equation in y. So invert the derivative:
dydx=yx+2y3=yx+2y2.
Step 2: Rearrange into linear form in x:
dydx−y1x=2y2.
So,
P1=−y1,Q1=2y2.
Step 3: Find the Integrating Factor with respect to y:
I.F.=e∫−y1dy=e−ln∣y∣=∣y∣1.
In the standard working form, this is written as
I.F.=y1.
Step 4: Apply the formula:
x⋅y1=∫2y2⋅y1dy+Cyx=∫2ydy+C=y2+C.
Step 5: Multiply by y:
x=y3+Cy.
Answer:x=y3+Cy
Ready to test your knowledge?
Take a quick interactive quiz on this topic —
free, works without login.