29.8.17 problem 222

Internal problem ID [4822]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 8
Problem number : 222
Date solved : Tuesday, March 04, 2025 at 07:21:12 PM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (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 \right ) = \left (\frac {1}{2} x^{2}+x +c_{1} \right ) \left (x +1\right )^{2} \]
Mathematica. Time used: 0.035 (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]
 
\[ y(x)\to (x+1)^2 \left (\frac {x^2}{2}+x+c_1\right ) \]
Sympy. Time used: 0.367 (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 \]