24.1.2 problem 1(b)

Internal problem ID [4191]
Book : Elementary Differential equations, Chaundy, 1969
Section : Exercises 3, page 60
Problem number : 1(b)
Date solved : Sunday, March 30, 2025 at 02:42:06 AM
CAS classification : [[_linear, `class A`]]

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

Maple. Time used: 0.001 (sec). Leaf size: 23
ode:=diff(y(x),x)-y(x) = x^3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -x^{3}-3 x^{2}-6 x -6+{\mathrm e}^{x} c_1 \]
Mathematica. Time used: 0.047 (sec). Leaf size: 26
ode=D[y[x],x]-y[x]==x^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -x^3-3 x^2-6 x+c_1 e^x-6 \]
Sympy. Time used: 0.110 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 - y(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{x} - x^{3} - 3 x^{2} - 6 x - 6 \]