32.10.20 problem Exercise 35.20, page 504

Internal problem ID [6014]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 8. Special second order equations. Lesson 35. Independent variable x absent
Problem number : Exercise 35.20, page 504
Date solved : Wednesday, March 05, 2025 at 12:04:13 AM
CAS classification : [[_2nd_order, _missing_y]]

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

With initial conditions

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

Maple. Time used: 0.010 (sec). Leaf size: 16
ode:=x^2*diff(diff(y(x),x),x)+x*diff(y(x),x) = 1; 
ic:=y(1) = 1, D(y)(1) = 2; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {\ln \left (x \right )^{2}}{2}+2 \ln \left (x \right )+1 \]
Mathematica. Time used: 0.014 (sec). Leaf size: 19
ode=x^2*D[y[x],{x,2}]+x*D[y[x],x]==1; 
ic={y[1]==1,Derivative[1][y][1]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{2} \left (\log ^2(x)+4 \log (x)+2\right ) \]
Sympy. Time used: 0.215 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) + x*Derivative(y(x), x) - 1,0) 
ics = {y(1): 1, Subs(Derivative(y(x), x), x, 1): 2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {\log {\left (x \right )}^{2}}{2} + 2 \log {\left (x \right )} + 1 \]