How can i solve this differencial equation? : #y'+x^2 y=x^2#

2 Answers
Feb 21, 2018

# y = 1 + Ce^(-1/3x^3) #

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:

# y'+x^2y=x^2 # ..... [1]

This is a First Order Ordinary Differential Equation in Standard Form. So we compute and integrating factor, #I#, using;

# I = e^(int P(x) dx) #
# \ \ = exp(int \ x^2 \ dx) #
# \ \ = exp( 1/3x^3 ) #
# \ \ = e^(1/3x^3) #

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

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

# :. d/dx( ye^(1/3x^3) ) = x^2e^(1/3x^3) #

This has transformed our initial ODE into a Separable ODE, so we can now "separate the variables" to get::

# ye^(1/3x^3) = int \ x^2e^(1/3x^3) \ dx + C #

This is trivial to integrate, and we get:

# ye^(1/3x^3) = e^(1/3x^3) + C #

Leading to the explicit General Solution:

# y = e^(-1/3x^3){e^(1/3x^3) + C} #
# \ \ = 1 + Ce^(-1/3x^3) #

Feb 21, 2018

A simpler method to the one given in the other answer

Explanation:

#y'+x^2y=x^2#

This is a separable ODE

#dy/dx=x^2-x^2y=x^2(1-y)#

#rArr int1/(1-y)dy=intx^2dx#

#rArr-ln|1-y|=1/3x^3+"c"#

#1-y=Be^(1/3x^3)# where #B=e^(-"c")#

#y=1+Ae^(1/3x^3)# where #A=-B#