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.188443 (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.009 (sec), leaf count = 46

\[\left [y \left (x \right ) = \left (\frac {\ln \left (x -a \right )}{a -b}-\frac {\ln \left (x -b \right )}{a -b}+\textit {\_C1} \right ) \left (x -a \right ) \left (x -b \right )\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))

Maple raw output

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