Viết phương trình tính tống S=\(\dfrac{1}{2}+\dfrac{1}{4}+\dfrac{1}{6}+...+\dfrac{1}{2n}\)
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.
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: \(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:
\(S=\dfrac{1}{2^2}\left(\dfrac{1}{2^2}+\dfrac{1}{3^2}+...+\dfrac{1}{n^2}\right)\)
=>\(S< =\dfrac{1}{4}\left(1-\dfrac{1}{2}+\dfrac{1}{2}-\dfrac{1}{3}+...+\dfrac{1}{n-1}-\dfrac{1}{n}\right)\)
=>\(S< =\dfrac{1}{4}\cdot\left(1-\dfrac{1}{n}\right)=\dfrac{1}{4}\cdot\dfrac{n-1}{n}< =\dfrac{1}{4}\)
\(a,P=\dfrac{1}{\left(2+1\right)\left(2+1-1\right):2}+\dfrac{1}{\left(3+1\right)\left(3+1-1\right):2}+...+\dfrac{1}{\left(2017+1\right)\left(2017+1-1\right):2}\\ P=\dfrac{1}{2\cdot3:2}+\dfrac{1}{3\cdot4:2}+...+\dfrac{1}{2017\cdot2018:2}\\ P=2\left(\dfrac{1}{2\cdot3}+\dfrac{1}{3\cdot4}+...+\dfrac{1}{2017\cdot2018}\right)\\ P=2\left(\dfrac{1}{2}-\dfrac{1}{3}+\dfrac{1}{3}-\dfrac{1}{4}+...+\dfrac{1}{2017}-\dfrac{1}{2018}\right)\\ P=2\left(\dfrac{1}{2}-\dfrac{1}{2018}\right)=2\cdot\dfrac{504}{1009}=\dfrac{1008}{1009}\)
\(b,\) Ta có \(\dfrac{1}{4^2}< \dfrac{1}{2\cdot4};\dfrac{1}{6^2}< \dfrac{1}{4\cdot6};...;\dfrac{1}{\left(2n\right)^2}< \dfrac{1}{\left(2n-2\right)2n}\)
\(\Leftrightarrow VT< \dfrac{1}{2\cdot4}+\dfrac{1}{4\cdot6}+...+\dfrac{1}{\left(2n-2\right)2n}\\ \Leftrightarrow VT< \dfrac{1}{2}\left(\dfrac{2}{2\cdot4}+\dfrac{2}{4\cdot6}+...+\dfrac{2}{\left(2n-2\right)2n}\right)\\ \Leftrightarrow VT< \dfrac{1}{2}\left(1-\dfrac{1}{4}+\dfrac{1}{4}-\dfrac{1}{6}+...+\dfrac{1}{2n-2}-\dfrac{1}{2n}\right)\\ \Leftrightarrow VT< \dfrac{1}{2}\left(1-\dfrac{1}{2n}\right)< \dfrac{1}{2}\cdot\dfrac{1}{2}=\dfrac{1}{4}\)
Bài 1:
uses crt;
var n,i:integer;
s:real;
begin
clrscr;
write('Nhap n='); readln(n);
s:=0;
for i:=1 to n do
s:=s+1/(2*i+1);
writeln(s:4:2);
readln;
end.