23.1.229 problem 225

Internal problem ID [4836]
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 : 225
Date solved : Tuesday, September 30, 2025 at 08:43:44 AM
CAS classification : [_linear]

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