4.66 problem 63

Internal problem ID [6533]

Book: Own collection of miscellaneous problems
Section: section 4.0
Problem number: 63.
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

\[ \boxed {\frac {x y^{\prime \prime }}{1-x}+y-\cos \left (x \right )=0} \]

Solution by Maple

Time used: 0.125 (sec). Leaf size: 162

dsolve(x/(1-x)*diff(y(x),x$2)+y(x)=cos(x),y(x), singsol=all)
 

\[ y \left (x \right ) = \left (\operatorname {BesselI}\left (0, -x \right )+\operatorname {BesselI}\left (1, -x \right )\right ) x c_{2} +x \left (-\operatorname {BesselK}\left (0, -x \right )+\operatorname {BesselK}\left (1, -x \right )\right ) c_{1} +x \left (\left (\operatorname {BesselI}\left (0, -x \right )+\operatorname {BesselI}\left (1, -x \right )\right ) \left (\int \frac {\left (-\operatorname {BesselK}\left (0, -x \right )+\operatorname {BesselK}\left (1, -x \right )\right ) \cos \left (x \right ) \left (x -1\right )}{\operatorname {BesselK}\left (1, -x \right ) \operatorname {BesselI}\left (0, x\right ) x^{2}-\operatorname {BesselK}\left (0, -x \right ) \operatorname {BesselI}\left (1, x\right ) x^{2}+x +1}d x \right )+\left (\int \frac {\left (\operatorname {BesselI}\left (0, x\right )-\operatorname {BesselI}\left (1, x\right )\right ) \cos \left (x \right ) \left (x -1\right )}{\operatorname {BesselK}\left (1, -x \right ) \operatorname {BesselI}\left (0, x\right ) x^{2}-\operatorname {BesselK}\left (0, -x \right ) \operatorname {BesselI}\left (1, x\right ) x^{2}+x +1}d x \right ) \left (\operatorname {BesselK}\left (0, -x \right )-\operatorname {BesselK}\left (1, -x \right )\right )\right ) \]

Solution by Mathematica

Time used: 3.942 (sec). Leaf size: 95

DSolve[x/(1-x)*y''[x]+y[x]==Cos[x],y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to e^{-x} x \operatorname {HypergeometricU}\left (\frac {1}{2},2,2 x\right ) \left (\int _1^x2 \sqrt {\pi } (\operatorname {BesselI}(0,K[1])-\operatorname {BesselI}(1,K[1])) \cos (K[1]) (K[1]-1)dK[1]+c_1\right )+x (\operatorname {BesselI}(0,x)-\operatorname {BesselI}(1,x)) \left (\int _1^x-((K_0(K[2])+K_1(K[2])) \cos (K[2]) (K[2]-1))dK[2]+c_2\right ) \\ \end{align*}