78.11.16 problem 11

Internal problem ID [18216]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 3. Second order linear equations. Section 16. The Use of a Known Solution to find Another. Problems at page 121
Problem number : 11
Date solved : Monday, March 31, 2025 at 05:22:56 PM
CAS classification : [[_2nd_order, _with_linear_symmetries], [_2nd_order, _linear, `_with_symmetry_[0,F(x)]`]]

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

Maple. Time used: 0.002 (sec). Leaf size: 22
ode:=diff(diff(y(x),x),x)-f(x)*diff(y(x),x)+(f(x)-1)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\int {\mathrm e}^{-2 x +\int f \left (x \right )d x}d x c_1 +c_2 \right ) {\mathrm e}^{x} \]
Mathematica
ode=D[y[x],{x,2}] -f[x]*D[y[x],x]+(f[x]-1)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
f = Function("f") 
ode = Eq((f(x) - 1)*y(x) - f(x)*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : cannot determine truth value of Relational