20.4.32 problem Problem 48

Internal problem ID [3667]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 1, First-Order Differential Equations. Section 1.8, Change of Variables. page 79
Problem number : Problem 48
Date solved : Sunday, March 30, 2025 at 02:02:55 AM
CAS classification : [[_homogeneous, `class G`], _rational, _Bernoulli]

\begin{align*} y^{\prime }-\frac {y}{\left (\pi -1\right ) x}&=\frac {3 x y^{\pi }}{1-\pi } \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 21
ode:=diff(y(x),x)-1/(Pi-1)/x*y(x) = 3/(1-Pi)*x*y(x)^Pi; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\frac {x^{3}+c_1}{x}\right )^{-\frac {1}{\pi -1}} \]
Mathematica. Time used: 1.237 (sec). Leaf size: 28
ode=D[y[x],x]-1/( (Pi-1)*x)*y[x]==3/(1-Pi)*x*y[x]^Pi; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \left (\frac {x^3+c_1}{x}\right ){}^{\frac {1}{1-\pi }} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 2.539 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-3*x*y(x)**pi/(1 - pi) + Derivative(y(x), x) - y(x)/(x*(-1 + pi)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (\frac {1}{\frac {C_{1}}{x} + x^{\frac {1}{1 - \pi } + 1 - \frac {\pi }{1 - \pi }}}\right )^{- \frac {1}{1 - \pi }} \]