15.1.9 problem 9

Internal problem ID [2849]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 5, page 21
Problem number : 9
Date solved : Tuesday, March 04, 2025 at 02:51:06 PM
CAS classification : [_separable]

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

Maple. Time used: 0.000 (sec). Leaf size: 10
ode:=diff(y(x),x)*tan(x)-y(x) = 1; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \sin \left (x \right )-1 \]
Mathematica. Time used: 0.036 (sec). Leaf size: 17
ode=D[y[x],x]*Tan[x]-y[x]==1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -1+c_1 \sin (x) \\ y(x)\to -1 \\ \end{align*}
Sympy. Time used: 0.247 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x) + tan(x)*Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \sin {\left (x \right )} - 1 \]