7.3.16 problem 16

Internal problem ID [56]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.4 (separable equations). Problems at page 43
Problem number : 16
Date solved : Saturday, March 29, 2025 at 04:28:08 PM
CAS classification : [_separable]

\begin{align*} \left (x^{2}+1\right ) \tan \left (y\right ) y^{\prime }&=x \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 16
ode:=(x^2+1)*tan(y(x))*diff(y(x),x) = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \arccos \left (\frac {1}{\sqrt {x^{2}+1}\, c_1}\right ) \]
Mathematica. Time used: 15.509 (sec). Leaf size: 63
ode=(x^2+1)*Tan[y[x]]*D[y[x],x]==x; 
DSolve[ode,y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\arccos \left (\frac {e^{-c_1}}{\sqrt {x^2+1}}\right ) \\ y(x)\to \arccos \left (\frac {e^{-c_1}}{\sqrt {x^2+1}}\right ) \\ y(x)\to -\frac {\pi }{2} \\ y(x)\to \frac {\pi }{2} \\ \end{align*}
Sympy. Time used: 0.484 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x + (x**2 + 1)*tan(y(x))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \operatorname {acos}{\left (\frac {C_{1}}{\sqrt {x^{2} + 1}} \right )} + 2 \pi , \ y{\left (x \right )} = \operatorname {acos}{\left (\frac {C_{1}}{\sqrt {x^{2} + 1}} \right )}\right ] \]