32.5.23 problem Exercise 11.24, page 97

Internal problem ID [5861]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 11, Bernoulli Equations
Problem number : Exercise 11.24, page 97
Date solved : Tuesday, March 04, 2025 at 11:49:11 PM
CAS classification : [[_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

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

With initial conditions

\begin{align*} y \left (1\right )&=\frac {\pi }{6} \end{align*}

Maple. Time used: 2.771 (sec). Leaf size: 29
ode:=(x-cos(y(x)))*diff(y(x),x)+tan(y(x)) = 0; 
ic:=y(1) = 1/6*Pi; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y \left (x \right ) = \operatorname {RootOf}\left (24 x \sin \left (\textit {\_Z} \right )+3 \sqrt {3}+2 \pi -6 \sin \left (2 \textit {\_Z} \right )-12 \textit {\_Z} -12\right ) \]
Mathematica. Time used: 0.215 (sec). Leaf size: 45
ode=(x-Cos[y[x]])*D[y[x],x]+Tan[y[x]]==0; 
ic={y[1]==Pi/6}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x=\frac {1}{24} \left (12-3 \sqrt {3}-2 \pi \right ) \csc (y(x))+\left (\frac {y(x)}{2}+\frac {1}{4} \sin (2 y(x))\right ) \csc (y(x)),y(x)\right ] \]
Sympy. Time used: 13.258 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x - cos(y(x)))*Derivative(y(x), x) + tan(y(x)),0) 
ics = {y(1): pi/6} 
dsolve(ode,func=y(x),ics=ics)
 
\[ x \sin {\left (y{\left (x \right )} \right )} - \frac {y{\left (x \right )}}{2} - \frac {\sin {\left (y{\left (x \right )} \right )} \cos {\left (y{\left (x \right )} \right )}}{2} - \frac {1}{2} + \frac {\sqrt {3}}{8} + \frac {\pi }{12} = 0 \]