tanx の積分【推しの積分10】
の様々な積分を計算していきます.
で検索する人が多いので で記事書けばアクセス伸びるやろ
て思ったので、書きました.
単純に の積分はこんな感じです.
ただの のくせに一筋縄ではいかないのが腹立ちますね.
\begin{eqnarray*}
\int \tan{x} \, dx &=& \int \dfrac{\sin{x}}{\cos{x}} \, dx \\
&=& -\int \dfrac{(\cos{x})'}{\cos{x}} \, dx \\
&=& -\log{|\cos{x}|} + C
\end{eqnarray*}
2乗しました. 三角関数は2乗があるほうが様々な変形が考えられますしね.
\begin{eqnarray*}
\int \tan^{2}{x} \, dx &=& \int \left( \dfrac{1}{\cos^{2}{x}}-1 \right) \, dx \\
&=& \tan{x} - x + C
\end{eqnarray*}
3乗しました. 奇数乗になったので変形どうしようかなと思いますが、
\begin{eqnarray*}
\int \tan^{3}{x} \, dx &=& \int \tan^{2}{x}\tan{x} \, dx \\
&=& (\tan{x}-x) \tan{x} -\int (\tan{x}-x) \dfrac{1}{\cos^{2}{x}} \, dx \\
&=& \tan^{2}{x} - x\tan{x} - \dfrac{1}{2}\tan^{2}{x} + \int \dfrac{x}{\cos^{2}{x}} \, dx \\
&=& \dfrac{1}{2}\tan^{2}{x} -x\tan{x} + x\tan{x} -\int \tan{x} \, dx \\
&=& \dfrac{1}{2}\tan^{2}{x} + \log{|\cos{x}|} + C
\end{eqnarray*}
n乗しました. こういうnに関する積分は往々にして漸化式を作ります.
その漸化式がちゃんと解けるのかとかは別問題ですが、
これはどうでしょうか.
とします.
\begin{eqnarray*}
I_n &=& \int \tan^{n}{x} \, dx \\
&=& \int \tan^{2}{x}\tan^{n-2}{x} \, dx \\
&=& (\tan{x}-x)\tan^{n-2}{x} - \int (\tan{x}-x)(n-2)\tan^{n-3}{x}\dfrac{1}{\cos^{2}{x}} \, dx \\
&=& \tan^{n-1}{x} -x\tan^{n-2}{x}- (n-2)\int \tan^{n-2}{x}\dfrac{1}{\cos^{2}{x}} \, dx + (n-2)\int \tan^{n-3}\dfrac{1}{\cos^{2}{x}}x \, dx \\
&=& \tan^{n-1}{x} -x\tan^{n-2}{x}-\dfrac{n-2}{n-1}\tan^{n-1}{x} + (n-2)\left( \dfrac{1}{n-2}x\tan^{n-2}{x} - \dfrac{1}{n-2}\int \tan^{n-2}{x} \, dx \right) \\
&=& \dfrac{1}{n-1}\tan^{n-2}{x} -\int \tan^{n-2}{x} \, dx \\
&=& \dfrac{1}{n-1}\tan^{n-2}{x} - I_{n-2}
\end{eqnarray*}
あと、他サイトで を2行目に使ってちょちょいとやってのけているのを見かけましたが、
なるほどこれが一番早いなと思いましたが、こういう回りくどいやり方もいいんじゃないでしょうか(いいわけ).