77.43.13 problem Ex 14 page 15

Internal problem ID [20805]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Book Solved Excercises. Chapter II. Equations of first order and first degree
Problem number : Ex 14 page 15
Date solved : Thursday, October 02, 2025 at 06:25:21 PM
CAS classification : [_Bernoulli]

\begin{align*} y^{\prime }+p \left (x \right ) y&=q \left (x \right ) y^{n} \end{align*}
Maple. Time used: 0.036 (sec). Leaf size: 55
ode:=diff(y(x),x)+p(x)*y(x) = q(x)*y(x)^n; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-\int p \left (x \right )d x} \left (-n \int q \left (x \right ) {\mathrm e}^{-\int p \left (x \right )d x \left (n -1\right )}d x +c_1 +\int q \left (x \right ) {\mathrm e}^{-\int p \left (x \right )d x \left (n -1\right )}d x \right )^{-\frac {1}{n -1}} \]
Mathematica. Time used: 9.269 (sec). Leaf size: 71
ode=D[y[x],x]+p[x]*y[x]==q[x]*y[x]^n; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \left (\exp \left (-\left ((n-1) \int _1^x-p(K[1])dK[1]\right )\right ) \left (-(n-1) \int _1^x\exp \left ((n-1) \int _1^{K[2]}-p(K[1])dK[1]\right ) q(K[2])dK[2]+c_1\right )\right ){}^{\frac {1}{1-n}} \end{align*}
Sympy. Time used: 2.478 (sec). Leaf size: 53
from sympy import * 
x = symbols("x") 
n = symbols("n") 
y = Function("y") 
ode = Eq(p(x)*y(x) - q(x)*y(x)**n + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (\left (C_{1} - n \int q{\left (x \right )} e^{- \left (n - 1\right ) \int p{\left (x \right )}\, dx}\, dx + \int q{\left (x \right )} e^{- \left (n - 1\right ) \int p{\left (x \right )}\, dx}\, dx\right ) e^{\left (n - 1\right ) \int p{\left (x \right )}\, dx}\right )^{- \frac {1}{n - 1}} \]