62.27.5 problem Ex 5

Internal problem ID [12864]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter VII, Linear differential equations with constant coefficients. Article 50. Method of undetermined coefficients. Page 107
Problem number : Ex 5
Date solved : Wednesday, March 05, 2025 at 08:48:53 PM
CAS classification : [[_3rd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.005 (sec). Leaf size: 40
ode:=diff(diff(diff(y(x),x),x),x)-y(x) = x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -x^{2}+{\mathrm e}^{x} c_{1} +c_{2} {\mathrm e}^{-\frac {x}{2}} \cos \left (\frac {\sqrt {3}\, x}{2}\right )+c_3 \,{\mathrm e}^{-\frac {x}{2}} \sin \left (\frac {\sqrt {3}\, x}{2}\right ) \]
Mathematica. Time used: 0.004 (sec). Leaf size: 59
ode=D[y[x],{x,3}]-y[x]==x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -x^2+c_1 e^x+c_2 e^{-x/2} \cos \left (\frac {\sqrt {3} x}{2}\right )+c_3 e^{-x/2} \sin \left (\frac {\sqrt {3} x}{2}\right ) \]
Sympy. Time used: 0.130 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 - y(x) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{3} e^{x} - x^{2} + \left (C_{1} \sin {\left (\frac {\sqrt {3} x}{2} \right )} + C_{2} \cos {\left (\frac {\sqrt {3} x}{2} \right )}\right ) e^{- \frac {x}{2}} \]