3.10 problem 1(j)

Internal problem ID [6166]

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: 1(j).
ODE order: 1.
ODE degree: 1.

CAS Maple gives this as type [_linear]

\[ \boxed {y+x y \cot \left (x \right )+x y^{\prime }=x} \]

Solution by Maple

Time used: 0.0 (sec). Leaf size: 19

dsolve(y(x)-x+x*y(x)*cot(x)+x*diff(y(x),x)=0,y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {-\cot \left (x \right ) x +1+\csc \left (x \right ) c_{1}}{x} \]

Solution by Mathematica

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

DSolve[y[x]-x+x*y[x]*Cot[x]+x*y'[x]==0,y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to \frac {-x \cot (x)+c_1 \csc (x)+1}{x} \]