78.1.40 problem 4 (b)

Internal problem ID [18024]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 1. The Nature of Differential Equations. Separable Equations. Section 2. Problems at page 9
Problem number : 4 (b)
Date solved : Monday, March 31, 2025 at 04:57:00 PM
CAS classification : [_quadrature]

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

With initial conditions

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

Maple. Time used: 0.032 (sec). Leaf size: 10
ode:=x*diff(y(x),x) = 2*x^2+1; 
ic:=y(1) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = x^{2}+\ln \left (x \right ) \]
Mathematica. Time used: 0.004 (sec). Leaf size: 11
ode=x*D[y[x],x]==2*x^2+1; 
ic={y[1]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x^2+\log (x) \]
Sympy. Time used: 0.222 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x**2 + x*Derivative(y(x), x) - 1,0) 
ics = {y(1): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x^{2} + \log {\left (x \right )} \]