23.1.83 problem 77

Internal problem ID [4690]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 77
Date solved : Tuesday, September 30, 2025 at 08:14:59 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=\left (a +b y+c y^{2}\right ) f \left (x \right ) \end{align*}
Maple. Time used: 0.020 (sec). Leaf size: 47
ode:=diff(y(x),x) = (a+b*y(x)+c*y(x)^2)*f(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-b +\tan \left (\frac {\sqrt {4 a c -b^{2}}\, \left (\int f \left (x \right )d x +c_1 \right )}{2}\right ) \sqrt {4 a c -b^{2}}}{2 c} \]
Mathematica. Time used: 0.193 (sec). Leaf size: 94
ode=D[y[x],x]==(a+b*y[x]+c*y[x]^2)*f[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{c K[1]^2+b K[1]+a}dK[1]\&\right ]\left [\int _1^xf(K[2])dK[2]+c_1\right ]\\ y(x)&\to -\frac {\sqrt {b^2-4 a c}+b}{2 c}\\ y(x)&\to \frac {\sqrt {b^2-4 a c}-b}{2 c} \end{align*}
Sympy. Time used: 1.950 (sec). Leaf size: 134
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
y = Function("y") 
f = Function("f") 
ode = Eq((-a - b*y(x) - c*y(x)**2)*f(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ - \sqrt {- \frac {1}{4 a c - b^{2}}} \log {\left (y{\left (x \right )} + \frac {- 4 a c \sqrt {- \frac {1}{4 a c - b^{2}}} + b^{2} \sqrt {- \frac {1}{4 a c - b^{2}}} + b}{2 c} \right )} + \sqrt {- \frac {1}{4 a c - b^{2}}} \log {\left (y{\left (x \right )} + \frac {4 a c \sqrt {- \frac {1}{4 a c - b^{2}}} - b^{2} \sqrt {- \frac {1}{4 a c - b^{2}}} + b}{2 c} \right )} - \int f{\left (x \right )}\, dx = C_{1} \]