# 有理函數

${\displaystyle f(x)={\frac {a_{m}x^{m}+a_{m-1}x^{m-1}+\cdots +a_{1}x+a_{0}}{b_{n}x^{n}+b_{n-1}x^{n-1}+\cdots +b_{1}x+b_{0}}}={\frac {P_{m}(x)}{Q_{n}(x)}}\quad ;\quad m,n\in \mathbb {N} _{0}}$${\displaystyle b_{i}}$不全為0。

## 漸近線

• 不失一般性可假設分子、分母互質。若存在${\displaystyle r>0}$，使得${\displaystyle (px+q)^{r}}$是分母${\displaystyle Q(x)}$的因子，則有理函數存在垂直漸近線${\displaystyle x=-q/p}$
• ${\displaystyle m，有水平漸近線${\displaystyle y=0}$
• ${\displaystyle m=n}$，有水平漸近線${\displaystyle y={\frac {a_{m}}{b_{m}}}}$
• ${\displaystyle m=n+1}$，有斜漸近線${\displaystyle y={\frac {a_{m}}{b_{n}}}x+{\frac {b_{n}*a_{m-1}-b_{n-1}*a_{m}}{{b_{n}}^{2}}}}$

## 部分分式

### 例子

1. 分拆${\displaystyle {\frac {x^{3}-5x+88}{x^{2}+3x-28}}}$

${\displaystyle x-3+{\frac {32x+4}{x^{2}+3x-28}}}$

${\displaystyle {\frac {32x+4}{x^{2}+3x-28}}={\frac {A}{x+7}}+{\frac {B}{x-4}}}$

${\displaystyle \ 32x+4=A(x-4)+B(x+7)}$

${\displaystyle \ 32x+4=(A+B)x+(7B-4A)}$

${\displaystyle \ A+B=32}$

${\displaystyle \ 7B-4A=4}$

${\displaystyle \ 128+4=11B}$

${\displaystyle \ B=12}$

${\displaystyle \ -224+4=-11A}$

${\displaystyle \ A=20}$

## 積分

### 部分分數

• 分母為1次多項式：求${\displaystyle \int {\frac {1}{ax+b}}dx}$

${\displaystyle u=ax+b}$

${\displaystyle {\frac {du}{dx}}=a}$
${\displaystyle {\frac {du}{a}}=dx}$

${\displaystyle \int {\frac {1}{u}}{\frac {du}{a}}={\frac {1}{a}}\int {\frac {1}{u}}{du}={\frac {\ln \left|u\right|}{a}}+C={\frac {\ln \left|ax+b\right|}{a}}+C}$
• 分母次數為2：求${\displaystyle \int {\frac {dx+e}{ax^{2}+bx+c}}dx}$

${\displaystyle \int {x+6 \over x^{2}-8x+25}\,dx.}$

${\displaystyle x^{2}-8x+25=(x^{2}-8x+16)+9=(x-4)^{2}+9\,}$

${\displaystyle u=x^{2}-8x+25\,}$
${\displaystyle du=(2x-8)\,dx}$
${\displaystyle du/2=(x-4)\,dx}$

${\displaystyle \int {x-4 \over x^{2}-8x+25}\,dx+\int {10 \over x^{2}-8x+25}\,dx}$

${\displaystyle \int {x-4 \over x^{2}-8x+25}\,dx=\int {du/2 \over u}={1 \over 2}\ln \left|u\right|+C={1 \over 2}\ln(x^{2}-8x+25)+C}$

${\displaystyle \int {10 \over x^{2}-8x+25}\,dx=\int {10 \over (x-4)^{2}+9}\,dx=\int {10/9 \over \left({x-4 \over 3}\right)^{2}+1}\,dx}$

${\displaystyle w=(x-4)/3\,}$
${\displaystyle dw=dx/3\,}$
${\displaystyle {10 \over 3}\int {dw \over w^{2}+1}={10 \over 3}\arctan(w)+C={10 \over 3}\arctan \left({x-4 \over 3}\right)+C.}$

${\displaystyle \tan \theta ={x-4 \over 3},\,}$
${\displaystyle \left({x-4 \over 3}\right)^{2}+1=\tan ^{2}\theta +1=\sec ^{2}\theta ,\,}$
${\displaystyle d\tan \theta =\sec ^{2}\theta \,d\theta ={dx \over 3}.\,}$

${\displaystyle \int {10/9 \over \left({x-4 \over 3}\right)^{2}+1}\,dx=10/9\int {\frac {1}{\sec ^{2}\theta }}3\sec ^{2}\theta \,d\theta ={10 \over 3}\arctan \left({x-4 \over 3}\right)+C}$

### 奧斯特洛格拉德斯基方法

${\displaystyle \int {\frac {P}{Q}}dx={\frac {P_{1}}{Q_{1}}}+\int {\frac {P_{2}}{Q_{2}}}dx}$

#### 應用例子

• ${\displaystyle \int {\frac {xdx}{(x-1)^{2}(x+1)^{3}}}}$
1. ${\displaystyle Q=(x-1)^{2}(x+1)^{3}}$
2. ${\displaystyle Q'=2(x-1)(x+1)^{3}+3(x-1)^{2}(x+1)^{2}=(x-1)(x+1)^{2}(5x-1)}$
3. ${\displaystyle Q_{1}=gcd(Q,Q')=(x-1)(x+1)^{2}}$
4. ${\displaystyle Q_{2}=Q/Q_{1}=(x-1)(x+1)}$

${\displaystyle P_{1}=Ax^{2}+Bx+C,\quad P_{2}=Dx+E}$

${\displaystyle \int {\frac {xdx}{(x-1)^{2}(x+1)^{3}}}={\frac {Ax^{2}+Bx+C}{(x-1)(x+1)^{2}}}+\int {\frac {Dx+E}{(x-1)(x+1)}}dx}$

${\displaystyle {\frac {x}{(x-1)^{2}(x+1)^{3}}}={\frac {Ax^{3}+(2B-A)x^{2}+(3C-B+2A)x-C+B}{(x-1)^{2}(x+1)^{3}}}+{\frac {Dx+E}{(x-1)(x+1)}}}$

${\displaystyle Dx^{4}+(E+D-A)x^{3}+(E-D-2B+A)x^{2}+(-E-D-3C+B-2A)x-E+C-B}$

${\displaystyle \int {\frac {xdx}{(x-1)^{2}(x+1)^{3}}}={\frac {x^{2}+x+2}{8(1-x)(x+1)^{2}}}+\int {\frac {dx}{8(x-1)(x+1)}}}$

#### 證明

${\displaystyle \int {\frac {P}{Q}}dx={\frac {P_{1}}{Q_{1}}}+\int {\frac {P_{2}}{Q_{2}}}dx}$
${\displaystyle {\frac {P}{Q}}={\frac {P'_{1}-{\frac {Q'_{1}P_{1}}{Q_{1}}}}{Q_{1}}}+{\frac {P_{2}}{Q_{2}}}}$

${\displaystyle P=P'_{1}Q_{2}-{\frac {Q'_{1}Q_{2}P_{1}}{Q_{1}}}+P_{2}Q_{1}}$

• ${\displaystyle \deg(P)\leq \deg(Q)-1}$
• ${\displaystyle \deg(P'_{1}Q_{2}\leq (\deg(Q_{1})-1)+(\deg(Q)-\deg(Q_{1}))=\deg(Q)-1}$
• ${\displaystyle \deg({\frac {Q'_{1}Q_{2}P_{1}}{Q_{1}}})\leq (\deg(Q_{1})-1)+(\deg(Q)-\deg(Q_{1}))+(\deg(Q_{1})-1)-\deg(Q_{1})=\deg(Q)-2}$
• ${\displaystyle \deg(P_{2}Q_{1})\leq (\deg(Q)-\deg(Q_{1})-1)+\deg(Q_{1})=\deg(Q)-1}$