32.3.12 problem Exact Differential equations. Exercise 9.16, page 79

Internal problem ID [5810]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 9
Problem number : Exact Differential equations. Exercise 9.16, page 79
Date solved : Tuesday, March 04, 2025 at 11:47:16 PM
CAS classification : [_separable]

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

With initial conditions

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

Maple. Time used: 0.429 (sec). Leaf size: 15
ode:=sin(x)*cos(y(x))+cos(x)*sin(y(x))*diff(y(x),x) = 0; 
ic:=y(1/4*Pi) = 1/4*Pi; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {\pi }{2}-\arcsin \left (\frac {\sec \left (x \right )}{2}\right ) \]
Mathematica. Time used: 5.974 (sec). Leaf size: 12
ode=Sin[x]*Cos[y[x]]+Cos[x]*Sin[y[x]]*D[y[x],x]==0; 
ic=y[Pi/4]==Pi/4; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \arccos \left (\frac {\sec (x)}{2}\right ) \]
Sympy. Time used: 0.547 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(sin(x)*cos(y(x)) + sin(y(x))*cos(x)*Derivative(y(x), x),0) 
ics = {y(pi/4): pi/4} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \operatorname {acos}{\left (\frac {1}{2 \cos {\left (x \right )}} \right )} \]