Differential Equation Exercise 17

We want to solve the following first-order differential equation:

$$ xy' + 2y = x $$

Applying the invariance property, we divide through by \( x \):

$$ \frac{xy' + 2y}{x} = \frac{x}{x} $$

$$ \frac{xy'}{x} + \frac{2y}{x} = 1 $$

$$ y' + \frac{2y}{x} = 1 $$

This is now in the form of a linear differential equation:

\( y' + a(x)\,y = b(x) \), where \( a(x) = \frac{2}{x} \) and \( b(x) = 1 \).

We can solve this using the method of variation of constants:

$$ y = e^{-\int a(x) \, dx} \left[ \int b(x) \, e^{\int a(x) \, dx} \, dx + c \right] $$

Substituting \( a(x) = \frac{2}{x} \) and \( b(x) = 1 \):

$$ y = e^{-\int \frac{2}{x} \, dx} \left[ \int e^{\int \frac{2}{x} \, dx} \, dx + c \right] $$

$$ y = e^{-2 \int \frac{1}{x} \, dx} \left[ \int e^{2 \int \frac{1}{x} \, dx} \, dx + c \right] $$

Since \( \int \frac{1}{x} \, dx = \log x \), this becomes:

$$ y = e^{-2 \log x} \left[ \int e^{2 \log x} \, dx + c \right] $$

Using \( e^{\log x} = x \):

$$ y = x^{-2} \left[ \int x^2 \, dx + c \right] $$

The integral \( \int x^2 \, dx \) is \( \frac{x^3}{3} \):

$$ y = x^{-2} \left[ \frac{x^3}{3} + c \right] $$

Distributing \( x^{-2} \):

$$ y = \frac{x}{3} + c \, x^{-2} $$

This is the general solution of the differential equation.

 

 
 

Please feel free to point out any errors or typos, or share suggestions to improve these notes. English isn't my first language, so if you notice any mistakes, let me know, and I'll be sure to fix them.

FacebookTwitterLinkedinLinkedin
knowledge base

Differential Equations

First-Order Differential Equations

Second-Order Differential Equations

Higher-Order Linear Equations

Examples and Practice Problems

Theory

Approximate Solutions