23.4.31 problem 31

Internal problem ID [6333]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 4. THE NONLINEAR EQUATION OF SECOND ORDER, page 380
Problem number : 31
Date solved : Tuesday, September 30, 2025 at 02:47:49 PM
CAS classification : [NONE]

\begin{align*} 3 y y^{\prime }+y^{\prime \prime }&=f \left (x \right )+g \left (x \right ) y-y^{3} \end{align*}
Maple
ode:=3*y(x)*diff(y(x),x)+diff(diff(y(x),x),x) = f(x)+g(x)*y(x)-y(x)^3; 
dsolve(ode,y(x), singsol=all);
 
\[ \text {No solution found} \]
Mathematica
ode=3*y[x]*D[y[x],x] + D[y[x],{x,2}] == f[x] + g[x]*y[x] - y[x]^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-f(x) - g(x)*y(x) + y(x)**3 + 3*y(x)*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -((g(x) - y(x)**2)*y(x) + f(x) - Derivative(y(x), (x, 2)))/(3*y(