40.13.12 problem 32

Internal problem ID [6766]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 18. Linear equations with variable coefficients (Equations of second order). Supplemetary problems. Page 120
Problem number : 32
Date solved : Monday, January 27, 2025 at 02:29:44 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Solution by Maple

Time used: 0.056 (sec). Leaf size: 17

dsolve((x*sin(x)+cos(x))*diff(y(x),x$2)-x*cos(x)*diff(y(x),x)+y(x)*cos(x)=x,y(x), singsol=all)
 
\[ y = -\cos \left (x \right ) c_1 +c_2 x -\sin \left (x \right ) \]

Solution by Mathematica

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

DSolve[(x*Sin[x]+Cos[x])*D[y[x],{x,2}]-x*Cos[x]*D[y[x],x]+y[x]*Cos[x]==x,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to -\sin (x)+c_1 x-c_2 \cos (x) \]