29.5.29 problem 146

Internal problem ID [4746]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 5
Problem number : 146
Date solved : Tuesday, March 04, 2025 at 07:13:39 PM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 14
ode:=x*diff(y(x),x) = 1+x^3+y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {1}{2} x^{3}-1+c_{1} x \]
Mathematica. Time used: 0.029 (sec). Leaf size: 18
ode=x D[y[x],x]==1+x^3+y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {x^3}{2}+c_1 x-1 \]
Sympy. Time used: 0.269 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 + x*Derivative(y(x), x) - y(x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} x + \frac {x^{3}}{2} - 1 \]