75.17.17 problem 567

Internal problem ID [17066]
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 : 567
Date solved : Tuesday, January 28, 2025 at 09:48:51 AM
CAS classification : [[_2nd_order, _missing_y]]

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

Solution by Maple

Time used: 0.003 (sec). Leaf size: 42

dsolve(diff(y(x),x$2)+diff(y(x),x)=cos(x)^2+exp(x)+x^2,y(x), singsol=all)
 
\[ y = -x^{2}+\frac {x^{3}}{3}-c_{1} {\mathrm e}^{-x}+\frac {{\mathrm e}^{x}}{2}-\frac {\cos \left (2 x \right )}{10}+\frac {\sin \left (2 x \right )}{20}+\frac {5 x}{2}+c_{2} \]

Solution by Mathematica

Time used: 6.045 (sec). Leaf size: 60

DSolve[D[y[x],{x,2}]+D[y[x],x]==Cos[x]^2+Exp[x]+x^2,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \int _1^xe^{-K[2]} \left (c_1+\int _1^{K[2]}\frac {1}{2} e^{K[1]} \left (2 K[1]^2+2 e^{K[1]}+\cos (2 K[1])+1\right )dK[1]\right )dK[2]+c_2 \]