78.8.27 problem 27

Internal problem ID [18154]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Miscellaneous Problems for Chapter 2. Problems at page 99
Problem number : 27
Date solved : Monday, March 31, 2025 at 05:15:21 PM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 23
ode:=diff(y(x),x) = 1+3*tan(x)*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\tan \left (x \right )}{3}+c_1 \sec \left (x \right )^{3}+\frac {2 \tan \left (x \right ) \sec \left (x \right )^{2}}{3} \]
Mathematica. Time used: 0.038 (sec). Leaf size: 26
ode=D[y[x],x]==1+3*y[x]*Tan[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{12} \sec ^3(x) (9 \sin (x)+\sin (3 x)+12 c_1) \]
Sympy. Time used: 1.539 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-3*y(x)*tan(x) + Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} - \frac {\sin ^{3}{\left (x \right )}}{3} + \sin {\left (x \right )}}{\cos ^{3}{\left (x \right )}} \]