23.2.21 problem 21

Internal problem ID [5376]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 2. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF SECOND OR HIGHER DEGREE, page 278
Problem number : 21
Date solved : Tuesday, September 30, 2025 at 12:38:14 PM
CAS classification : [[_1st_order, `_with_symmetry_[F(x),G(x)*y+H(x)]`]]

\begin{align*} {y^{\prime }}^{2}+f \left (x \right ) \left (y-a \right )^{2} \left (y-b \right ) \left (y-c \right )&=0 \end{align*}
Maple. Time used: 0.057 (sec). Leaf size: 344
ode:=diff(y(x),x)^2+f(x)*(y(x)-a)^2*(y(x)-b)*(y(x)-c) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} -\frac {\ln \left (\frac {-2 \sqrt {\left (a -c \right ) \left (a -b \right )}\, \sqrt {\left (y-c \right ) \left (y-b \right )}+\left (-2 a +b +c \right ) y+\left (b +c \right ) a -2 c b}{a -y}\right ) \sqrt {a^{2}-a b -c a +c b}\, \sqrt {y-b}\, \sqrt {y-c}}{\left (a -c \right ) \left (a -b \right ) \sqrt {y^{2}-y b -y c +c b}}+\frac {\int _{}^{x}\sqrt {-f \left (\textit {\_a} \right ) \left (y-c \right ) \left (y-b \right )}d \textit {\_a}}{\sqrt {y-c}\, \sqrt {y-b}}+c_1 &= 0 \\ -\frac {\ln \left (\frac {-2 \sqrt {\left (a -c \right ) \left (a -b \right )}\, \sqrt {\left (y-c \right ) \left (y-b \right )}+\left (-2 a +b +c \right ) y+\left (b +c \right ) a -2 c b}{a -y}\right ) \sqrt {a^{2}-a b -c a +c b}\, \sqrt {y-b}\, \sqrt {y-c}}{\left (a -c \right ) \left (a -b \right ) \sqrt {y^{2}-y b -y c +c b}}-\frac {\int _{}^{x}\sqrt {-f \left (\textit {\_a} \right ) \left (y-c \right ) \left (y-b \right )}d \textit {\_a}}{\sqrt {y-c}\, \sqrt {y-b}}+c_1 &= 0 \\ \end{align*}
Mathematica. Time used: 70.101 (sec). Leaf size: 251
ode=(D[y[x],x])^2+f[x]*(y[x]-a)^2*(y[x]-b)*(y[x]-c)==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {b (c-a)+c (a-b) \tanh ^2\left (\frac {1}{2} \sqrt {a-b} \sqrt {a-c} \left (\int _1^x-i \sqrt {f(K[1])}dK[1]+c_1\right )\right )}{(a-b) \tanh ^2\left (\frac {1}{2} \sqrt {a-b} \sqrt {a-c} \left (\int _1^x-i \sqrt {f(K[1])}dK[1]+c_1\right )\right )-a+c}\\ y(x)&\to \frac {b (c-a)+c (a-b) \tanh ^2\left (\frac {1}{2} \sqrt {a-b} \sqrt {a-c} \left (\int _1^xi \sqrt {f(K[2])}dK[2]+c_1\right )\right )}{(a-b) \tanh ^2\left (\frac {1}{2} \sqrt {a-b} \sqrt {a-c} \left (\int _1^xi \sqrt {f(K[2])}dK[2]+c_1\right )\right )-a+c} \end{align*}
Sympy. Time used: 21.353 (sec). Leaf size: 437
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
y = Function("y") 
f = Function("f") 
ode = Eq((-a + y(x))**2*(-b + y(x))*(-c + y(x))*f(x) + Derivative(y(x), x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \text {Solution too large to show} \]