64.11.54 problem 54

Internal problem ID [13425]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.3. The method of undetermined coefficients. Exercises page 151
Problem number : 54
Date solved : Wednesday, March 05, 2025 at 09:58:00 PM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.007 (sec). Leaf size: 45
ode:=diff(diff(diff(diff(y(x),x),x),x),x)+10*diff(diff(y(x),x),x)+9*y(x) = sin(x)*sin(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (11+1152 c_{3} \right ) \cos \left (3 x \right )}{1152}+\frac {\left (x +96 c_4 \right ) \sin \left (3 x \right )}{96}+\frac {\left (-1+64 c_{1} \right ) \cos \left (x \right )}{64}+\frac {\sin \left (x \right ) \left (x +32 c_{2} \right )}{32} \]
Mathematica. Time used: 0.12 (sec). Leaf size: 129
ode=D[y[x],{x,4}]+10*D[y[x],{x,2}]+9*y[x]==Sin[x]*Sin[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \sin (x) \int _1^x\frac {1}{16} \sin ^2(2 K[3])dK[3]+\sin (3 x) \int _1^x-\frac {1}{12} \cos ^2(K[2]) (2 \cos (2 K[2])-1) \sin ^2(K[2])dK[2]+\cos (3 x) \int _1^x\frac {1}{12} \cos (K[1]) (2 \cos (2 K[1])+1) \sin ^3(K[1])dK[1]-\frac {1}{16} \sin ^4(x) \cos (x)+c_3 \cos (x)+c_1 \cos (3 x)+c_4 \sin (x)+c_2 \sin (3 x) \]
Sympy. Time used: 1.810 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(9*y(x) - sin(x)*sin(2*x) + 10*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 4)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{3} \cos {\left (x \right )} + C_{4} \cos {\left (3 x \right )} + \left (C_{1} + \frac {x}{96}\right ) \sin {\left (3 x \right )} + \left (C_{2} + \frac {x}{32}\right ) \sin {\left (x \right )} \]