Solution (source code)

= Solution

The <implicit function theorem> applies when $D_2F(a,b)\ne0$. After shrinking the neighbourhood, this partial derivative stays nonzero along the implicit <graph>. Differentiating its defining identity gives
$$
f'(x)=-\frac{D_1F(x,f(x))}{D_2F(x,f(x))}.
$$
For the specified smooth function, $F_x=y+\cos(x+y)$ and $F_y=x+\cos(x+y)$, so both equal one at zero. In particular the theorem applies and $f'(0)=-1$. Differentiate the identity a second time:
$$
F_{xx}+2F_{xy}f'+F_{yy}(f')^2+F_yf''=0.
$$
At zero, $F_{xx}=F_{yy}=0$ and $F_{xy}=1$. Therefore
$$
\boxed{f'(0)=-1,\qquad f''(0)=2}.
$$