Solution of Homogeneous and Linear Differential Equations of First Order
Homogeneous Differential Equations of First Order
A differential equation of the form M(x, y) dx + N(x, y) dy = 0 is called homogeneous if each term in M(x, y) and N(x, y) has the same total degree in x and y. For example, (x2 + xy + y2) dx + xy dy = 0 is a homogeneous differential equation because each term has a degree of 2.
To solve a homogeneous differential equation, we use the substitution y = vx. This implies that dy/dx = v + x(dv/dx). By substituting these into the differential equation, we transform it into a separable differential equation in terms of v and x, which can then be solved by integration.
Steps to Solve Homogeneous Differential Equations:
- Identify the equation: Check if the differential equation is in the form
dy/dx = f(x, y), wheref(x, y)is a homogeneous function of degree zero, meaningf(tx, ty) = f(x, y). Alternatively, check ifM(x, y) dx + N(x, y) dy = 0where M and N are homogeneous functions of the same degree. - Substitution: Substitute
y = vx. This meansdy = v dx + x dv. - Transform the equation: Substitute
yanddyin the original differential equation. This will result in an equation involvingv,x, anddv/dx. The equation will typically be of the formg(v) dv = h(x) dxor similar after rearrangement. - Separate variables: Rearrange the transformed equation to separate the variables
vandx. You should get an equation of the formA(v) dv = B(x) dx. - Integrate: Integrate both sides of the separated equation:
∫ A(v) dv = ∫ B(x) dx + C, where C is the constant of integration. - Substitute back: After finding the solution in terms of
vandx, substitute backv = y/xto get the final solution in terms ofxandy.
Example:
Solve the differential equation: (x2 - y2) dx + 2xy dy = 0
First, rewrite the equation as dy/dx = -(x2 - y2) / (2xy) = (y2 - x2) / (2xy).
Let f(x, y) = (y2 - x2) / (2xy).
f(tx, ty) = ((ty)2 - (tx)2) / (2(tx)(ty)) = (t2y2 - t2x2) / (2t2xy) = t2(y2 - x2) / (2t2xy) = (y2 - x2) / (2xy) = f(x, y).
Thus, the equation is homogeneous.
Let y = vx, so dy/dx = v + x(dv/dx).
Substituting into the equation:
v + x(dv/dx) = ((vx)2 - x2) / (2x(vx))
v + x(dv/dx) = (v2x2 - x2) / (2vx2)
v + x(dv/dx) = x2(v2 - 1) / (2vx2)
v + x(dv/dx) = (v2 - 1) / (2v)
x(dv/dx) = (v2 - 1) / (2v) - v
x(dv/dx) = (v2 - 1 - 2v2) / (2v)
x(dv/dx) = (-v2 - 1) / (2v)
x(dv/dx) = -(v2 + 1) / (2v)
Separating variables:
(2v / (v2 + 1)) dv = -(1/x) dx
Integrating both sides:
∫ (2v / (v2 + 1)) dv = ∫ -(1/x) dx
ln(v2 + 1) = -ln(x) + ln(C)
ln(v2 + 1) = ln(C/x)
v2 + 1 = C/x
Substituting back v = y/x:
(y/x)2 + 1 = C/x
y2/x2 + 1 = C/x
(y2 + x2) / x2 = C/x
y2 + x2 = Cx
This is the general solution.
dy/dx = f(x, y) is a homogeneous equation, the substitution y = vx will always lead to a separable equation. Remember to correctly differentiate y = vx to get dy/dx = v + x(dv/dx). This is a common point of error.
Linear Differential Equations of First Order
A first-order differential equation is called linear if it can be expressed in the standard form:
dy/dx + P(x)y = Q(x)
Here, P(x) and Q(x) are functions of x only, or constants. The equation is linear in y and its derivative dy/dx.
To solve a linear differential equation, we use an integrating factor (IF). The integrating factor is given by e∫ P(x) dx. Multiplying the standard form of the differential equation by the integrating factor transforms the left side into the derivative of a product.
Steps to Solve Linear Differential Equations:
- Standard Form: Ensure the differential equation is in the standard form
dy/dx + P(x)y = Q(x). If the coefficient ofdy/dxis not 1, divide the entire equation by it. - Identify P(x) and Q(x): Clearly identify the functions P(x) and Q(x) from the standard form.
- Calculate the Integrating Factor (IF): Compute the integrating factor using the formula:
IF = e∫ P(x) dx. Remember to take the indefinite integral of P(x). The constant of integration in the exponent can be omitted as it gets absorbed into the final constant of integration. - Multiply by IF: Multiply both sides of the standard differential equation by the integrating factor:
IF * (dy/dx + P(x)y) = IF * Q(x). - Recognize the Product Rule: The left side of the equation will now be the exact derivative of the product of the integrating factor and y:
d/dx (y * IF) = IF * Q(x). - Integrate both sides: Integrate both sides with respect to x:
∫ d/dx (y * IF) dx = ∫ (IF * Q(x)) dx. This simplifies toy * IF = ∫ (IF * Q(x)) dx + C, where C is the constant of integration. - Solve for y: Isolate y by dividing by the integrating factor:
y = (1/IF) * [∫ (IF * Q(x)) dx + C].
Example:
Solve the differential equation: dy/dx + y/x = x2
This equation is already in the standard form dy/dx + P(x)y = Q(x).
Here, P(x) = 1/x and Q(x) = x2.
Calculate the integrating factor:
∫ P(x) dx = ∫ (1/x) dx = ln|x|
IF = e∫ P(x) dx = eln|x| = |x|.
For simplicity, we can take IF = x (assuming x > 0 for now; the general solution will cover all cases).
Multiply the equation by the integrating factor (x):
x * (dy/dx + y/x) = x * x2
x(dy/dx) + y = x3
The left side is the derivative of the product y * x:
d/dx (y * x) = x3
Integrate both sides with respect to x:
∫ d/dx (y * x) dx = ∫ x3 dx
y * x = x4/4 + C
Solve for y:
y = (x4/4 + C) / x
y = x3/4 + C/x
This is the general solution.
d/dx (y * IF) = IF * Q(x). If you correctly calculate the IF and apply this step, the integration on the right side is usually straightforward.
Example with Q(x) = 0 (Homogeneous Linear Equation)
Solve the differential equation: dy/dx - y = 0
This is a linear equation with P(x) = -1 and Q(x) = 0.
∫ P(x) dx = ∫ -1 dx = -x
IF = e-x
Multiply by IF:
e-x (dy/dx - y) = e-x * 0
d/dx (y * e-x) = 0
Integrate both sides:
y * e-x = C
y = C * ex
This is a special case where the equation is also homogeneous in a broader sense (can be written as dy/dx = y).
Example where the equation needs rearrangement
Solve: x dy/dx + 2y = x4
First, divide by x to get the standard form:
dy/dx + (2/x)y = x3
Here, P(x) = 2/x and Q(x) = x3.
Calculate the integrating factor:
∫ P(x) dx = ∫ (2/x) dx = 2 ln|x| = ln(x2)
IF = eln(x2) = x2
Multiply the standard form by IF (x2):
x2 (dy/dx + (2/x)y) = x2 * x3
x2 dy/dx + 2x y = x5
The left side is d/dx (y * x2):
d/dx (y * x2) = x5
Integrate both sides:
∫ d/dx (y * x2) dx = ∫ x5 dx
y * x2 = x6/6 + C
Solve for y:
y = (x6/6 + C) / x2
y = x4/6 + C/x2
- Homogeneous: Look for terms with the same degree in x and y. Use substitution
y = vx. - Linear: Look for the form
dy/dx + P(x)y = Q(x). Use the integrating factor method.
dy/dx = y), in which case either method can be applied, but the linear method is often more direct. Always try to put the equation in its standard form first.
Bernoulli's Differential Equation
While not strictly homogeneous or linear, Bernoulli's equation is a type of non-linear first-order ODE that can be reduced to a linear form. It is given by:
dy/dx + P(x)y = Q(x)yn
where n is a real number and n ≠ 0, 1.
Steps to Solve Bernoulli's Equation:
- Standard Form: Ensure the equation is in the form
dy/dx + P(x)y = Q(x)yn. - Substitution: Divide the entire equation by
ynto gety-n dy/dx + P(x)y1-n = Q(x). - Introduce new variable: Let
v = y1-n. Then, differentiate with respect to x:dv/dx = (1-n)y-n dy/dx. - Rearrange for dv/dx: From the derivative, we get
y-n dy/dx = (1/(1-n)) dv/dx. - Substitute into the equation: Substitute
vanddv/dxinto the modified Bernoulli equation:(1/(1-n)) dv/dx + P(x)v = Q(x). - Linear Equation: Rearrange this into the standard linear form:
dv/dx + (1-n)P(x)v = (1-n)Q(x). This is now a linear differential equation in terms ofvandx. - Solve for v: Solve this linear equation for
vusing the integrating factor method described earlier. - Substitute back: Once you have the solution for
v, substitute backv = y1-nto obtain the solution fory.
Example:
Solve the equation: dy/dx + y = xy3
This is a Bernoulli equation with P(x) = 1, Q(x) = x, and n = 3.
Divide by y3:
y-3 dy/dx + y/y3 = x
y-3 dy/dx + y-2 = x
Let v = y1-3 = y-2.
Then, dv/dx = -2y-3 dy/dx.
So, y-3 dy/dx = (-1/2) dv/dx.
Substitute into the equation:
(-1/2) dv/dx + v = x
Multiply by -2 to get the standard linear form:
dv/dx - 2v = -2x
This is a linear equation for v with P(x) = -2 and Q(x) = -2x.
Calculate the integrating factor for v:
∫ P(x) dx = ∫ -2 dx = -2x
IF = e-2x
Multiply the linear equation by IF:
e-2x (dv/dx - 2v) = e-2x (-2x)
d/dx (v * e-2x) = -2x e-2x
Integrate the right side using integration by parts (∫ u dv = uv - ∫ v du):
Let u = -2x, dv = e-2x dx.
Then du = -2 dx, v = ∫ e-2x dx = (-1/2)e-2x.
∫ -2x e-2x dx = (-2x)(-1/2)e-2x - ∫ (-1/2)e-2x (-2 dx)
= x e-2x - ∫ e-2x dx
= x e-2x - (-1/2)e-2x
= x e-2x + (1/2)e-2x
So, v * e-2x = x e-2x + (1/2)e-2x + C
Solve for v:
v = x + 1/2 + C e2x
Substitute back v = y-2:
y-2 = x + 1/2 + C e2x
1/y2 = x + 1/2 + C e2x
y2 = 1 / (x + 1/2 + C e2x)
This is the general solution.
yn term on the right side. The substitution v = y1-n is the key. Always check the value of n; if n=0 or n=1, it's already a linear equation.