Viết chương trình tính:
a.\(\text{ }\text{ }1+\dfrac{1}{2!}+\dfrac{1}{3!}+...+\dfrac{1}{n!}.\)
b. \(1+\dfrac{1}{2^2}+\dfrac{1}{3^2}+...+\dfrac{1}{n^2}.\)
c. \(3+\dfrac{4}{3}+1+...+\dfrac{n+2}{2n-1}.\)
Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
a: \(M=\dfrac{6}{5}+\dfrac{3}{2}\left(\dfrac{2}{5\cdot7}+...+\dfrac{2}{97\cdot99}+\dfrac{2}{99\cdot101}\right)\)
\(=\dfrac{6}{5}+\dfrac{3}{2}\left(\dfrac{1}{5}-\dfrac{1}{101}\right)\)
\(=\dfrac{6}{5}+\dfrac{3}{10}-\dfrac{3}{202}=\dfrac{150}{101}\)
b:
\(\left(\frac{1}{1}+\frac{1}{3}+\frac{1}{5}+....+\frac{1}{2n-1}\right)-\left(\frac{1}{2}+\frac{1}{4}+....+\frac{1}{2n}\right)=\left(\frac{1}{1}+\frac{1}{2}+\frac{1}{3}+.....+\frac{1}{2n-1}+\frac{1}{2n}\right)-2\left(\frac{1}{2}+\frac{1}{4}+.....+\frac{1}{2n}\right)=\frac{1}{1}+\frac{1}{2}+\frac{1}{3}+...+\frac{1}{2n-1}+\frac{1}{2n}-\frac{1}{1}-\frac{1}{2}-....-\frac{1}{n}=\frac{1}{n+1}+\frac{1}{n+2}+....+\frac{1}{2n}\left(\text{đpcm}\right)\)
program Bai_1;
uses crt;
var n,i:integer; s:real;
begin
clrscr;
write('Nhap n: '); readln(n);
for i:=1 to n do s:=s+1/(2*i);
write('S=',s);
readln;
end.
program Bai_2;
uses crt;
var n,i:integer; gt:longint; s:real;
begin
clrscr;
write('n='); readln(n);
gt:=1;
for i:=1 to n do
begin
gt:=gt*i;
s:=s+1/gt;
end;
write('S=',s);
readln;
end.
- nếu như khai báo biến S:real thì nên thêm độ rộng chữ số vào kq
\(A=\dfrac{1}{1.2.3}+\dfrac{1}{2.3.4}+....+\dfrac{1}{18.19.20}=\dfrac{1}{2}\left(\dfrac{1}{1.2}-\dfrac{1}{2.3}+\dfrac{1}{2.3}-\dfrac{1}{3.4}+...+\dfrac{1}{18.19}-\dfrac{1}{19.20}\right)\\ =\dfrac{1}{2}\left(\dfrac{1}{2}-\dfrac{1}{19.20}\right)\\ =\dfrac{1}{4}-\dfrac{1}{2.19.20}< \dfrac{1}{4}\)
Cái B TT nhé
\(\dfrac{1}{2^2}+\dfrac{1}{3^2}+....+\dfrac{1}{n^2}< \dfrac{1}{1.2}+\dfrac{1}{2.3}+...+\dfrac{1}{\left(n-1\right)n}\\ =1-\dfrac{1}{2}+\dfrac{1}{2}-\dfrac{1}{3}+...+\dfrac{1}{n-1}-\dfrac{1}{n}\\ =1-\dfrac{1}{n}< 1\)
D TT
E mk thấy nó ss ớ
a) Đặt \(A=\dfrac{1}{2^2}+\dfrac{1}{4^2}+\dfrac{1}{6^2}+...+\dfrac{1}{\left(2n\right)^2}\)
\(A=\dfrac{1}{2^2}\left(1+\dfrac{1}{2^2}+\dfrac{1}{3^2}+...+\dfrac{1}{n^2}\right)\)
Ta có:
\(\dfrac{1}{2^2}+\dfrac{1}{3^2}+...+\dfrac{1}{n^2}< \dfrac{1}{1.2}+\dfrac{1}{2.3}+...+\dfrac{1}{\left(n-1\right)n}\)
\(\dfrac{1}{2^2}+\dfrac{1}{3^2}+...+\dfrac{1}{n^2}< 1-\dfrac{1}{2}+\dfrac{1}{2}-\dfrac{1}{3}+...+\dfrac{1}{n-1}-\dfrac{1}{n}\)
\(\dfrac{1}{2^2}+\dfrac{1}{3^2}+...+\dfrac{1}{n^2}< 1-\dfrac{1}{n}\)
\(\Rightarrow1+\dfrac{1}{2^2}+\dfrac{1}{3^2}+...+\dfrac{1}{n^2}< 1-\dfrac{1}{n}+1\)
\(\Rightarrow1+\dfrac{1}{2^2}+\dfrac{1}{3^2}+...+\dfrac{1}{n^2}< 2-\dfrac{1}{n}\)
\(\Rightarrow\dfrac{1}{2^2}\left(1+\dfrac{1}{2^2}+\dfrac{1}{3^2}+...+\dfrac{1}{n^2}\right)< \dfrac{1}{2^2}\left(2-\dfrac{1}{2}\right)\)
\(\Rightarrow A< \dfrac{1}{2^2}.2-\dfrac{1}{2^2}.\dfrac{1}{2}\)
\(\Rightarrow A< \dfrac{1}{2}-\dfrac{1}{2^3}< \dfrac{1}{2}\)
Vậy \(A< \dfrac{1}{2}\left(Đpcm\right)\)
b) Đặt \(B=\dfrac{1}{3^2}+\dfrac{1}{5^2}+\dfrac{1}{7^2}+...+\dfrac{1}{\left(2n+1\right)^2}\)
Ta có:
\(B< \dfrac{1}{1.3}+\dfrac{1}{3.5}+\dfrac{1}{5.7}+...+\dfrac{1}{\left(2n-1\right)\left(2n+1\right)}\)
\(B< \dfrac{1}{2}\left(\dfrac{2}{1.3}+\dfrac{2}{3.5}+\dfrac{2}{5.7}+...+\dfrac{2}{\left(2n-1\right)\left(2n+1\right)}\right)\)
\(B< \dfrac{1}{2}\left(1-\dfrac{1}{3}+\dfrac{1}{3}-\dfrac{1}{5}+\dfrac{1}{5}-\dfrac{1}{7}+...+\dfrac{1}{2n-1}-\dfrac{1}{2n+1}\right)\)
\(B< \dfrac{1}{2}\left(1-\dfrac{1}{2n+1}\right)\)
\(B< \dfrac{1}{2}\left(\dfrac{2n+1}{2n+1}-\dfrac{1}{2n+1}\right)\)
\(B< \dfrac{1}{2}.\dfrac{2n}{2n+1}\)
\(B< \dfrac{2n}{4n+2}\)
\(B< \dfrac{2n}{2\left(2n+1\right)}\)
\(B< \dfrac{n}{2n+1}\)
a.
program caua;
uses crt;
var x,i, n: integer;
A: real;
begin
clrscr;
write('Nhap so n, n = '); read(n);
A:=0; x:=1;
for i:=1 to n do
begin
i:=x*i; A:=1/i;
end;
write("Gia tri bieu thuc dau tien la',A);
readln
end.