67.23.34 problem 33.11 (h)

Internal problem ID [16967]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 33. Power series solutions I: Basic computational methods. Additional Exercises. page 641
Problem number : 33.11 (h)
Date solved : Thursday, October 02, 2025 at 01:40:45 PM
CAS classification : [_quadrature]

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

Using series method with expansion around

\begin{align*} 0 \end{align*}
Maple. Time used: 0.008 (sec). Leaf size: 59
Order:=5; 
ode:=diff(y(x),x)+cos(y(x)) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = y \left (0\right )-\cos \left (y \left (0\right )\right ) x -\frac {\sin \left (2 y \left (0\right )\right ) x^{2}}{4}+\frac {\cos \left (y \left (0\right )\right ) \cos \left (2 y \left (0\right )\right ) x^{3}}{6}+\left (\frac {\sin \left (4 y \left (0\right )\right )}{32}+\frac {\sin \left (2 y \left (0\right )\right )}{24}\right ) x^{4}+O\left (x^{5}\right ) \]
Mathematica. Time used: 0.126 (sec). Leaf size: 97
ode=D[y[x],x]+Cos[y[x]]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,4}]
 
\[ y(x)\to 2 \arctan \left (\tanh \left (\frac {c_1}{2}\right )\right )+\frac {1}{48} x^4 \left (22 \sinh \left (\frac {c_1}{2}\right )+\sinh \left (\frac {3 c_1}{2}\right )-\sinh \left (\frac {5 c_1}{2}\right )\right ) \cosh \left (\frac {c_1}{2}\right ) \text {sech}^4(c_1)-\frac {1}{12} x^3 (-3+\cosh (2 c_1)) \text {sech}^3(c_1)-\frac {1}{2} x^2 \tanh (c_1) \text {sech}(c_1)-x \text {sech}(c_1) \]
Sympy. Time used: 0.419 (sec). Leaf size: 66
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(cos(y(x)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="1st_power_series",x0=0,n=5)
 
\[ y{\left (x \right )} = - x \cos {\left (C_{1} \right )} - \frac {x^{2} \sin {\left (C_{1} \right )} \cos {\left (C_{1} \right )}}{2} - \frac {x^{3} \left (\sin ^{2}{\left (C_{1} \right )} - \cos ^{2}{\left (C_{1} \right )}\right ) \cos {\left (C_{1} \right )}}{6} - \frac {x^{4} \left (\sin ^{2}{\left (C_{1} \right )} - 5 \cos ^{2}{\left (C_{1} \right )}\right ) \sin {\left (C_{1} \right )} \cos {\left (C_{1} \right )}}{24} + C_{1} + O\left (x^{5}\right ) \]