29.1.11 problem 10

Internal problem ID [4618]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 1
Problem number : 10
Date solved : Sunday, March 30, 2025 at 03:30:40 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=a \,x^{n} y \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 19
ode:=diff(y(x),x) = a*x^n*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \,{\mathrm e}^{\frac {a \,x^{n +1}}{n +1}} \]
Mathematica. Time used: 0.057 (sec). Leaf size: 27
ode=D[y[x],x]==a*x^n*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to c_1 e^{\frac {a x^{n+1}}{n+1}} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.559 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
a = symbols("a") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-a*x**n*y(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \begin {cases} e^{\frac {C_{1} n}{n + 1} + \frac {C_{1}}{n + 1} + \frac {a x^{n + 1}}{n + 1}} & \text {for}\: n > -1 \vee n < -1 \\e^{C_{1} + a \log {\left (x \right )}} & \text {otherwise} \end {cases} \]