✔ 最佳答案
Suppose e^x = (1/2)a_0 + Σ(a_n)cos(nx) + Σ(b_n)sin(nx), (n runs from 1 to infinity), x in [-π, π].
Then
a_0 = (1/π)∫(e^x) dx,
a_n = (1/π)∫(e^x)cos(nx) dx,
b_n = (1/π)∫(e^x)sin(nx) dx,
where the integrals are integrated from -π to π.
Let A(x) = ∫(e^x)cos(nx) dx and B(x) = ∫(e^x)sin(nx) dx.
Then A(x) + iB(x)
= ∫(e^x)(e^nix) dx
= ∫[e^(1+ni)x] dx
= e^(1+ni)x / (1 + ni) + C, where C is an arbitrary complex constant
= (1 - ni)(e^x)[cos(nx) + isin(nx)]/(1+n^2) + C
= (e^x)[cos(nx) + nsin(nx)]/√(1 + n^2) + i(e^x)[sin(nx) - ncos(nx)]/(1+n^2) + C.
By comparing real and imaginary parts respectively,
∫(e^x)cos(nx) dx = (e^x)[cos(nx) + nsin(nx)]/√(1 + n^2) + k, and
∫(e^x)sin(nx) dx = (e^x)[sin(nx) - ncos(nx)]/(1+n^2) + k',
where k and k' are real constants.
[This result may also be obtained by integrating by parts.]
Taking limits from -π to π for both integrals, we get the a_n's and b_n's:
a_0 = [e^π - e^(-π)]/π = 2sinh π / π ,
a_n = (-1)^n * [e^π - e^(-π)]/(1+n^2)π = (-1)^n * 2sinh π / (1+n^2)π,
b_n = (-1)^(n-1) * n[e^π - e^(-π)]/(1+n^2)π = (-1)^(n-1) * 2nsinh π / (1+n^2)π.
Hence, e^x = sinh π /π + (2sinh π /π) * Σ{(-1)^n * [cos(nx) - sin(nx)]/(1+n^2)}, (n runs from 1 to infinity), x in [-π, π].
Put x = π. Then
e^π = sinh π /π + (2sinh π /π) * Σ[1/(1+n^2)].
Put x = -π. Then
e^(-π) = sinh π /π + (2sinh π /π) * Σ[1/(1+n^2)].
Summing up, get
e^π + e^(-π) = 2sinh π /π + (4sinh π /π) * Σ[1/(1+n^2)].
2cosh π = (2sinh π /π) [1 + 2Σ[1/(1+n^2)]}.
Hence Σ[1/(1+n^2)] = [(π / tanh π) - 1]/2.
Similarly, put x = 0. Then
1 = sinh π /π + (2sinh π /π) * Σ[(-1)^n /(1+n^2)].
Hence Σ[(-1)^n /(1+n^2)] = [(π/sinh π) - 1]/2.