What is the general solution of the differential equation ? # sec^2y dy/dx+tany=x^3 #

1 Answer
Oct 18, 2017

# y = arctan(x^3-3x^2+6x-6 + ce^(-x)) #

Explanation:

We have:

# sec^2y dy/dx+tany=x^3 # ..... [A]

Let us try a substitution:

Let #tany=theta => sec^2ydy/(d theta)=1#

And by the chain rule, we have:

# sec^2ydy/(d theta) (d theta)/dx=(d theta)/dx => sec^2ydy/dx=(d theta)/dx#

Substituting into the DE [A] we get:

# (d theta)/dx + theta=x^3 # ..... [B]

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) #

Then the integrating factor is given by;

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

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

# e^(x) (d theta)/dx + e^(x) theta =x^3e^(x) #
# :. d/dx( e^(x) \ theta ) =x^3e^(x) #

Which is now a separable DE, so we can separate the variables to get:

# e^(x) \ theta = int \ x^3e^(x) \ dx # ..... [C]

For the RHS integral we could apply Integration By Parts three times. Each application will reduce the the power of the cubic whilst leaving the exponential unchanged. Given this we know that the solution to the integral will be of the form:

# int \ x^3e^(x) \ dx = (Ax^3+Bx^2+Cx+D)e^x #

Differentiation the above wrt #x# and applying the product rule we get:

# x^3e^(x) -= (Ax^3+Bx^2+Cx+D)e^x + (3Ax^2+2Bx+C)e^x #

Equating coefficients we get:

#Coeff(x^3): 1 = A#
#Coeff(x^2): 0 = B+3A => B =-3#
#Coeff(x^1): 0 = C+2B => C=6#
#Coeff(x^0): 0 = D+C => D=-6#

Thus we have:

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

Using this result we can now integrate [C] to get:

# e^(x) \ theta = (x^3-3x^2+6x-6)e^x + c #
# :. theta = x^3-3x^2+6x-6 + ce^(-x) #

Then if we restore our earlier substitution, we get:

# tany = x^3-3x^2+6x-6 + ce^(-x) #
# :. y = arctan(x^3-3x^2+6x-6 + ce^(-x)) #