71.9.13 problem 15

Internal problem ID [14421]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 4. N-th Order Linear Differential Equations. Exercises 4.1, page 186
Problem number : 15
Date solved : Monday, March 31, 2025 at 12:26:42 PM
CAS classification : [[_Emden, _Fowler]]

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

With initial conditions

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

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