15.15.9 problem 10

Internal problem ID [3213]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 24, page 109
Problem number : 10
Date solved : Sunday, March 30, 2025 at 01:21:21 AM
CAS classification : [[_3rd_order, _missing_y]]

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

Maple. Time used: 0.002 (sec). Leaf size: 38
ode:=diff(diff(diff(y(x),x),x),x)+2*diff(diff(y(x),x),x) = x*cos(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (-2 x -2\right ) \cos \left (2 x \right )}{32}+\frac {\left (-2 x +3\right ) \sin \left (2 x \right )}{32}+c_2 x +\frac {{\mathrm e}^{-2 x} c_1}{4}+c_3 \]
Mathematica. Time used: 1.598 (sec). Leaf size: 48
ode=D[y[x],{x,3}]+2*D[y[x],{x,2}]==x*Cos[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to c_3 x+\frac {1}{16} \left (-x \sin (2 x)-(x+1) \cos (2 x)+4 c_1 e^{-2 x}+3 \sin (x) \cos (x)\right )+c_2 \]
Sympy. Time used: 0.156 (sec). Leaf size: 42
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*cos(2*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} + C_{3} e^{- 2 x} + x \left (C_{2} - \frac {\sin {\left (2 x \right )}}{16} - \frac {\cos {\left (2 x \right )}}{16}\right ) + \frac {3 \sin {\left (2 x \right )}}{32} - \frac {\cos {\left (2 x \right )}}{16} \]