Example 2. Find the solution of the equation

$$
y^{\prime \prime}+y=0
$$

satisfying the initial conditions

$$
\left.y\right|_{x=0}=1,\left.\quad y^{\prime}\right|_{x=0}=0
$$
Solution. The particular solution of equation (16), satisfying the initial conditions (17), is sought in the form of a series

$$
y(x)=y(0)+\frac{y^{\prime}(0)}{1!} x+\frac{y^{\prime \prime}(0)}{2!} x^{2}+\frac{y^{\prime \prime \prime}(0)}{3!} x^{3}+\ldots
$$

Given $y(0)=1, y^{\prime}(0)=0$.

From the given equation, we find that $y^{\prime \prime}(0)=-y(0)=-1$. Differentiating both sides of equation (16) successively and setting $x=0$ in the resulting equalities, we have:

$$
\begin{aligned}
& y^{\prime \prime \prime}(0)=-y^{\prime}(0)=0 \\
& y^{\text {IV }}(0)=-y^{\prime \prime}(0)=1, \\
& y^{(n)}(0)=\left\{\begin{array}{cc}
0, & \text { if } n=2 k-1, \\
(-1)^{k}, & \text { if } n=2 k
\end{array} \quad(k=1,2, \ldots)\right.
\end{aligned}
$$

Substituting the found values $y^{\prime \prime}(0), y^{\prime \prime \prime}(0), \ldots$ into series (18), we obtain the desired solution in the form of a power series

$$
y(x)=1-\frac{x^{2}}{2!}+\frac{x^{4}}{4!}-\frac{x^{6}}{6!}+\ldots+\frac{(-1)^{k}}{(2 k)!} x^{2 k}+\ldots
$$

It is clear that the series on the right-hand side of (19) converges to the function $y=\cos x$ over the entire $O x$ axis, which is the solution to the given Cauchy problem.