What is the general solution of the differential equation? : dy/dx = x+2y
1 Answer
The General Solution is:
y = -1/2x -1/4 + Ce^(2x)
Explanation:
We can use an integrating factor when we have a First Order Linear non-homogeneous Ordinary Differential Equation of the form;
dy/dx + P(x)y=Q(x)
We have:
dy/dx = x+2y
Which we can write as:
dy/dx -2y = x ..... [A]
This is a First Order Ordinary Differential Equation in Standard Form. So we compute and integrating factor,
I = e^(int P(x) dx)
\ \ = exp(int \ -2 \ dx)
\ \ = exp( -2x)
\ \ = e^(-2x)
And if we multiply the DE [A] by this Integrating Factor,
dy/dxe^(-2x) -2ye^(-2x) = xe^(-2x)
:. d/dx( ye^(-2x) ) = xe^(-2x)
This has transformed our initial ODE into a Separable ODE, so we can now "separate the variables" to get::
ye^(-2x) = int \ xe^(-2x) \ dx
We can proceed via an application of integration by Parts
Let
{ (u,=x, => (du)/dx,=1), ((dv)/dx,=e^(-2x), => v,=-1/2e^(-2x) ) :}
Then plugging into the IBP formula:
int \ (u)((dv)/dx) \ dx = (u)(v) - int \ (v)((du)/dx) \ dx
We have:
int \ (x)(e^(-2x)) \ dx = (x)(-1/2e^(-2x)) - int \ (-1/2e^(-2x))(1) \ dx
:. int \ xe^(-2x) \ dx = -1/2xe^(-2x) +1/2 \ int \ e^(-2x) \ dx
" " = -1/2xe^(-2x) -1/4 e^(-2x) + C
Using this result, we can write the DE Solution as :
ye^(-2x) = -1/2xe^(-2x) -1/4 e^(-2x) + C
:. y = -1/2x -1/4 + Ce^(2x)