44.14.16 problem 2(h)

Internal problem ID [9340]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 2. Problems for Review and Discovery. Drill excercises. Page 105
Problem number : 2(h)
Date solved : Tuesday, September 30, 2025 at 06:16:40 PM
CAS classification : [[_2nd_order, _missing_y]]

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

With initial conditions

\begin{align*} y \left (1\right )&={\mathrm e} \\ y^{\prime }\left (1\right )&={\mathrm e}^{-1} \\ \end{align*}
Maple. Time used: 0.180 (sec). Leaf size: 47
ode:=diff(diff(y(x),x),x)-2*diff(y(x),x) = ln(x); 
ic:=[y(1) = exp(1), D(y)(1) = 1/exp(1)]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {\int _{1}^{x}\left (-{\mathrm e}^{2 \textit {\_z1}} \operatorname {Ei}_{1}\left (2 \textit {\_z1} \right )+{\mathrm e}^{2 \textit {\_z1}} \operatorname {Ei}_{1}\left (2\right )+2 \,{\mathrm e}^{-3+2 \textit {\_z1}}-\ln \left (\textit {\_z1} \right )\right )d \textit {\_z1}}{2}+{\mathrm e} \]
Mathematica. Time used: 2.681 (sec). Leaf size: 47
ode=D[y[x],{x,2}]-2*D[y[x],x]==Log[x]; 
ic={y[1]==Exp[1],Derivative[1][y][1]==1/Exp[1]}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \int _1^xe^{2 K[2]-3} \left (e^3 \int _1^{K[2]}e^{-2 K[1]} \log (K[1])dK[1]+1\right )dK[2]+e \end{align*}
Sympy. Time used: 0.796 (sec). Leaf size: 61
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-log(x) - 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {y(1): E, Subs(Derivative(y(x), x), x, 1): exp(-1)} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {x \log {\left (x \right )}}{2} + \frac {x}{2} + \left (\frac {\operatorname {Ei}{\left (- 2 x \right )}}{4} + \frac {- e^{3} \operatorname {Ei}{\left (-2 \right )} + 2}{4 e^{3}}\right ) e^{2 x} - \frac {\log {\left (x \right )}}{4} + \frac {- e - 1 + 2 e^{2}}{2 e} \]