82.54.10 problem Ex. 10

Internal problem ID [18955]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter IX. Equations of the second order. problems at end of chapter at page 120
Problem number : Ex. 10
Date solved : Monday, March 31, 2025 at 06:26:30 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 )&=0 \end{align*}

Using reduction of order method given that one solution is

\begin{align*} y&=x \end{align*}

Maple. Time used: 0.194 (sec). Leaf size: 48
ode:=(x*sin(x)+cos(x))*diff(diff(y(x),x),x)-x*cos(x)*diff(y(x),x)+y(x)*cos(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \cos \left (x \right ) \left (c_1 -c_2 \int {\mathrm e}^{\int \frac {-\cos \left (x \right ) \cot \left (x \right )+2 x \sin \left (x \right ) \tan \left (x \right )+2 \sin \left (x \right )}{x \sin \left (x \right )+\cos \left (x \right )}d x} \sin \left (x \right )d x \right ) \]
Mathematica. Time used: 0.238 (sec). Leaf size: 16
ode=(x*Sin[x]+Cos[x])*D[y[x],{x,2}]-x*Cos[x]*D[y[x],x]+y[x]*Cos[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to 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*sin(x) + cos(x))*Derivative(y(x), (x, 2)) + y(x)*cos(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False