19.1.11 problem 11

Internal problem ID [3525]
Book : Differential equations and linear algebra, Stephen W. Goode, second edition, 2000
Section : 1.4, page 36
Problem number : 11
Date solved : Tuesday, March 04, 2025 at 04:44:21 PM
CAS classification : [_separable]

\begin{align*} \left (x -a \right ) \left (x -b \right ) y^{\prime }-y+c&=0 \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 36
ode:=(x-a)*(x-b)*diff(y(x),x)-y(x)+c = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = c +\left (x -a \right )^{\frac {1}{a -b}} \left (x -b \right )^{-\frac {1}{a -b}} c_{1} \]
Mathematica. Time used: 0.313 (sec). Leaf size: 41
ode=(x-a)*(x-b)*D[y[x],x]-(y[x]-c)==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to c+c_1 (x-b)^{\frac {1}{b-a}} (x-a)^{\frac {1}{a-b}} \\ y(x)\to c \\ \end{align*}
Sympy. Time used: 0.862 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
y = Function("y") 
ode = Eq(c + (-a + x)*(-b + x)*Derivative(y(x), x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = c + e^{\frac {- C_{1} a + C_{1} b + \log {\left (- a + x \right )} - \log {\left (- b + x \right )}}{a - b}} \]