What is the general solution of the differential equation # xdy/dx = y+sinx #?
1 Answer
# y = xCi(x) -sinx + Cx#
Where
Explanation:
We have:
# xdy/dx = y+sinx # ..... [A]
This is a First Order Differential Equation which we can manipulate as follows:
# \ \ \ \ \ dy/dx = y/x+sinx/x #
# :. dy/dx - y/x = sinx/x # ..... [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/x \ dx) #
# \ \ = exp( -lnx ) #
# \ \ = exp( ln(1/x) ) #
# \ \ = 1/x #
And if we multiply the DE [B] by this Integrating Factor,
# 1/xdy/dx - y/x^2 = sinx/x^2 #
# :. d/dx(y/x) = sinx/x^2 #
Which has now reduced the original differential equation [A] to a First Order separable equation, so we can "seperate the variables" , to get:
# y/x = int \ sinx/x^2 \ dx # ..... [C]
The RHS will prove a challenge, but we can simplify it slightly using a single application of Integration By Parts:
Let
# { (u,=sinx, => (du)/dx,=cosx), ((dv)/dx,=1/x^2, => v,=-1/x ) :}#
Then plugging into the IBP formula:
# int \ (u)((dv)/dx) \ dx = (u)(v) - int \ (v)((du)/dx) \ dx #
gives us
# int \ (sinx)(1/x^2) \ dx = (sinx)(-1/x) - int \ (-1/x)(cosx) \ dx #
# :. int \ sinx/x^2 \ dx = -sinx/x + int cosx/x \ dx #
Using this result, we can integrate the earlier result [C] to get:
# y/x = -sinx/x + int cosx/x \ dx + C#
So we have simplified the integral, but we cannot now evaluate this resulting integral any further in terms of elementary functions. Instead we introduce the Cosine Integral:
# Ci(x) := -int_0^oo cost/t \ dt #
Allowing us to write:
# y/x = Ci(x) -sinx/x + C#
# :. y = xCi(x) -sinx + Cx#