12.2.29 problem 29

Internal problem ID [1565]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Linear first order. Section 2.1 Page 41
Problem number : 29
Date solved : Monday, January 27, 2025 at 05:00:20 AM
CAS classification : [_linear]

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

With initial conditions

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

Solution by Maple

Time used: 0.011 (sec). Leaf size: 21

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

Solution by Mathematica

Time used: 0.030 (sec). Leaf size: 26

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