已知正项数列\(\left\{a_n\right\}\)的前\(n\)项和为\(S_n\).
(1)若\[\forall n\in\mathcal N^*,S_n=\dfrac 12\left(a_n+\dfrac{1}{a_n}\right),\]求数列\(\left\{a_n\right\}\)的通项公式;
(2)若\[\forall n\in\mathcal N^*,a_n=\dfrac 12\left(S_n+\dfrac{1}{S_n}\right),\]求数列\(\left\{a_n\right\}\)的通项公式.
当\(n\geqslant 2\)时,根据已知条件有\[S_n=\dfrac 12\left(S_n-S_{n-1}+\dfrac{1}{S_n-S_{n-1}}\right),\]整理得\[S_n^2-S_{n-1}^2=1,\]从而有\[S_n^2=n,\]进而不难解得\[a_n=\sqrt n-\sqrt{n-1}.\]
经验证,当\(n=1\)时,上式亦适用.因此\(a_n=\sqrt{n}-\sqrt{n-1},n\in\mathcal N^*\).
(2)当\(n=1\)时,可得\(a_1=1\);
当\(n\geqslant 2\)时,根据已知条件有\[S_n-S_{n-1}=\dfrac 12\left(S_n+\dfrac{1}{S_n}\right),\]整理得\[\dfrac{1}{S_{n-1}}=\dfrac{\dfrac 2{S_n}}{1-\dfrac{1}{S_n^2}}.\]联想到三角公式\[\tan{2x}=\dfrac{2\tan x}{1-\tan^2{x}},\]结合\[S_1=1=\tan\dfrac{\pi}{4},\]可得\[\dfrac{1}{S_n}=\tan\dfrac{\pi}{2^{n+1}},\]进而可得\[a_n=\dfrac{1}{\sin\dfrac{\pi}{2^n}}.\]
经验证,当\(n=1\)时,上式亦适用.因此\(a_n= \dfrac{1}{\sin\dfrac{\pi}{2^n}},n\in\mathcal N^*\).