How to find the Maclaurin series for $f(x)=\ln(1+\tan {x})$. I tried it by successively differentiating it up to four times but it is very time consuming.
2026-03-27 14:58:55.1774623535
On
Maclaurin series for $f(x)=\ln(1+\tan{x})$
2.6k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
3
On
According to OEIS, the series can be written as $$\log (1+\tan x) = \sum_{n=0}^\infty \frac{a_n}{n!} x^n,$$ where $$a_n = \sum_{m=0}^{(n-1)/2} \sum_{j=0}^{2m} \binom{j+n-2m-1}{n-2m-1} \frac{(j+n-2m)!}{n-2m} \, 2^{2m-j} (-1)^{n-m+j-1} \left\{{n} \atop {j+n-2m}\right\}$$ where $\{{a \atop b}\}$ is a Stirling number of the second kind. Numeric calculation with Mathematica supports this; e.g.,
S[u_] := (Range[u + 1] - 1)! CoefficientList[Normal[Series[Log[1 + Tan[x]],
{x, 0, u}]], x] - Table[Sum[Binomial[j + n - 2 m - 1, n - 2 m - 1]
(j + n - 2 m)! 2^(2 m - j) (-1)^(n - m + j - 1) StirlingS2[n,
j + n - 2 m]/(n - 2 m), {m, 0, (n - 1)/2}, {j, 0, 2 m}], {n, 0, u}]
Then S[50] for example gives a list of zeros, indicating equality.
For this kind of work, I think that composition of series is a simple way $$\tan(x)=x+\frac{x^3}{3}+\frac{2 x^5}{15}+\frac{17 x^7}{315}+O\left(x^9\right)$$ Let $t$ to be the above development and use $$\log(1+t)=t-\frac{t^2}{2}+\frac{t^3}{3}-\frac{t^4}{4}+\cdots$$ and use the binomial expansion (stopping when you find powers of $x$ greater than $7$ to get $$\ln(1+\tan{(x)})=x-\frac{x^2}{2}+\frac{2 x^3}{3}-\frac{7 x^4}{12}+\frac{2 x^5}{3}-\frac{31 x^6}{45}+\frac{244 x^7}{315}+O\left(x^8\right)$$ Notice that using this process, we could continue for ever; for example $$\sin (\log (\tan (x)+1))=x-\frac{x^2}{2}+\frac{x^3}{2}-\frac{x^4}{3}+\frac{13 x^5}{60}-\frac{23 x^6}{360}-\frac{271 x^7}{2520}+O\left(x^8\right)$$ $$\tan (\sin (\log (\tan (x)+1)))=x-\frac{x^2}{2}+\frac{5 x^3}{6}-\frac{5 x^4}{6}+\frac{11 x^5}{10}-\frac{229 x^6}{180}+\frac{323 x^7}{210}+O\left(x^8\right)$$ and so on.