4.7.26 \((x-a) (x-b) y'(x)=y(x) (-a-b+2 x)+(x-a) (x-b)\)

ODE
\[ (x-a) (x-b) y'(x)=y(x) (-a-b+2 x)+(x-a) (x-b) \] ODE Classification

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 0.0257433 (sec), leaf count = 42

\[\left \{\left \{y(x)\to (x-a) (x-b) \left (\frac {\log (x-a)-\log (x-b)}{a-b}+c_1\right )\right \}\right \}\]

Maple
cpu = 0.018 (sec), leaf count = 44

\[ \left \{ y \relax (x ) ={\frac { \left (b-x \right ) \left (\ln \left (x-a \right ) -\ln \left (x-b \right ) +{\it \_C1}\, \left (a-b \right ) \right ) \left (a-x \right ) }{a-b}} \right \} \] Mathematica raw input

DSolve[(-a + x)*(-b + x)*y'[x] == (-a + x)*(-b + x) + (-a - b + 2*x)*y[x],y[x],x]

Mathematica raw output

{{y[x] -> (-a + x)*(-b + x)*(C[1] + (Log[-a + x] - Log[-b + x])/(a - b))}}

Maple raw input

dsolve((x-a)*(x-b)*diff(y(x),x) = (x-a)*(x-b)+(2*x-a-b)*y(x), y(x),'implicit')

Maple raw output

y(x) = (b-x)*(ln(x-a)-ln(x-b)+_C1*(a-b))*(a-x)/(a-b)