47.5.12 problem 12

Internal problem ID [7501]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 2. Linear homogeneous equations. Section 2.3.4 problems. page 104
Problem number : 12
Date solved : Sunday, March 30, 2025 at 12:11:01 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple
ode:=(cos(x)-sin(x))*diff(diff(y(x),x),x)-2*sin(x)*diff(y(x),x)+(cos(x)+sin(x))*y(x) = (cos(x)-sin(x))^2; 
dsolve(ode,y(x), singsol=all);
 
\[ \text {No solution found} \]
Mathematica. Time used: 15.357 (sec). Leaf size: 7186
ode=(Cos[x]-Sin[x])*D[y[x],{x,2}]-2*Sin[x]*D[y[x],x]+(Cos[x]+Sin[x])*y[x]==(Cos[x]-Sin[x])^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Too large to display

Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(-sin(x) + cos(x))**2 + (-sin(x) + cos(x))*Derivative(y(x), (x, 2)) + (sin(x) + cos(x))*y(x) - 2*sin(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -y(x)/2 - y(x)/(2*tan(x)) - cos(x) + Derivative(y(x), x) + Derivative(y(x), (x, 2))/2 - Derivative(y(x), (x, 2))/(2*tan(x)) + 1/(2*sin(x)) cannot be solved by the factorable group method