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 : Wednesday, March 05, 2025 at 02:45:03 AM
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*}

Maple. Time used: 0.056 (sec). Leaf size: 17
ode:=(x*sin(x)+cos(x))*diff(diff(y(x),x),x)-x*cos(x)*diff(y(x),x)+y(x)*cos(x) = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\cos \left (x \right ) c_1 +c_2 x -\sin \left (x \right ) \]
Mathematica. Time used: 0.65 (sec). Leaf size: 20
ode=(x*Sin[x]+Cos[x])*D[y[x],{x,2}]-x*Cos[x]*D[y[x],x]+y[x]*Cos[x]==x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\sin (x)+c_1 x-c_2 \cos (x) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*cos(x)*Derivative(y(x), x) - x + (x*sin(x) + cos(x))*Derivative(y(x), (x, 2)) + y(x)*cos(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (x*tan(x)*Derivative(y(x), (x, 2)) - x/cos(x) + y(x) + Derivative(y(x), (x, 2)))/x cannot be solved by the factorable group method