26.10.21 problem Exercise 35.21, page 504

Internal problem ID [7150]
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.21, page 504
Date solved : Tuesday, September 30, 2025 at 04:23:22 PM
CAS classification : [[_2nd_order, _missing_y]]

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

With initial conditions

\begin{align*} y \left (1\right )&=0 \\ y^{\prime }\left (1\right )&=-1 \\ \end{align*}
Maple. Time used: 0.030 (sec). Leaf size: 16
ode:=-diff(y(x),x)+x*diff(diff(y(x),x),x) = x^2; 
ic:=[y(1) = 0, D(y)(1) = -1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {1}{3} x^{3}-x^{2}+\frac {2}{3} \]
Mathematica. Time used: 0.019 (sec). Leaf size: 19
ode=x*D[y[x],{x,2}]-D[y[x],x]==x^2; 
ic={y[1]==0,Derivative[1][y][1]==-1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{3} \left (x^3-3 x^2+2\right ) \end{align*}
Sympy. Time used: 0.184 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + x*Derivative(y(x), (x, 2)) - Derivative(y(x), x),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^{3}}{3} - x^{2} + \frac {2}{3} \]