60.3.225 problem 1229

Internal problem ID [11235]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 2, linear second order
Problem number : 1229
Date solved : Monday, January 27, 2025 at 10:49:34 PM
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*}

Solution by Maple

Time used: 0.004 (sec). Leaf size: 31

dsolve((x^2+1)*diff(diff(y(x),x),x)+4*x*diff(y(x),x)+2*y(x)-2*cos(x)+2*x=0,y(x), singsol=all)
 
\[ y = \frac {-x^{3}+3 c_{1} x -6 \cos \left (x \right )+3 c_{2}}{3 x^{2}+3} \]

Solution by Mathematica

Time used: 0.187 (sec). Leaf size: 58

DSolve[2*x - 2*Cos[x] + 2*y[x] + 4*x*D[y[x],x] + (1 + x^2)*D[y[x],{x,2}] == 0,y[x],x,IncludeSingularSolutions -> True]
 
\[ 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} \]