7.3.28 problem 28

Internal problem ID [68]
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 : 28
Date solved : Tuesday, March 04, 2025 at 10:41:34 AM
CAS classification : [_separable]

\begin{align*} 2 \sqrt {x}\, y^{\prime }&=\cos \left (y\right )^{2} \end{align*}

With initial conditions

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

Maple. Time used: 0.115 (sec). Leaf size: 10
ode:=2*x^(1/2)*diff(y(x),x) = cos(y(x))^2; 
ic:=y(4) = 1/4*Pi; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \arctan \left (\sqrt {x}-1\right ) \]
Mathematica. Time used: 0.459 (sec). Leaf size: 17
ode=2*Sqrt[x]*D[y[x],x]== Cos[y[x]]^2; 
ic={y[4]==Pi/4}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\arctan \left (1-\sqrt {x}\right ) \]
Sympy. Time used: 1.523 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*sqrt(x)*Derivative(y(x), x) - cos(y(x))**2,0) 
ics = {y(4): pi/4} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 2 \operatorname {atan}{\left (\frac {\sqrt {- 2 \sqrt {x} + x + 2} - 1}{\sqrt {x} - 1} \right )} \]