What is a general solution to the differential equation #y=y+2xe^(2x)#?

1 Answer
Aug 26, 2016

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

Explanation:

assuming a typo, i think you have

#y' = y + 2xe^(2x)#

that's not separable so we write it in this form

#y' - y = 2xe^(2x)#

OR

#y' + (-1)* y = 2xe^(2x)#

and we use an integrating factor #eta(x)# to make the equation exact on the LHS

#eta(x) = e^(int \ (-1) dx) = e^(-x)#, note the pattern

Now multiply every term by #eta#

#e^(-x)y' - e^(-x) y = 2xe^(x)#

and magically the LHS is now very useful

#d/dx (y e^(-x)) = 2xe^(x)#

so

#y e^(-x) = int \ 2xe^(x) \ dx#

time for a spot of IBP

#= int \2x d/dx( e^(x)) \ dx#

#= 2x e^x - int \ d/dx(2x) \ e^(x) \ dx#

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

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

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

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

The theory is as follows

For an equation in form

#y' + f(x) y = g(x)#

using our mysterious integrating factor #eta (x)#, we have
#eta(x) y' +color(red)(eta(x) f(x) y) =eta(x) g(x)#

we then think wouldn't it have handy if the stuff in red was equal to #eta'(x)#

because it would then be a case of

#eta(x) y' +color(red)(eta(x) f(x)) y =eta(x) g(x)#

#implies eta(x) y' +color(red)(eta'(x)) y =eta(x) g(x)#

and by the product rule

#implies d/dx (eta(x) y ) =eta(x) g(x)#

and so
#eta(x) y = int \ eta(x) g(x) \ dx#

so we want

#eta'(x) = eta(x) f(x)#

we can separate the variables here

#(eta'(x))/ (eta(x)) = f(x)#

and integrate

#int \ (eta'(x))/ (eta(x)) \ dx =int f(x) \ dx#

#ln( eta(x) ) =int f(x) \ dx#

#eta(x) =e^ (int f(x) \ dx)#