15.8.52 problem 55

Internal problem ID [3055]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 12, page 46
Problem number : 55
Date solved : Sunday, March 30, 2025 at 01:14:39 AM
CAS classification : [_linear]

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

With initial conditions

\begin{align*} y \left (2\right )&=2 \end{align*}

Maple. Time used: 0.029 (sec). Leaf size: 19
ode:=2*x*y(x)-2*y(x)+1+x*(x-1)*diff(y(x),x) = 0; 
ic:=y(2) = 2; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {-x -\ln \left (x -1\right )+10}{x^{2}} \]
Mathematica. Time used: 0.04 (sec). Leaf size: 17
ode=(2*x*y[x]-2*y[x]+1)+x*(x-1)*D[y[x],x]==0; 
ic={y[2]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {x+\log (x-1)-10}{x^2} \]
Sympy. Time used: 0.267 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(x - 1)*Derivative(y(x), x) + 2*x*y(x) - 2*y(x) + 1,0) 
ics = {y(2): 2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {-1 - \frac {\log {\left (x - 1 \right )}}{x} + \frac {10}{x}}{x} \]