# 導數

${\displaystyle f'(x)=\lim _{h\to 0}{f(x+h)-f(x) \over h}}$

${\displaystyle f'(x)=\lim _{h\to 0}{(x+h)^{2}-x^{2} \over h}}$，展開變咗 ${\displaystyle \lim _{h\to 0}{(x^{2}+2hx+h^{2})-x^{2} \over h}}$，消除咗個 ${\displaystyle x^{2}}$ 淨低 ${\displaystyle \lim _{h\to 0}{2hx+h^{2} \over h}}$，約埋個 ${\displaystyle h}$ 變成 ${\displaystyle \lim _{h\to 0}\{2x+h\}}$，由於 ${\displaystyle h}$ 趨向 ${\displaystyle 0}$ 所以求到 ${\displaystyle f'(x)=2x}$

## 基本嘅求導公式

${\displaystyle {d \over dx}\ c=0}$ ${\displaystyle c}$  係常數。
${\displaystyle {d \over dx}\ ax=a}$ ${\displaystyle a}$  係常數。
${\displaystyle {d \over dx}\ ax^{n}=anx^{n-1}}$ ${\displaystyle a,n}$  係常數。
${\displaystyle {d \over dx}\ \sin(x)=\cos(x)}$
${\displaystyle {d \over dx}\ \cos(x)=-\sin(x)}$
${\displaystyle {d \over dx}\ \tan(x)=\sec ^{2}(x)}$
${\displaystyle {d \over dx}\ \sec(x)=\sec(x)\tan(x)}$
${\displaystyle {d \over dx}\ \csc(x)=-\csc(x)\cot(x)}$
${\displaystyle {d \over dx}\ \cot(x)=-\csc ^{2}(x)}$ 。睇下三角函數
${\displaystyle {d \over dx}\ e^{x}=e^{x}}$ 。睇下自然指數
${\displaystyle {d \over dx}\ a^{x}=a^{x}\ln(a)}$
${\displaystyle {d \over dx}\ \ln(x)={1 \over x}}$
${\displaystyle {d \over dx}\ \log _{a}(x)={1 \over x\ln(a)}}$
${\displaystyle {d \over dx}\ \sin ^{-1}(x)={\frac {1}{\sqrt {1-x^{2}}}}}$
${\displaystyle {d \over dx}\ \cos ^{-1}(x)=-{\frac {1}{\sqrt {1-x^{2}}}}}$
${\displaystyle {d \over dx}\ \tan ^{-1}(x)={\frac {1}{1+x^{2}}}}$
${\displaystyle {d \over dx}\ \operatorname {erf} (x)={\frac {2}{\sqrt {\pi }}}e^{-x^{2}}}$

## 運算法則

• 加法：${\displaystyle [\ f(x)+g(x)\ ]'=f'(x)+g'(x)}$
• 乘法：${\displaystyle [\ f(x)\ g(x)\ ]'=f'(x)\ g(x)+f(x)\ g'(x)}$

${\displaystyle \ln(y)=\ln(fg)}$
${\displaystyle \ln(y)=\ln(f)+\ln(g)}$  (對數律)
${\displaystyle [\ln(y)]'=[\ln(f)+\ln(g)]'}$
${\displaystyle {y' \over y}={f' \over f}+{g' \over g}}$
${\displaystyle {y' \over y}={{f'g+fg'} \over fg}}$
${\displaystyle {(fg)' \over fg}={{f'g+fg'} \over fg}}$
${\displaystyle (fg)'=f'g+fg'}$
• 除法：${\displaystyle ({\frac {f(x)}{g(x)}})'={\frac {f'(x)g(x)-f(x)g'(x)}{g(x)^{2}}}}$
• 連鎖律：${\displaystyle {dy \over dx}={dy \over du}{du \over dx}}$

## 常見問題

${\displaystyle {\frac {d}{dx}}x^{3}=3x^{2}}$
${\displaystyle {\frac {d}{dx}}x^{2}=2x}$
${\displaystyle {\frac {d}{dx}}x=1}$  (呢度可以當係) ${\displaystyle x^{0}}$

${\displaystyle {\frac {d}{dx}}x^{0}=0x^{-1}=0}$

${\displaystyle \int x^{-3}dx={\frac {x^{-2}}{-2}}+C_{3}}$
${\displaystyle \int x^{-2}dx={\frac {x^{-1}}{-1}}+C_{2}}$
${\displaystyle \int x^{-1}dx={\frac {x^{0}}{0}}+C_{1}}$ ，出現0分母，所以唔會變成0之方，正確係
${\displaystyle \int x^{-1}dx=ln(x)+C_{0}}$

${\displaystyle ln(x)=\lim _{n->0}{\frac {x^{n}-1}{n}}}$  可以當成 ${\displaystyle {\frac {x^{0}-1}{0}}={\frac {x^{0}}{0}}-{\frac {1}{0}}}$  同上面嘅積分式一樣。

${\displaystyle {\frac {d}{dx}}ln(x)}$
${\displaystyle ={\frac {d}{dx}}\lim _{n\to 0}{\frac {x^{n}-1}{n}}}$
${\displaystyle =\lim _{n\to 0}{\frac {d}{dx}}{\frac {x^{n}-1}{n}}}$
${\displaystyle =\lim _{n\to 0}{\frac {nx^{n-1}}{n}}}$
${\displaystyle =\lim _{n\to 0}x^{n-1}}$
${\displaystyle =x^{-1}}$