76.1.33 problem 33

Internal problem ID [17261]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 2. First order differential equations. Section 2.1 (Separable equations). Problems at page 44
Problem number : 33
Date solved : Monday, March 31, 2025 at 03:47:44 PM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=\frac {2 \cos \left (2 x \right )}{10+2 y} \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=-1 \end{align*}

Maple. Time used: 0.340 (sec). Leaf size: 14
ode:=diff(y(x),x) = 2*cos(2*x)/(10+2*y(x)); 
ic:=y(0) = -1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = -5+\sqrt {16+\sin \left (2 x \right )} \]
Mathematica. Time used: 0.153 (sec). Leaf size: 31
ode=D[y[x],x]==2*Cos[2*x]/(10+2*y[x]); 
ic={y[0]==-1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \sqrt {2} \sqrt {\int _0^x\cos (2 K[1])dK[1]+8}-5 \]
Sympy. Time used: 0.613 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - 2*cos(2*x)/(2*y(x) + 10),0) 
ics = {y(0): -1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \sqrt {\sin {\left (2 x \right )} + 16} - 5 \]