71.6.10 problem 10

Internal problem ID [14345]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 2. The Initial Value Problem. Exercises 2.3.2, page 63
Problem number : 10
Date solved : Monday, March 31, 2025 at 12:18:38 PM
CAS classification : [_separable]

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

With initial conditions

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

Maple. Time used: 0.030 (sec). Leaf size: 12
ode:=y(x)-x^2*diff(y(x),x) = 0; 
ic:=y(1) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = {\mathrm e}^{\frac {x -1}{x}} \]
Mathematica. Time used: 0.029 (sec). Leaf size: 14
ode=y[x]-x^2*D[y[x],x]==0; 
ic={y[1]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{1-\frac {1}{x}} \]
Sympy. Time used: 0.280 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*Derivative(y(x), x) + y(x),0) 
ics = {y(1): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = e e^{- \frac {1}{x}} \]