<s>[INST] How to solve the recursive equation $y^{(n+2)} +(n+1)y^{(n+1)} +\tfrac{n(n+1)}{2} y^{(n)}=0$ I encounter the problem when I try to get the Taylor series of $\arctan x$ at $x=1$. It seems that the method for expanding it at $x=0$ does not work anymore (which is obtained by observing that $\arctan' x=\frac{1}{1+x^2}=\sum_{n=0}^\infty (-1)^n x^{2n}$, and then integration over the convergence domain).
So I try to compute the derivatives at $x=1$: Note that if we set $y(x)=\arctan x$, then
$$y'=\frac{1}{1+x^2},\quad y''=\frac{-2x}{(1+x^2)^2}\implies
(1+x^2)y''=-2x y'.$$
By Leibniz rule, taking derivative of order $n$ at both side, we have
$$
y^{(n+2)}(1)+(n+1)y^{(n+1)}(1)+\frac{n(n+1)}{2} y^{(n)}(1)=0.
$$
It is easy to show 
$$
y(1)=\pi/4,\quad y'(1)=1/2,\quad y''(1)=-1/2,\quad y'''(1)=1/2,\quad y''''(1)=0.
$$
I don't know how to get a general formula from the above recursive equation, any ideas?
In fact, I am also searching for a general theory about recursive equations, any reference there?
 [/INST] If you simply want to find the Taylor series about $x=1$ of $\text{arctan}(x)$, then you can use $$\frac{\text{d}}{\text{d}x}\,\text{arctan}(x)=\frac{1}{1+x^2}=\frac{1}{1+(z+1)^2}=\frac{1}{2\text{i}}\left(\frac{1}{1-\text{i}+z}-\frac{1}{1+\text{i}+z}\right)\,,$$
where $z:=x-1$.  This gives
$$\frac{\text{d}}{\text{d}x}\,\text{arctan}(x)=\frac{1}{2\text{i}}\,\left(\frac{\left(1+\frac{z}{1-\text{i}}\right)^{-1}}{1-\text{i}}-\frac{\left(1+\frac{z}{1+\text{i}}\right)^{-1}}{1+\text{i}}\right)\,.$$
Therefore, if $|z|<\sqrt{2}$, then
$$\frac{\text{d}}{\text{d}x}\,\text{arctan}(x)=\frac{1}{2\text{i}}\,\left(\frac{\sum\limits_{k=0}^\infty\,(-1)^k\,\left(\frac{z}{1-\text{i}}\right)^{k}}{1-\text{i}}-\frac{\sum\limits_{k=0}^\infty\,(-1)^k\,\left(\frac{z}{1+\text{i}}\right)^{k}}{1+\text{i}}\right)\,.$$
Simplifying this, we have
$$\frac{\text{d}}{\text{d}x}\,\text{arctan}(x)=\sum_{k=0}^\infty\,(-1)^k\,\left(\frac{\frac1{(1-\text{i})^{k+1}}-\frac{1}{(1+\text{i})^{k+1}}}{2\text{i}}\right)\,(x-1)^k$$
for $x\in\mathbb{C}$ such that $|x-1|<\sqrt{2}$.
Using $1\pm\text{i}=\sqrt{2}\,\exp\left(\pm\dfrac{\text{i}\pi}{4}\right)$, we conclude that
$$\frac{\text{d}}{\text{d}x}\,\text{arctan}(x)=\sum_{k=0}^\infty\,\frac{(-1)^k}{2^{\frac{k+1}{2}}}\,\sin\left(\frac{(k+1)\pi}{4}\right)\,(x-1)^k$$
for all complex numbers $x$ with $|x-1|<\sqrt{2}$.
Integrating the series above, we have
$$\text{arctan}(x)=\frac{\pi}{4}+\sum_{k=1}^{\infty}\,\frac{(-1)^{k-1}}{2^{\frac{k}{2}}\,k}\,\sin\left(\frac{k\pi}{4}\right)\,(x-1)^k\,.$$
for every $x\in\mathbb{C}$ such that $|x-1|<\sqrt{2}$.  In this way, it follows that
$$y^{(k)}(1)=\begin{cases}\frac{\pi}{4}&\text{if }k=0\,,\\
\frac{(-1)^{k-1}\,(k-1)!}{2^{\frac{k}{2}}}\,\sin\left(\frac{k\pi}{4}\right)&\text{if }k=1,2,3,\ldots\,,
\end{cases}$$
where $y(x):=\text{arctan}(x)$.

However, if you really want to solve the recursion without the expansion above, then let $a_k:=\dfrac{y^{(k)}(1)}{(k-1)!}$ for $k=1,2,3,\ldots$.  From
$$y^{(k+2)}(1)+(k+1)\,y^{(k+1)}(1)+\frac{k(k+1)}{2}\,y^{(k)}(1)=0\text{ for }k=1,2,3,\ldots\,,$$
we divide both sides by $(k+1)!$ to get
$$a_{k+2}+a_{k+1}+\frac{1}{2}\,a_k=0\text{ for }k=1,2,3,\ldots\,.$$
The characteristic polynomial of the recursion above is $\lambda^2+\lambda+\dfrac{1}{2}$, whose roots are $\dfrac{-1\pm\text{i}}{2}$.  Therefore, for $k=1,2,3,\ldots$,
$$a_k=p\,\left(\frac{-1+\text{i}}{2}\right)^k+q\,\left(\frac{-1-\text{i}}{2}\right)^k$$
for some fixed $p,q\in\mathbb{C}$.  Since $a_1=\dfrac{1}{2}$ and $a_2=-\dfrac{1}{2}$, we get $$p=+\frac{\text{i}}{2}\text{ and }q=-\frac{\text{i}}{2}\,,$$
whence 
$$y^{(k)}(1)=\frac{\left(\frac{-1+\text{i}}{2}\right)^k-\,\left(\frac{-1-\text{i}}{2}\right)^k}{2\text{i}}\,(k-1)!=\frac{(-1)^{k-1}\,(k-1)!}{2^{\frac{k}{2}}}\,\sin\left(\frac{k\pi}{4}\right)$$
for $k=1,2,3,\ldots$.
</s>