23.3.171 problem 173

Internal problem ID [5885]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 173
Date solved : Tuesday, September 30, 2025 at 02:05:47 PM
CAS classification : [[_2nd_order, _missing_y]]

\begin{align*} f \left (x \right ) y^{\prime }+y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 17
ode:=f(x)*diff(y(x),x)+diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 +\int {\mathrm e}^{-\int f \left (x \right )d x}d x c_2 \]
Mathematica. Time used: 0.025 (sec). Leaf size: 33
ode=f[x]*D[y[x],x] + D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \int _1^x\exp \left (\int _1^{K[2]}-f(K[1])dK[1]\right ) c_1dK[2]+c_2 \end{align*}
Sympy. Time used: 0.239 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(f(x)*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{2} \int e^{- \int f{\left (x \right )}\, dx}\, dx \]