49.12.2 problem 1(c.2)

Internal problem ID [7675]
Book : An introduction to Ordinary Differential Equations. Earl A. Coddington. Dover. NY 1961
Section : Chapter 3. Linear equations with variable coefficients. Page 108
Problem number : 1(c.2)
Date solved : Sunday, March 30, 2025 at 12:18:41 PM
CAS classification : [[_2nd_order, _exact, _linear, _homogeneous]]

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

With initial conditions

\begin{align*} y \left (1\right )&=0\\ y^{\prime }\left (1\right )&=1 \end{align*}

Maple. Time used: 0.028 (sec). Leaf size: 13
ode:=diff(diff(y(x),x),x)+1/x*diff(y(x),x)-1/x^2*y(x) = 0; 
ic:=y(1) = 0, D(y)(1) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = -\frac {1}{2 x}+\frac {x}{2} \]
Mathematica. Time used: 0.013 (sec). Leaf size: 17
ode=D[y[x],{x,2}]+1/x*D[y[x],x]-1/x^2*y[x]==0; 
ic={y[1]==0,Derivative[1][y][1]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {x^2-1}{2 x} \]
Sympy. Time used: 0.238 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), (x, 2)) + Derivative(y(x), x)/x - y(x)/x**2,0) 
ics = {y(1): 0, Subs(Derivative(y(x), x), x, 1): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x}{2} - \frac {1}{2 x} \]