85.27.6 problem 6

Internal problem ID [22598]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. A Exercises at page 60
Problem number : 6
Date solved : Thursday, October 02, 2025 at 08:54:51 PM
CAS classification : [[_2nd_order, _quadrature]]

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

With initial conditions

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