23.3.19 problem 8(i)

Internal problem ID [4160]
Book : Theory and solutions of Ordinary Differential equations, Donald Greenspan, 1960
Section : Chapter 4. The general linear differential equation of order n. Exercises at page 63
Problem number : 8(i)
Date solved : Tuesday, March 04, 2025 at 05:54:34 PM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.004 (sec). Leaf size: 33
ode:=diff(diff(diff(diff(y(x),x),x),x),x)+10*diff(diff(y(x),x),x)+9*y(x) = cos(2*x+3); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = -\frac {\cos \left (3+2 x \right )}{15}+\cos \left (x \right ) c_{1} +c_{2} \sin \left (x \right )+c_3 \cos \left (3 x \right )+c_4 \sin \left (3 x \right ) \]
Mathematica. Time used: 0.113 (sec). Leaf size: 40
ode=D[y[x],{x,4}]+10*D[y[x],{x,2}]+9*y[x]==Cos[2*x+3]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {1}{15} \cos (2 x+3)+c_3 \cos (x)+c_1 \cos (3 x)+c_4 \sin (x)+c_2 \sin (3 x) \]
Sympy. Time used: 0.121 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(9*y(x) - cos(2*x + 3) + 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_{1} \sin {\left (x \right )} + C_{2} \sin {\left (3 x \right )} + C_{3} \cos {\left (x \right )} + C_{4} \cos {\left (3 x \right )} - \frac {\cos {\left (2 x + 3 \right )}}{15} \]