69.17.8 problem 558

Internal problem ID [18344]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 2 (Higher order ODEs). Section 15.3 Nonhomogeneous linear equations with constant coefficients. Superposition principle. Exercises page 137
Problem number : 558
Date solved : Thursday, October 02, 2025 at 03:10:40 PM
CAS classification : [[_2nd_order, _missing_y]]

\begin{align*} y^{\prime \prime }-4 y^{\prime }&=2 \cos \left (4 x \right )^{2} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 28
ode:=diff(diff(y(x),x),x)-4*diff(y(x),x) = 2*cos(4*x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{4 x} c_1}{4}-\frac {\sin \left (8 x \right )}{160}-\frac {\cos \left (8 x \right )}{80}-\frac {x}{4}+c_2 \]
Mathematica. Time used: 3.305 (sec). Leaf size: 47
ode=D[y[x],{x,2}]-4*D[y[x],x]==2*Cos[4*x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \int _1^xe^{4 K[2]} \left (c_1+\int _1^{K[2]}e^{-4 K[1]} (\cos (8 K[1])+1)dK[1]\right )dK[2]+c_2 \end{align*}
Sympy. Time used: 0.506 (sec). Leaf size: 44
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*cos(4*x)**2 - 4*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{2} e^{4 x} - \frac {x}{4} - \frac {\sin ^{2}{\left (4 x \right )}}{20} - \frac {\sin {\left (4 x \right )} \cos {\left (4 x \right )}}{80} - \frac {3 \cos ^{2}{\left (4 x \right )}}{40} \]