
Patrick B. answered 02/19/19
Math and computer tutor/teacher
(x+1)*y' + y = ln x
y' + (1/(x+1)) * y = (ln x)/(x+1) <--- divides both sides by x+1
The integrating factor is more informative than useful:
exp ( - integral( (x+1)^(-1)) =
exp ( - ln(x+1)) =
1/ exp( ln(x+1)) =
1/(x+1)
This returns the same ODE, so that means it can be re-written
in terms of the differential operation
Note that Dx [ ( x + 1) * y ] = (x+1) * dy/dx + y, by product rule, which in fact is the left side of the ODE
Dx [ (x+1) * y ] = ln x
Integrating:
(x+1)y = integral (ln x)
(x+1)y = x(ln x - 1) + C <--- can be integrated by parts (IBP) or table lookup
y = [x(ln x - 1) + C] / (x+1)
Per the initial condition:
10 = [ 1 * [ ln 1 - 1] + C]/(1+1)
10 = [ 1 * [ 0-1] + C]/2
20 = 1 * (-1) + C
20 = C - 1
C =21
The solution is
y = [x(ln x - 1) + 21] / (x+1)
CHECK:
Quotient Rule says:
dy/dx = {(x+1) [ x( 1/x) + (ln x - 1) ] - [x(ln x - 1) + 21] } / {x+1}^2
= { (x+1) *ln x - xln x + x - 21 ] } / {x+1}^2 <---- x cancels 1/x cancels -1; distribute x across (lnx-1)
and then all signs of second glob change
= { xlnx + lnx - xln x +x - 21}/{x+1}^2
= {lnx +x - 21}/(x+1)^2
Plugs this into the ODE:
dy/dx * (x+1) = {lnx +x - 21}/(x+1)
Adding this to y, the denominator, already common,
is x+1, while the numerator is:
[x(ln x - 1) + 21] + {lnx +x - 21}
the x cancels out.....
21 cancels out.......
xlnx + ln x remains in the numerator
lnx (x+1) remains in the numerator
x+1 cancels out
ln x remains which shows the solution is correct
the domain of the solution is x not equal to -1 and x>0.
the latter condition satisfies the former, so the domain is (0,infinity)