50.1.12 problem 12

Internal problem ID [10010]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 12
Date solved : Tuesday, September 30, 2025 at 06:46:24 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.039 (sec). Leaf size: 9
ode:=diff(y(x),x) = 2*y(x)/x; 
ic:=[y(0) = 0]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = c_1 \,x^{2} \]
Mathematica. Time used: 0.001 (sec). Leaf size: 6
ode=D[y[x],x] == 2*y[x]/x; 
ic=y[0]==0; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to 0 \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - 2*y(x)/x,0) 
ics = {y(0): 0} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Couldnt solve for initial conditions