23.1.14 problem 2(d)

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

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

With initial conditions

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

Solution by Maple

Time used: 0.015 (sec). Leaf size: 13

dsolve([x*diff(y(x),x)=x+y(x),y(-1) = -1],y(x), singsol=all)
 
\[ y \left (x \right ) = \left (\ln \left (x \right )+1-i \pi \right ) x \]

Solution by Mathematica

Time used: 0.027 (sec). Leaf size: 16

DSolve[{x*D[y[x],x]==x+y[x],y[-1]==-1},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to x (\log (x)-i \pi +1) \]