The coefficient and asymptotic in generating function 
Let $L_n$ be the set of all the paths from $(0,0)$ to $(n,0)$ such that every step is $u=(1,1)$ , $d=(1,-1)$ and $r=(2,0)$.
Notice that the path could go under the $x$ axis.
a. Write a generating function of the number of paths in $L_n$.
b. Analyze the asymptotic of $|L_n|$ for a large n.

My trial:
in part a, I wrote:
Every path = (empty path) or (r every path) or (u Schröder path d every path) or (d Schröder path u every path).
Now, denote our g.f. by $A(x)$ and Schröder g.f. by $S(x)$, and denote $x$ to count half of the length, get: $A(x)=1+xA(x)+xS(x)A(x)+xS(x)A(x)$. Thus,
$$A(x)=\frac{1}{1-x-2xS(x)}$$
Then if we substitute the formula of $S(x)=\frac{1-x-\sqrt {(1-x)^2-4x}}{2x}$ :
$$A(x)=\frac{1}{\sqrt {(1-x)^2-4x}}$$
In part b, to analyze the asymptotic of $|L_n|$, I guess I should find the coeifficient of $[x^n]$ in $A(x)$ where $A(x)=\sum_{n\geq 0} |L_n| x^{2n}$.
However if we solve denominator of $A(x) = 0$ we get
\begin{align*}
(1-x)^2-4x=0
\quad\Rightarrow\quad
x^2-6x+1=0
\end{align*}
so, $x=3 \pm 2\sqrt2$. So the g.f. will be analytic if we delete the intervals $(3+\sqrt2, \infty)$ and $(-\infty,3-\sqrt2)$.
Write:
$A(x)=\frac{1} {\sqrt{(x- r_1)(x-r_2)}}=\frac{1}{\sqrt{x-r_1}} \frac{1}{\sqrt{x-r_2}}= \frac{1}{\sqrt{1-x/r_1}} \frac{1}{\sqrt{1-x/r_2}}$ where $r_1=3+\sqrt{8}$ and $r_2=3-\sqrt{8}$.
Then, $A(x)=(\sum_{n\geq 0}  (1/r_1)^n x^n \sum_{n\geq 0} (1/r_2)^n x^n)^{1/2}= \sum_{n\geq 0} \sum_{j=0}^{n} (1/r_1)^j (1/r_3)^{n-j} x^n$ ,
here I used Caushy formula.
So, $[x^n] A(x)= \sum_{j=0}^{n} (1/r_1)^j (1/r_2)^{n-j}$
$L_n = \sum_{j=0}^{n} (r_2/r_1)^j (1/r_2)^n$.
But this was not much useful!
Edited:
Another approach, which does not use the Legendre polynomial:
*I found in oeis the sequence of this problem is A001850 and it shows that the coefficient of the series is $\sum_{k=0}^{n} {n\choose k}{n+k \choose k}$ .In addition,  wikipedia page : https://www.google.com/url?sa=t&source=web&rct=j&url=https://en.m.wikipedia.org/wiki/Delannoy_number, mentioned the coefficient and the asymptotic of the above  g.f : $\frac{1}{\sqrt{1-6x+x^2}}$  which is the g.f of the  Delannoy number, but without explanation/proof.
How they find the coefficient of this generating function, and how they analayzed its asymptotic then?
Many thanks!
 A: Part (b)
$$[x^n] \frac{1}{\sqrt{1-6x + x^2}} = [x^n] \frac{1}{\sqrt{1-2xt + x^2}}\big|_{t=3}= [x^n]\sum_{n=0}^\infty P_n(3) x^n $$
where the generating function of the Legendre polynomials has been used.  The exact answer is thus $P_n(3).$  Look up the asymptotics for the Legendre polynomials and you'll find
$$ P_n(t) \sim \frac{1}{\sqrt{2 \pi n}} \frac{ (t+\sqrt{t^2-1})^{n+1/2} }{(t^2-1)^{1/4}}$$ when $t$ is large (outside the oscillatory region.)  Putting in $t=3$ and comparing the asymptotic formula to the exact, we find that, for $n=50,$ the asymptotic formula exceeds the actual by only 0.23%.
The instinct for paying attention to where the singularities are, at $3\pm\sqrt{8},$ (there's a typo in some of your problem setup) is a good one. The penultimate equation utilizes the largest root.  Making this approach rigorous is often called 'singularity analysis.'  I've had Legendre polynomials on the brain for a while, so I didn't want to reinvent a well-known result (I think the above equation can be found in Bender and Orszag.)  Ultimately, an integral representation for the Legendre polynomials is analyzed using the well-known saddle-point technique.
