78.1.38 problem 3 (f)

Internal problem ID [18014]
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 : 3 (f)
Date solved : Thursday, March 13, 2025 at 11:19:15 AM
CAS classification : [_quadrature]

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

With initial conditions

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

Maple. Time used: 0.014 (sec). Leaf size: 24
ode:=(1+x)*(x^2+1)*diff(y(x),x) = 2*x^2+x; 
ic:=y(0) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {\ln \left (x +1\right )}{2}+\frac {3 \ln \left (x^{2}+1\right )}{4}-\frac {\arctan \left (x \right )}{2}+1 \]
Mathematica. Time used: 0.01 (sec). Leaf size: 29
ode=(x+1)*(x^2+1)*D[y[x],x]==2*x^2+x; 
ic={y[0]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{4} \left (-2 \arctan (x)+3 \log \left (x^2+1\right )+2 \log (x+1)+4\right ) \]
Sympy. Time used: 0.218 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x**2 - x + (x + 1)*(x**2 + 1)*Derivative(y(x), x),0) 
ics = {y(0): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {\log {\left (x + 1 \right )}}{2} + \frac {3 \log {\left (x^{2} + 1 \right )}}{4} - \frac {\operatorname {atan}{\left (x \right )}}{2} + 1 \]