What is a solution to the differential equation #(x+1)y'-2(x^2+x)y=e^(x^2)/(x+1)# where x>-1 and y(0)=5?

2 Answers
Jun 24, 2016

#y(x) = (6-1/(x+1))e^{x^2}#

Explanation:

The differential equation is first order linear nonhomogeneus. In this case the solution is composed from the homogeneus solution #y_h(x)# and a particular solution #y_p(x)#.

#(x + 1) y'_h(x) - 2 (x^2 + x) y(x)= 0#
#(x + 1) y'_p(x) - 2 (x^2 + x) y_p(x)=e^{x^2}/(x + 1)#

Finally

#y(x) = y_h(x)+y_p(x)#

1) Obtaining the homogeneus solution #y_h(x)#
Simplifying we obtain

#y'_h(x) - 2 x xx y_h(x)= 0#

grouping variables

#(y'_h(x))/(y_h(x)) = 2x#

The solution is

#log_e(y_h(x))=x^2+C_0->y_h(x) = C_1e^{x^2}#

2) Obtaining the particular solution #y_p(x)#
For this purpose we will suppose that

#y_p(x) = C_1(x)e^{x^2}#

This method was due to Euler and Lagrange and can be seen in
https://en.wikipedia.org/wiki/Variation_of_parameters

Introducing #y_p(x)# into the complete equation we obtain after simplifications

#e^{x^2} (1 + x) C'_1(x) = e^{x^2}/(1 + x)#

Solving for #C_1(x)# we obtain

#C_1(x)=-1/(x+1)+C_2#

Now, putting all together

#y(x) = (C_2-1/(x+1))e^{x^2}#

With the initial conditions we find the #C_2# value as

#y(0) = (C_2-1)=5->C_1=6#

Jun 25, 2016

#=e^{x^2} ( (6x + 5)/(x+1) )#

Explanation:

this is linear so we can start by just moving stuff around.

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

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

#y'- 2x \ y= e^(x^2)/(x+1)^2#

we solve with inregrating factor #I = exp( -2 int \ x \ dx) = e^{-x^2}#

# e^{-x^2} * y'- (e^{-x^2} )*2x y= e^{-x^2} *e^(x^2)/(x+1)^2#

# (e^{-x^2} * y)'= 1/(x+1)^2#

# e^{-x^2} * y = int 1/(x+1)^2 \ dx#

# e^{-x^2} * y = - 1/(x+1) + alpha#

# y =e^{x^2} * ( - 1/(x+1) + alpha )#

From #y(0) = 5#

# 5 =1* ( - 1/(1) + alpha ) \implies alpha = 6#

# y =e^{x^2} ( 6 - 1/(x+1) )#

#=e^{x^2} ( (6x + 5)/(x+1) )#