66.2.26 problem Problem 35

Internal problem ID [13925]
Book : Differential equations and the calculus of variations by L. ElSGOLTS. MIR PUBLISHERS, MOSCOW, Third printing 1977.
Section : Chapter 2, DIFFERENTIAL EQUATIONS OF THE SECOND ORDER AND HIGHER. Problems page 172
Problem number : Problem 35
Date solved : Tuesday, January 28, 2025 at 06:08:48 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.004 (sec). Leaf size: 28

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

Solution by Mathematica

Time used: 0.061 (sec). Leaf size: 37

DSolve[D[y[x],{x,2}]-2*D[y[x],x] +2*y[x]==x*Exp[x]*Cos[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {1}{8} e^x \left (\left (2 x^2-1+8 c_1\right ) \sin (x)+2 (x+4 c_2) \cos (x)\right ) \]