# What is the general solution of the differential equation dy/dx−2xy=x?

What is the general solution of the differential equation $\frac{dy}{dx}-2xy=x$?
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

brodireo1
$\frac{dy}{dx}-2xy=x$

Which we can write as:

$\frac{dy}{dx}=2xy+x$
$\therefore \frac{dy}{dx}=\left(2y+1\right)x$
$\therefore \frac{1}{2y+1}\frac{dy}{dx}=x$

Which is a first order separable differential equation, so we can "separate the variables" to get:

Integrating we get, the General Solution:

$\frac{1}{2}\mathrm{ln}|2y+1|=\frac{1}{2}{x}^{2}+C$

Applying the initial condition y(1)=1 we find:

$\frac{1}{2}\mathrm{ln}3=\frac{1}{2}+C⇒C=\frac{1}{2}\mathrm{ln}3-\frac{1}{2}$

So we can write an implicit particular solution as:

$\frac{1}{2}\mathrm{ln}|2y+1|=\frac{1}{2}{x}^{2}+\frac{1}{2}\mathrm{ln}3-\frac{1}{2}$

We typically require an explicit solution, so we can rearrange as follows:

$\mathrm{ln}|2y+1|={x}^{2}+\mathrm{ln}3-1$
$\therefore |2y+1|={e}^{{x}^{2}+\mathrm{ln}3-1}$

Noting that the exponential function is positive over its entire domain, (as ${e}^{x}>0\forall x\in ℝ$):

$2y+1={e}^{{x}^{2}-1}{e}^{\mathrm{ln}3}$

$\therefore 2y=3{e}^{{x}^{2}-1}-1$

$\therefore y=\frac{3}{2}{e}^{{x}^{2}-1}-\frac{1}{2}$