28.2.21 problem 21

Internal problem ID [4464]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 4. Linear Differential Equations. Page 183
Problem number : 21
Date solved : Sunday, March 30, 2025 at 03:23:18 AM
CAS classification : [[_high_order, _missing_y]]

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

Maple. Time used: 0.003 (sec). Leaf size: 36
ode:=diff(diff(diff(diff(y(x),x),x),x),x)+2*diff(diff(y(x),x),x) = 7*x-3*cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {7 x^{3}}{12}-\frac {\cos \left (\sqrt {2}\, x \right ) c_1}{2}-\frac {\sin \left (\sqrt {2}\, x \right ) c_2}{2}+3 \cos \left (x \right )+c_3 x +c_4 \]
Mathematica. Time used: 0.572 (sec). Leaf size: 51
ode=D[y[x],{x,4}]+2*D[y[x],{x,2}]==7*x-3*Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {7 x^3}{12}+3 \cos (x)+c_4 x-\frac {1}{2} c_1 \cos \left (\sqrt {2} x\right )-\frac {1}{2} c_2 \sin \left (\sqrt {2} x\right )+c_3 \]
Sympy. Time used: 0.106 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-7*x + 3*cos(x) + 2*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} + C_{2} x + C_{3} \sin {\left (\sqrt {2} x \right )} + C_{4} \cos {\left (\sqrt {2} x \right )} + \frac {7 x^{3}}{12} + 3 \cos {\left (x \right )} \]