29.6.6 problem 152

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

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

Maple. Time used: 0.001 (sec). Leaf size: 9
ode:=x*diff(y(x),x) = a*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \,x^{a} \]
Mathematica. Time used: 0.027 (sec). Leaf size: 16
ode=x D[y[x],x]==a y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to c_1 x^a \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.140 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-a*y(x) + x*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x^{\operatorname {re}{\left (a\right )}} \left (C_{1} \sin {\left (\log {\left (x \right )} \left |{\operatorname {im}{\left (a\right )}}\right | \right )} + C_{2} \cos {\left (\log {\left (x \right )} \operatorname {im}{\left (a\right )} \right )}\right ) \]