27.1.1 problem 1

Internal problem ID [4295]
Book : An introduction to the solution and applications of differential equations, J.W. Searl, 1966
Section : Chapter 4, Ex. 4.1
Problem number : 1
Date solved : Sunday, March 30, 2025 at 02:52:40 AM
CAS classification : [_separable]

\begin{align*} 2 x y+x^{2} y^{\prime }&=0 \end{align*}

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