What's the value of $ y^{(n)}$when $ y=\frac{x^n}{(x+1)^2(x+2)^2}$ What's the value of $\displaystyle  y^{(n)}$when $\displaystyle  y=\frac{x^n}{(x+1)^2(x+2)^2}$?
My Try:Let $\displaystyle y_n=\frac{x^n}{(x+1)^2(x+2)^2}$,so $\displaystyle y_n=xy_{n-1}$.According to Leibniz's formula,$$y_n^{(n)}=ny_{n-1}^{(n-1)}+xy_{n-1}^{(n)}$$.But I don't konw how to achieve it.
 A: You can prove inductively that $$y_n = p_n(x) + (-1)^n\left(\frac{-(n+2)}{x+1}+\frac{1}{(x+1)^2} + \frac{2^{n+1}-n2^{n-1}}{x+2} + \frac{2^n}{(x+2)^2}\right)$$
Where $p_n$ is a polynomial of degree less than $n$.
That would let you compute $y_n^{(n)}$.  It doesn't appear to give a pretty result, however.
I suspect Andre is right, and the real problem was to compute $y^{(n)}$ at $x=0$.
I arrived at this by noting that if $y_n = p_n(x)+\frac{a_n}{x+1}+\frac{b_n}{(x+1)^2}+\frac{c_n}{x+2}+\frac{d_n}{(x+2)^2}$ we can use the fact that $y_{n+1}=xy_n$ to get a recursive definition of $(a_{n+1},b_{n+1},c_{n+1},d_{n+1})$ in terms of $(a_n,b_n,c_n,d_n)$:$$a_{n+1}=b_n-a_n, b_{n+1}=-b_n, c_{n+1}=d_n-2c_n, d_{n+1}=-2d_n$$ Then I solved the recursion. It is nice that $a_i, b_i$ are never affected by values $c_i,d_i$, so the problem splits to solving two $2$-dimensional linear recurrences, and the matrices are fairly easy:
$$\begin{pmatrix}a_{n}\\b_n\end{pmatrix} = \begin{pmatrix}-1&1\\0&-1\end{pmatrix}^n\begin{pmatrix}a_{0}\\b_0\end{pmatrix}$$
and:
$$\begin{pmatrix}c_{n}\\d_n\end{pmatrix} = \begin{pmatrix}-2&1\\0&-2\end{pmatrix}^n\begin{pmatrix}c_{0}\\d_0\end{pmatrix}$$
Then use that $\begin{pmatrix}1&\alpha\\0&1\end{pmatrix}^n=\begin{pmatrix}1&n\alpha\\0&1\end{pmatrix}$. Finally, find $a_0=-2,b_0=1,c_0=2,d_0=1$ to get the above expression.
I'm wondering if there is a fun way to do this using $$h(x,z)=\sum_{n=0}^\infty y_nz^n = \frac{1}{(1-xz)(1+x)^2(2+x)^2}$$ and computing the partial fractions for this relative to $x$, yielding functions:
$$h(x,z)=\frac{a(z)}{1+x} + \frac{b(z)}{(1+x)^2} + \frac{c(z)}{x+2}+\frac{d(z)}{(x+2)^2} + \frac{f(z)}{1-xz}$$
Where $a(z),b(z),c(z),d(z), \text{ and } f(z)$ are rational functions of $z$. Knowing the power series for these functions then would give us the power series the $n$th partial derivative of $h$ relative to $x$. 
It turns out there is a simple relationship between these functions and the sequences $a_i,b_i,c_i,d_i$, namely, $a(z)=\sum_{i} a_iz^i$, and the same for $b,c,d.$
For example, Wolfram Alpha gives me $a(z)=\frac{-z-2}{(1+z)^2}$, which is $\sum_{n=0}^\infty (-1)^{n+1}(n+2)z^n$, and $a_n=(-1)^{n+1}(n+2)$ was just what I got above.
A: Assertion:
$$y_n^{(n)} = \frac{A_nx+B_n}{(x+1)^{n+2}}+\frac{C_nx+D_n}{(x+2)^{n+2}}$$
Now, we are going to need
$$
xy_{n}^{(n+1)}=\frac{-(n+1)A_nx^2+(A_n-B_n(n+2))x}{(x+1)^{n+3}}+\frac{-(n+1)C_nx^2+(2C_n-(n+2)D_n)x}{(x+2)^{n+3}}
$$
and
$$
(n+1)y_{n}^{(n)}=(n+1)\frac{(A_nx+B_n)(x+1)}{(x+1)^{n+3}}+(n+1)\frac{(C_nx+D_n)(x+2)}{(x+2)^{n+3}}
$$
Combining these and applying the Leibniz rule, we get
$$
y_{n+1}^{(n+1)}=\frac{((n+2)A_n-B_n)x+(n+1)B_n}{(x+1)^{n+3}}+\frac{(2(n+2)C_n-D_n)x+2(n+1)D_n}{(x+2)^{n+3}}
$$
Matching with the original assertion, we have
$$
A_{n+1}=(n+2)A_n-B_n\\
B_{n+1}=(n+1)B_n\\
C_{n+1}=2(n+2)C_n-D_n\\
D_{n+1}=2(n+1)D_n
$$
And as $y_0^{(0)} = -\frac{2x+1}{(x+1)^2}+\frac{2x+5}{(x+2)^2}$, we also have that
$$
A_0 = -2\\
B_0 = -1\\
C_0 = 2\\
D_0 = 5
$$
Now, we can solve for $B_n$ and $D_n$ relatively easily. $A_n$ and $C_n$ will require a little more work. But I'll leave the rest to you.
