23.1.353 problem 339

Internal problem ID [4960]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 339
Date solved : Tuesday, September 30, 2025 at 09:05:49 AM
CAS classification : [_linear]

\begin{align*} 2 \left (x^{2}+x +1\right ) y^{\prime }&=1+8 x^{2}-\left (1+2 x \right ) y \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 19
ode:=2*(x^2+x+1)*diff(y(x),x) = 1+8*x^2-(2*x+1)*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = 2 x -3+\frac {c_1}{\sqrt {x^{2}+x +1}} \]
Mathematica. Time used: 0.111 (sec). Leaf size: 23
ode=2*(1+x+x^2)*D[y[x],x]==1+8*x^2-(1+2*x)*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {c_1}{\sqrt {x^2+x+1}}+2 x-3 \end{align*}
Sympy. Time used: 1.051 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-8*x**2 + (2*x + 1)*y(x) + (2*x**2 + 2*x + 2)*Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1}}{\sqrt {x^{2} + x + 1}} + 2 x - 3 \]