29.5.18 problem 134

Internal problem ID [4735]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 5
Problem number : 134
Date solved : Sunday, March 30, 2025 at 03:51:15 AM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }&=a f \left (y\right ) \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 20
ode:=diff(y(x),x) = a*f(y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ x -\frac {\int _{}^{y}\frac {1}{f \left (\textit {\_a} \right )}d \textit {\_a}}{a}+c_1 = 0 \]
Mathematica. Time used: 0.263 (sec). Leaf size: 35
ode=D[y[x],x]==a f[y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{f(K[1])}dK[1]\&\right ][a x+c_1] \\ y(x)\to f^{(-1)}(0) \\ \end{align*}
Sympy. Time used: 0.275 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
f = Function("f") 
ode = Eq(-a*f(y(x)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \int \limits ^{y{\left (x \right )}} \frac {1}{f{\left (y \right )}}\, dy = C_{1} + a x \]