82.1.2 problem Ex. 4

Internal problem ID [18645]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter I. Definitions. Formation of differential equation. Exercises at page 12
Problem number : Ex. 4
Date solved : Thursday, March 13, 2025 at 12:27:12 PM
CAS classification : [[_2nd_order, _exact, _linear, _homogeneous]]

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

Maple. Time used: 0.003 (sec). Leaf size: 11
ode:=diff(diff(y(x),x),x)-2*diff(y(x),x)/x+2/x^2*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = x \left (c_{1} x +c_{2} \right ) \]
Mathematica. Time used: 0.011 (sec). Leaf size: 14
ode=D[y[x],{x,2}]-2/x*D[y[x],x]+2/x^2*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x (c_2 x+c_1) \]
Sympy. Time used: 0.151 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), (x, 2)) - 2*Derivative(y(x), x)/x + 2*y(x)/x**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x \left (C_{1} + C_{2} x\right ) \]