71.1.152 problem 179 (page 297)

Internal problem ID [19328]
Book : V.V. Stepanov, A course of differential equations (in Russian), GIFML. Moscow (1958)
Section : All content
Problem number : 179 (page 297)
Date solved : Thursday, October 02, 2025 at 04:18:54 PM
CAS classification : system_of_ODEs

\begin{align*} y^{\prime }&=-z \left (x \right )\\ z^{\prime }\left (x \right )&=y \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=1 \\ z \left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.128 (sec). Leaf size: 11
ode:=[diff(y(x),x) = -z(x), diff(z(x),x) = y(x)]; 
ic:=[y(0) = 1, z(0) = 0]; 
dsolve([ode,op(ic)]);
 
\begin{align*} y \left (x \right ) &= \cos \left (x \right ) \\ z \left (x \right ) &= \sin \left (x \right ) \\ \end{align*}
Mathematica. Time used: 0.002 (sec). Leaf size: 12
ode={D[y[x],x]==-z[x],D[z[x],x]==y[x]}; 
ic={y[0]==1,z[0]==0}; 
DSolve[{ode,ic},{y[x],z[x]},x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \cos (x)\\ z(x)&\to \sin (x) \end{align*}
Sympy. Time used: 0.033 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
z = Function("z") 
ode=[Eq(z(x) + Derivative(y(x), x),0),Eq(-y(x) + Derivative(z(x), x),0)] 
ics = {} 
dsolve(ode,func=[y(x),z(x)],ics=ics)
 
\[ \left [ y{\left (x \right )} = - C_{1} \sin {\left (x \right )} - C_{2} \cos {\left (x \right )}, \ z{\left (x \right )} = C_{1} \cos {\left (x \right )} - C_{2} \sin {\left (x \right )}\right ] \]