15.11.11 problem 11

Internal problem ID [3121]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 19, page 86
Problem number : 11
Date solved : Tuesday, March 04, 2025 at 04:00:34 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.005 (sec). Leaf size: 39
ode:=diff(diff(y(x),x),x)-diff(y(x),x)-6*y(x) = x^3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {{\mathrm e}^{-2 x} \left (\left (x^{3}-\frac {1}{2} x^{2}+\frac {7}{6} x -\frac {13}{36}\right ) {\mathrm e}^{2 x}-6 \,{\mathrm e}^{5 x} c_2 -6 c_{1} \right )}{6} \]
Mathematica. Time used: 0.017 (sec). Leaf size: 41
ode=D[y[x],{x,2}]-D[y[x],x]-6*y[x]==x^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{216} \left (-36 x^3+18 x^2-42 x+13\right )+c_1 e^{-2 x}+c_2 e^{3 x} \]
Sympy. Time used: 0.190 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 - 6*y(x) - Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- 2 x} + C_{2} e^{3 x} - \frac {x^{3}}{6} + \frac {x^{2}}{12} - \frac {7 x}{36} + \frac {13}{216} \]