Nếu đề đúng thì chắc không tính được
Sửa đề:
Cho \(A=1+3+3^2+...+3^{20}\). \(B=3^{21}\div2\)
Tính \(B-A\)
Giải:
Ta có:
\(A=1+3+3^2+...+3^{20}\)
\(\Rightarrow3A=3+3^2+3^3+...+3^{21}\)
\(\Rightarrow3A-A=\left(3+3^2+3^3+...+3^{21}\right)-\left(1+3+3^2+...+3^{20}\right)\)
\(\Rightarrow2A=3^{21}-1\)
\(\Rightarrow A=\dfrac{3^{21}-1}{2}=\dfrac{3^{21}}{2}-\dfrac{1}{2}\)
Lại có:
\(B=3^{21}\div2=\dfrac{3^{21}}{2}\)
\(\Rightarrow B-A=\dfrac{3^{21}}{2}-\left(\dfrac{3^{21}}{2}-\dfrac{1}{2}\right)\)
\(\Rightarrow B-A=0-\dfrac{1}{2}\)
\(\Rightarrow B-A=\dfrac{-1}{2}\)
Vậy \(B-A=\dfrac{-1}{2}\)