54.3.214 problem 1229

Internal problem ID [12509]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 2, linear second order
Problem number : 1229
Date solved : Wednesday, October 01, 2025 at 01:46:08 AM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

\begin{align*} \left (x^{2}+1\right ) y^{\prime \prime }+4 x y^{\prime }+2 y-2 \cos \left (x \right )+2 x&=0 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 31
ode:=(x^2+1)*diff(diff(y(x),x),x)+4*x*diff(y(x),x)+2*y(x)-2*cos(x)+2*x = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-x^{3}+3 c_1 x -6 \cos \left (x \right )+3 c_2}{3 x^{2}+3} \]
Mathematica. Time used: 0.097 (sec). Leaf size: 58
ode=2*x - 2*Cos[x] + 2*y[x] + 4*x*D[y[x],x] + (1 + x^2)*D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {\int _1^x2 K[1] (K[1]-\cos (K[1]))dK[1]+x \int _1^x(2 \cos (K[2])-2 K[2])dK[2]+c_2 x+c_1}{x^2+1} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*x*Derivative(y(x), x) + 2*x + (x**2 + 1)*Derivative(y(x), (x, 2)) + 2*y(x) - 2*cos(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (-x*(x*Derivative(y(x), (x, 2)) + 2) - 2*y(x) + 2*cos(x) - Derivative(y(x), (x, 2)))/(4*x) cannot be solved by the factorable group method