68.15.40 problem 40

Internal problem ID [17766]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 4. Higher Order Equations. Exercises 4.7, page 195
Problem number : 40
Date solved : Thursday, October 02, 2025 at 02:27:55 PM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

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

With initial conditions

\begin{align*} y \left (1\right )&=2 \\ y^{\prime }\left (1\right )&=0 \\ \end{align*}
Maple. Time used: 0.037 (sec). Leaf size: 20
ode:=x^2*diff(diff(y(x),x),x)+4*x*diff(y(x),x)+2*y(x) = ln(x); 
ic:=[y(1) = 2, D(y)(1) = 0]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -\frac {9}{4 x^{2}}+\frac {5}{x}+\frac {\ln \left (x \right )}{2}-\frac {3}{4} \]
Mathematica. Time used: 0.011 (sec). Leaf size: 25
ode=x^2*D[y[x],{x,2}]+4*x*D[y[x],x]+2*y[x]==Log[x]; 
ic={y[1]==2,Derivative[1][y][1]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{4} \left (-\frac {9}{x^2}+\frac {20}{x}+2 \log (x)-3\right ) \end{align*}
Sympy. Time used: 0.173 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) + 4*x*Derivative(y(x), x) + 2*y(x) - log(x),0) 
ics = {y(1): 2, Subs(Derivative(y(x), x), x, 1): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {\log {\left (x \right )}}{2} - \frac {3}{4} + \frac {5}{x} - \frac {9}{4 x^{2}} \]