87.3.17 problem 21

Internal problem ID [23266]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 1. Elementary methods. First order differential equations. Exercise at page 26
Problem number : 21
Date solved : Thursday, October 02, 2025 at 09:27:40 PM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=\frac {\left (a -x \right ) y}{d \,x^{2}+c x +b} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 65
ode:=diff(y(x),x) = (a-x)/(d*x^2+c*x+b)*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \left (d \,x^{2}+c x +b \right )^{-\frac {1}{2 d}} {\mathrm e}^{\frac {\arctan \left (\frac {2 d x +c}{\sqrt {4 b d -c^{2}}}\right ) \left (2 d a +c \right )}{\sqrt {4 b d -c^{2}}\, d}} \]
Mathematica. Time used: 0.083 (sec). Leaf size: 77
ode=D[y[x],x]== ( a-x )/(b+c*x+d*x^2)*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_1 \exp \left (-\frac {\log (b+x (c+d x))-\frac {2 (2 a d+c) \arctan \left (\frac {c+2 d x}{\sqrt {4 b d-c^2}}\right )}{\sqrt {4 b d-c^2}}}{2 d}\right )\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 4.038 (sec). Leaf size: 298
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
d = symbols("d") 
y = Function("y") 
ode = Eq(-(a - x)*y(x)/(b + c*x + d*x**2) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = e^{\frac {4 C_{1} b d - C_{1} c^{2} - a \sqrt {- 4 b d + c^{2}} \log {\left (\frac {c}{d} + 2 x - \frac {\sqrt {- 4 b d + c^{2}}}{d} \right )} + a \sqrt {- 4 b d + c^{2}} \log {\left (\frac {c}{d} + 2 x + \frac {\sqrt {- 4 b d + c^{2}}}{d} \right )} - 2 b \log {\left (\frac {c}{d} + 2 x - \frac {\sqrt {- 4 b d + c^{2}}}{d} \right )} - 2 b \log {\left (\frac {c}{d} + 2 x + \frac {\sqrt {- 4 b d + c^{2}}}{d} \right )} + 4 b \log {\left (2 \right )} + \frac {c^{2} \log {\left (\frac {c}{d} + 2 x - \frac {\sqrt {- 4 b d + c^{2}}}{d} \right )}}{2 d} + \frac {c^{2} \log {\left (\frac {c}{d} + 2 x + \frac {\sqrt {- 4 b d + c^{2}}}{d} \right )}}{2 d} - \frac {c^{2} \log {\left (2 \right )}}{d} - \frac {c \sqrt {- 4 b d + c^{2}} \log {\left (\frac {c}{d} + 2 x - \frac {\sqrt {- 4 b d + c^{2}}}{d} \right )}}{2 d} + \frac {c \sqrt {- 4 b d + c^{2}} \log {\left (\frac {c}{d} + 2 x + \frac {\sqrt {- 4 b d + c^{2}}}{d} \right )}}{2 d}}{4 b d - c^{2}}} \]