15.6.2 problem 2

Internal problem ID [2959]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 10, page 41
Problem number : 2
Date solved : Monday, January 27, 2025 at 07:04:26 AM
CAS classification : [_linear]

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

Solution by Maple

Time used: 0.000 (sec). Leaf size: 15

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

Solution by Mathematica

Time used: 0.069 (sec). Leaf size: 20

DSolve[D[y[x],x]-x*y[x]==Exp[x^2/2]*Cos[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to e^{\frac {x^2}{2}} (\sin (x)+c_1) \]