# What is the general solution of the differential equation dy/dx−2y+a=0?

What is the general solution of the differential equation $\frac{dy}{dx}-2y+a=0$?
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

Raphael Singleton
First write the DE in standard form:

$\frac{dy}{dx}-2y+a=0$
$\therefore \frac{dy}{dx}-2y=-a$......[1]

This is a First Order Linear non-homogeneous Ordinary Differential Equation of the form;

$\frac{dy}{dx}+P\left(x\right)y=Q\left(x\right)$

This is a standard form of a Differential Equation that can be solved by using an Integrating Factor:

$I={e}^{\int P\left(x\right)dx}$

And if we multiply the DE [1] by this Integrating Factor we will have a perfect product differential;

$\frac{dy}{dx}{e}^{-2x}-2y{e}^{-2x}=-a{e}^{-2x}$
$\frac{d}{dx}\left(y{e}^{-2x}\right)=-a{e}^{-2x}$

This has converted our DE into a First Order separable DE which we can now just separate the variables to get;

Which we can easily integrate to get:

$y{e}^{-2x}=\frac{1}{2}a{e}^{-2x}+C$
$\therefore y=\frac{1}{2}a+C{e}^{2x}$