38.6.33 problem 33

Internal problem ID [8463]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 2. First order differential equations. Section 2.3 Linear equations. Exercises 2.3 at page 63
Problem number : 33
Date solved : Tuesday, September 30, 2025 at 05:37:31 PM
CAS classification : [_linear]

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

With initial conditions

\begin{align*} y \left (1\right )&=10 \\ \end{align*}
Maple. Time used: 0.020 (sec). Leaf size: 19
ode:=(1+x)*diff(y(x),x)+y(x) = ln(x); 
ic:=[y(1) = 10]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {x \ln \left (x \right )-x +21}{x +1} \]
Mathematica. Time used: 0.02 (sec). Leaf size: 20
ode=(x+1)*D[y[x],x]+y[x]==Log[x]; 
ic={y[1]==10}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {-x+x \log (x)+21}{x+1} \end{align*}
Sympy. Time used: 0.137 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + 1)*Derivative(y(x), x) + y(x) - log(x),0) 
ics = {y(1): 10} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x \log {\left (x \right )} - x + 21}{x + 1} \]