62.29.13 problem Ex 15

Internal problem ID [12885]
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 15
Date solved : Wednesday, March 05, 2025 at 08:49:45 PM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }-y&=x \,{\mathrm e}^{x}+\cos \left (x \right )^{2} \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 61
ode:=diff(diff(diff(y(x),x),x),x)-y(x) = x*exp(x)+cos(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {1}{2}+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 )-\frac {\cos \left (2 x \right )}{130}-\frac {4 \sin \left (2 x \right )}{65}+\frac {\left (3 x^{2}+18 c_{1} -6 x +4\right ) {\mathrm e}^{x}}{18} \]
Mathematica. Time used: 2.002 (sec). Leaf size: 260
ode=D[y[x],{x,3}]-y[x]==x*Exp[x]+Cos[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-x/2} \left (e^{3 x/2} \int _1^x\frac {1}{6} e^{-K[1]} \left (\cos (2 K[1])+2 e^{K[1]} K[1]+1\right )dK[1]+\cos \left (\frac {\sqrt {3} x}{2}\right ) \int _1^x-\frac {e^{\frac {K[2]}{2}} \left (\cos (2 K[2])+2 e^{K[2]} K[2]+1\right ) \left (\sqrt {3} \cos \left (\frac {1}{2} \sqrt {3} K[2]\right )-3 \sin \left (\frac {1}{2} \sqrt {3} K[2]\right )\right )}{6 \sqrt {3}}dK[2]+\sin \left (\frac {\sqrt {3} x}{2}\right ) \int _1^x-\frac {e^{\frac {K[3]}{2}} \left (\cos (2 K[3])+2 e^{K[3]} K[3]+1\right ) \left (3 \cos \left (\frac {1}{2} \sqrt {3} K[3]\right )+\sqrt {3} \sin \left (\frac {1}{2} \sqrt {3} K[3]\right )\right )}{6 \sqrt {3}}dK[3]+c_1 e^{3 x/2}+c_2 \cos \left (\frac {\sqrt {3} x}{2}\right )+c_3 \sin \left (\frac {\sqrt {3} x}{2}\right )\right ) \]
Sympy. Time used: 11.229 (sec). Leaf size: 63
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*exp(x) - y(x) - cos(x)**2 + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \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}} + \left (C_{3} + \frac {x^{2}}{6} - \frac {x}{3}\right ) e^{x} - \frac {4 \sin {\left (2 x \right )}}{65} - \frac {\cos {\left (2 x \right )}}{130} - \frac {1}{2} \]