58.2.21 problem 22

Internal problem ID [9144]
Book : Second order enumerated odes
Section : section 2
Problem number : 22
Date solved : Sunday, March 30, 2025 at 02:23:25 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.191 (sec). Leaf size: 280
ode:=(x^2+1)*diff(diff(y(x),x),x)+(1+x)*diff(y(x),x)+y(x) = 4*cos(ln(1+x)); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} \text {Solution too large to show}\end{align*}

Mathematica
ode=(1+x^2)*D[y[x],{x,2}]+(1+x)*D[y[x],x]+y[x]==4*Cos[Log[1+x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

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