89.33.9 problem 10

Internal problem ID [24993]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 17. Special Equations of order Two. Exercises at page 251
Problem number : 10
Date solved : Thursday, October 02, 2025 at 11:46:03 PM
CAS classification : [[_2nd_order, _missing_y]]

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

With initial conditions

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