60.1.26 problem 26

Internal problem ID [10040]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 26
Date solved : Wednesday, March 05, 2025 at 08:05:18 AM
CAS classification : [_quadrature]

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

Maple. Time used: 0.005 (sec). Leaf size: 45
ode:=diff(y(x),x)-(A*y(x)-a)*(B*y(x)-b) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{\left (x +c_{1} \right ) \left (A b -a B \right )} a -b}{A \,{\mathrm e}^{\left (x +c_{1} \right ) \left (A b -a B \right )}-B} \]
Mathematica. Time used: 0.382 (sec). Leaf size: 56
ode=D[y[x],x] - (A*y[x] - a)*(B*y[x] - b)==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{(a-A K[1]) (b-B K[1])}dK[1]\&\right ][x+c_1] \\ y(x)\to \frac {a}{A} \\ y(x)\to \frac {b}{B} \\ \end{align*}
Sympy. Time used: 1.165 (sec). Leaf size: 42
from sympy import * 
x = symbols("x") 
A = symbols("A") 
B = symbols("B") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-(A*y(x) - a)*(B*y(x) - b) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {- \frac {b e^{B a \left (C_{1} + x\right )}}{B} + \frac {a e^{A b \left (C_{1} + x\right )}}{A}}{e^{A b \left (C_{1} + x\right )} - e^{B a \left (C_{1} + x\right )}} \]