20.11.2 problem Problem 2

Internal problem ID [3784]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 8, Linear differential equations of order n. Section 8.9, Reduction of Order. page 572
Problem number : Problem 2
Date solved : Sunday, March 30, 2025 at 02:08:30 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using reduction of order method given that one solution is

\begin{align*} y&={\mathrm e}^{x} \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 13
ode:=x*diff(diff(y(x),x),x)+(1-2*x)*diff(y(x),x)+(x-1)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} \left (c_2 \ln \left (x \right )+c_1 \right ) \]
Mathematica. Time used: 0.025 (sec). Leaf size: 17
ode=x*D[y[x],{x,2}]+(1-2*x)*D[y[x],x]+(x-1)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^x (c_2 \log (x)+c_1) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), (x, 2)) + (1 - 2*x)*Derivative(y(x), x) + (x - 1)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False