62.29.7 problem Ex 8

Internal problem ID [12887]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter VII, Linear differential equations with constant coefficients. Article 52. Summary. Page 117
Problem number : Ex 8
Date solved : Monday, March 31, 2025 at 07:23:38 AM
CAS classification : [[_3rd_order, _missing_y]]

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

Maple. Time used: 0.002 (sec). Leaf size: 31
ode:=diff(diff(diff(y(x),x),x),x)+2*diff(diff(y(x),x),x)+diff(y(x),x) = x^2-x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\left (c_1 x +c_1 +c_2 \right ) {\mathrm e}^{-x}+\frac {x^{3}}{3}-\frac {5 x^{2}}{2}+8 x +c_3 \]
Mathematica. Time used: 7.639 (sec). Leaf size: 142
ode=D[y[x],{x,3}]+2*D[y[x],{x,2}]+D[y[x],x]==x^2-x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \int _1^xe^{-K[1]} \left (c_1+c_2 K[1]+e^{K[1]} \left (K[1]^2-5 K[1]+8\right )\right )dK[1]+c_3 \\ y(x)\to \frac {x^3}{3}-\frac {5 x^2}{2}+x \left (8-c_2 e^{-x}\right )-c_2 e^{-x}-\frac {35}{6}+\frac {2 c_2}{e}+c_3 \\ y(x)\to \frac {x^3}{3}-\frac {5 x^2}{2}+8 x-c_1 \cosh (x)+c_1 \sinh (x)-\frac {35}{6}+\frac {c_1}{e}+c_3 \\ \end{align*}
Sympy. Time used: 0.179 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + x + Derivative(y(x), x) + 2*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + \frac {x^{3}}{3} - \frac {5 x^{2}}{2} + 8 x + \left (C_{2} + C_{3} x\right ) e^{- x} \]