23.1.18 problem 2(h)

Internal problem ID [4108]
Book : Theory and solutions of Ordinary Differential equations, Donald Greenspan, 1960
Section : Chapter 2. First order equations. Exercises at page 14
Problem number : 2(h)
Date solved : Monday, January 27, 2025 at 08:09:03 AM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }&=x +\frac {1}{x} \end{align*}

With initial conditions

\begin{align*} y \left (-2\right )&=5 \end{align*}

Solution by Maple

Time used: 0.032 (sec). Leaf size: 20

dsolve([diff(y(x),x)=x+1/x,y(-2) = 5],y(x), singsol=all)
 
\[ y \left (x \right ) = \frac {x^{2}}{2}+\ln \left (x \right )+3-\ln \left (2\right )-i \pi \]

Solution by Mathematica

Time used: 0.004 (sec). Leaf size: 25

DSolve[{D[y[x],x]==x+1/x,y[-2]==5},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {x^2}{2}+\log \left (\frac {x}{2}\right )-i \pi +3 \]