3.8 problem 1(h)

Internal problem ID [6164]

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

CAS Maple gives this as type [_linear]

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

Solution by Maple

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

dsolve((1+x^2)*diff(y(x),x)+2*x*y(x)=cot(x),y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {\ln \left (\sin \left (x \right )\right )+c_{1}}{x^{2}+1} \]

Solution by Mathematica

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

DSolve[(1+x^2)*y'[x]+2*x*y[x]==Cot[x],y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to \frac {\log (\sin (x))+c_1}{x^2+1} \]