orderp
 the order of a p-adic expansion of a rational function
 lcoeffp

 Calling Sequence orderp(ex, p, x) lcoeffp(ex, p, x)

Parameters

 ex - rational function p - irreducible (or square-free) polynomial or 1/x (or infinity) x - independent variable

Description

 • The orderp command computes the order at p of the p-adic expansion of a rational function ex in x.
 • The lcoeffp command computes the leading coefficient  at p of the p-adic expansion of a rational function ex in x.

Examples

 > $\mathrm{with}\left(\mathrm{padic}\right):$
 > $\mathrm{expansion}\left(\frac{{x}^{3}+1}{{x}^{2}+3x+5},{x}^{2}+2,x\right)$
 ${{{\mathrm{p_adic}}{}\left({{x}}^{{2}}{+}{2}{,}{0}{,}\left[{-}\frac{{1}}{{3}}{}{x}{-}\frac{{1}}{{3}}{,}\frac{{4}}{{9}}{,}{-}\frac{{4}}{{81}}{+}\frac{{4}}{{81}}{}{x}{,}\frac{{4}}{{729}}{}{x}{-}\frac{{16}}{{729}}{,}{-}\frac{{4}}{{6561}}{-}\frac{{8}}{{6561}}{}{x}{,}{-}\frac{{20}}{{59049}}{}{x}{+}\frac{{44}}{{59049}}\right]\right)}_{{3}}}_{{1}}{+}\frac{{{{\mathrm{p_adic}}{}\left({{x}}^{{2}}{+}{2}{,}{0}{,}\left[{-}\frac{{1}}{{3}}{}{x}{-}\frac{{1}}{{3}}{,}\frac{{4}}{{9}}{,}{-}\frac{{4}}{{81}}{+}\frac{{4}}{{81}}{}{x}{,}\frac{{4}}{{729}}{}{x}{-}\frac{{16}}{{729}}{,}{-}\frac{{4}}{{6561}}{-}\frac{{8}}{{6561}}{}{x}{,}{-}\frac{{20}}{{59049}}{}{x}{+}\frac{{44}}{{59049}}\right]\right)}_{{3}}}_{{2}}}{{}\left({{x}}^{{2}}{+}{2}\right)}{+}\frac{{{{\mathrm{p_adic}}{}\left({{x}}^{{2}}{+}{2}{,}{0}{,}\left[{-}\frac{{1}}{{3}}{}{x}{-}\frac{{1}}{{3}}{,}\frac{{4}}{{9}}{,}{-}\frac{{4}}{{81}}{+}\frac{{4}}{{81}}{}{x}{,}\frac{{4}}{{729}}{}{x}{-}\frac{{16}}{{729}}{,}{-}\frac{{4}}{{6561}}{-}\frac{{8}}{{6561}}{}{x}{,}{-}\frac{{20}}{{59049}}{}{x}{+}\frac{{44}}{{59049}}\right]\right)}_{{3}}}_{{3}}}{{{}\left({{x}}^{{2}}{+}{2}\right)}^{{2}}}{+}\frac{{{{\mathrm{p_adic}}{}\left({{x}}^{{2}}{+}{2}{,}{0}{,}\left[{-}\frac{{1}}{{3}}{}{x}{-}\frac{{1}}{{3}}{,}\frac{{4}}{{9}}{,}{-}\frac{{4}}{{81}}{+}\frac{{4}}{{81}}{}{x}{,}\frac{{4}}{{729}}{}{x}{-}\frac{{16}}{{729}}{,}{-}\frac{{4}}{{6561}}{-}\frac{{8}}{{6561}}{}{x}{,}{-}\frac{{20}}{{59049}}{}{x}{+}\frac{{44}}{{59049}}\right]\right)}_{{3}}}_{{4}}}{{{}\left({{x}}^{{2}}{+}{2}\right)}^{{3}}}{+}\frac{{{{\mathrm{p_adic}}{}\left({{x}}^{{2}}{+}{2}{,}{0}{,}\left[{-}\frac{{1}}{{3}}{}{x}{-}\frac{{1}}{{3}}{,}\frac{{4}}{{9}}{,}{-}\frac{{4}}{{81}}{+}\frac{{4}}{{81}}{}{x}{,}\frac{{4}}{{729}}{}{x}{-}\frac{{16}}{{729}}{,}{-}\frac{{4}}{{6561}}{-}\frac{{8}}{{6561}}{}{x}{,}{-}\frac{{20}}{{59049}}{}{x}{+}\frac{{44}}{{59049}}\right]\right)}_{{3}}}_{{5}}}{{{}\left({{x}}^{{2}}{+}{2}\right)}^{{4}}}{+}\frac{{{{\mathrm{p_adic}}{}\left({{x}}^{{2}}{+}{2}{,}{0}{,}\left[{-}\frac{{1}}{{3}}{}{x}{-}\frac{{1}}{{3}}{,}\frac{{4}}{{9}}{,}{-}\frac{{4}}{{81}}{+}\frac{{4}}{{81}}{}{x}{,}\frac{{4}}{{729}}{}{x}{-}\frac{{16}}{{729}}{,}{-}\frac{{4}}{{6561}}{-}\frac{{8}}{{6561}}{}{x}{,}{-}\frac{{20}}{{59049}}{}{x}{+}\frac{{44}}{{59049}}\right]\right)}_{{3}}}_{{6}}}{{{}\left({{x}}^{{2}}{+}{2}\right)}^{{5}}}{+}{\mathrm{O}}{}\left({{}\left({{x}}^{{2}}{+}{2}\right)}^{{6}}\right)$ (1)
 > $\mathrm{orderp}\left(\frac{{x}^{3}+1}{{x}^{2}+3x+5},{x}^{2}+2,x\right)$
 ${0}$ (2)
 > $\mathrm{lcoeffp}\left(\frac{{x}^{3}+1}{{x}^{2}+3x+5},{x}^{2}+2,x\right)$
 ${-}\frac{{1}}{{3}}{}{x}{-}\frac{{1}}{{3}}$ (3)
 > $\mathrm{expansion}\left(\frac{{x}^{3}+1}{{x}^{2}+3x+5},\frac{1}{x},x\right)$
 $\frac{{{{\mathrm{p_adic}}{}\left(\frac{{1}}{{x}}{,}{-}{1}{,}\left[{1}{,}{-}{3}{,}{4}{,}{4}{,}{-}{32}{,}{76}\right]\right)}_{{3}}}_{{1}}}{{}\left(\frac{{1}}{{x}}\right)}{+}\frac{{{{\mathrm{p_adic}}{}\left(\frac{{1}}{{x}}{,}{-}{1}{,}\left[{1}{,}{-}{3}{,}{4}{,}{4}{,}{-}{32}{,}{76}\right]\right)}_{{3}}}_{{2}}}{{{}\left(\frac{{1}}{{x}}\right)}^{{2}}}{+}\frac{{{{\mathrm{p_adic}}{}\left(\frac{{1}}{{x}}{,}{-}{1}{,}\left[{1}{,}{-}{3}{,}{4}{,}{4}{,}{-}{32}{,}{76}\right]\right)}_{{3}}}_{{3}}}{{{}\left(\frac{{1}}{{x}}\right)}^{{3}}}{+}\frac{{{{\mathrm{p_adic}}{}\left(\frac{{1}}{{x}}{,}{-}{1}{,}\left[{1}{,}{-}{3}{,}{4}{,}{4}{,}{-}{32}{,}{76}\right]\right)}_{{3}}}_{{4}}}{{{}\left(\frac{{1}}{{x}}\right)}^{{4}}}{+}\frac{{{{\mathrm{p_adic}}{}\left(\frac{{1}}{{x}}{,}{-}{1}{,}\left[{1}{,}{-}{3}{,}{4}{,}{4}{,}{-}{32}{,}{76}\right]\right)}_{{3}}}_{{5}}}{{{}\left(\frac{{1}}{{x}}\right)}^{{5}}}{+}\frac{{{{\mathrm{p_adic}}{}\left(\frac{{1}}{{x}}{,}{-}{1}{,}\left[{1}{,}{-}{3}{,}{4}{,}{4}{,}{-}{32}{,}{76}\right]\right)}_{{3}}}_{{6}}}{{{}\left(\frac{{1}}{{x}}\right)}^{{6}}}{+}{\mathrm{O}}{}\left({{}\left(\frac{{1}}{{x}}\right)}^{{5}}\right)$ (4)
 > $\mathrm{orderp}\left(\frac{{x}^{3}+1}{{x}^{2}+3x+5},\frac{1}{x},x\right)$
 ${-}{1}$ (5)
 > $\mathrm{lcoeffp}\left(\frac{{x}^{3}+1}{{x}^{2}+3x+5},\frac{1}{x},x\right)$
 ${1}$ (6)