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

2 Answers
Mar 16, 2017

Use the separation of variables method.

Explanation:

Given: #dy/dx - 2y + a = 0#

Add #2y - a# to both sides:

#dy/dx = 2y - a #

Multiply both sides by #dx/(2y-a)#:

#dy/(2y - a)=dx #

#1/2dy/(y-a/2)=dx#

Integrate both sides:

#1/2intdy/(y-a/2)=intdx#

#1/2ln(y-a/2)=x+C#

Multiply both sides by 2:

#ln(y-a/2)=2x+C#

Use the exponential function on both sides:

#e^(ln(y-a/2))=e^(2x+C)#

The inverses on the left disappear:

#y-a/2=e^(2x+C)#

Adding an arbitrary constant in the exponent is the same a multiplying by an arbitrary constant:

#y-a/2=Ce^(2x)#

Add #a/2# to both sides:

#y=Ce^(2x)+a/2#

Mar 16, 2017

# y = 1/2 a +Ce^(2x) #

Explanation:

First write the DE in standard form:

# dy/dx - 2y + a = 0 #
# :. dy/dx - 2y = - a # ... [1]

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

# dy/dx + P(x)y=Q(x) #

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

# I = e^(int P(x) dx)#
# \ \ = e^(int \ -2 \ dx)#
# \ \ = e^(-2x) #

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

# dy/dx e^(-2x)- 2ye^(-2x) = - ae^(-2x) #
# d/dx(ye^(-2x)) = - ae^(-2x) #

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

# ye^(-2x) = int \ - ae^(-2x) \ dx #

Which we can easily integrate to get:

# ye^(-2x) = 1/2 ae^(-2x) +C #
# :. y = 1/2 a +Ce^(2x) #