83.49.18 problem Ex 18 page 133

Internal problem ID [19560]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Book Solved Excercises. Chapter VIII. Linear equations of second order
Problem number : Ex 18 page 133
Date solved : Monday, March 31, 2025 at 07:33:28 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} \left (1+x \right )^{2} 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.004 (sec). Leaf size: 26
ode:=(1+x)^2*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);
 
\[ y = \left (c_2 +2 \ln \left (1+x \right )\right ) \sin \left (\ln \left (1+x \right )\right )+\cos \left (\ln \left (1+x \right )\right ) c_1 \]
Mathematica. Time used: 0.042 (sec). Leaf size: 31
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]
 
\[ y(x)\to (1+c_1) \cos (\log (x+1))+(2 \log (x+1)+c_2) \sin (\log (x+1)) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + 1)**2*Derivative(y(x), (x, 2)) + (x + 1)*Derivative(y(x), x) + 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)) - 2*x*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