50.3.16 problem 2(f)

Internal problem ID [7840]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 1. What is a differential equation. Section 1.4 First Order Linear Equations. Page 15
Problem number : 2(f)
Date solved : Monday, January 27, 2025 at 03:24:30 PM
CAS classification : [_separable]

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

With initial conditions

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

Solution by Maple

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

dsolve([x^2*diff(y(x),x)+x*y(x)=2*x,y(1) = 1],y(x), singsol=all)
 
\[ y = \frac {-1+2 x}{x} \]

Solution by Mathematica

Time used: 0.041 (sec). Leaf size: 12

DSolve[{x^2*D[y[x],x]+x*y[x]==2*x,{y[1]==1}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to 2-\frac {1}{x} \]