0% found this document useful (0 votes)
43 views2 pages

Program Metode Posisi Palsu

This 3 sentence summary provides the key details about the document: The document describes applying the false position method to find the root of the equation cos(x) + 1 - x = 0, with initial values of a = 0.8 and b = 1.6 and an epsilon value of 10-5. A Pascal program is presented that implements the false position method through iterative calculations to find the root, and outputs the results of each iteration including the calculated root and error value.

Uploaded by

ELsa SeLvia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views2 pages

Program Metode Posisi Palsu

This 3 sentence summary provides the key details about the document: The document describes applying the false position method to find the root of the equation cos(x) + 1 - x = 0, with initial values of a = 0.8 and b = 1.6 and an epsilon value of 10-5. A Pascal program is presented that implements the false position method through iterative calculations to find the root, and outputs the results of each iteration including the calculated root and error value.

Uploaded by

ELsa SeLvia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

PROGRAM METODE POSISI PALSU

Terapkan metode Posisi Palsu untuk memperoleh akar persamaan : cos x + 1- x = 0


dengan a = 0,8 dan b = 1,6 dan epsilon 10-5

Penyelesaian :
Program Metode_Posisi_Palsu;
uses crt;
Label e;
var a,b,clama,c,fa,fb,fc,eps,
galat:real;
i:longint;
Begin
clrscr;
writeln('Nama : Elsa Selvia');
writeln('Nim : 54842');
writeln;
writeln(' ============================================================');
writeln(' Menerapkan Metode posisi Palsu ');
writeln(' Untuk Memperoleh Akar dari f(x):cos(x)+1-x=0 ');
writeln(' ============================================================');
writeln;
write('Masukkan Epsilon :');readln(eps);
write('Masukkan Nilai a :');readln(a);
write('Masukkan Nilai b :');readln(b);
i:=1;
clama:=(2*b)-a;
writeln;
writeln('-------------------------------------------------------------');
writeln(' Iterasi a b c f(a) f(b)
f(c) Galat ');
writeln('-------------------------------------------------------------');
begin
e :readln;
fa:=cos(a)+1-a;
fb:=cos(b)+1-b;
c:=b-(fb*(b-a)/(fb-fa));
fc:=cos(c)+1-c;
galat:=abs((c-clama)/c);
write(i:5,a:11:5,b:10:5,c:10:5,fa:11:5,fb:11:5,fc:11:5,galat:11:8);
writeln;
if (galat>eps) then
begin
if fa*fc<0 then
begin
b:=c;
end else
begin
a:=c;
end;
clama:=c;
inc(i);
goto e;
end else
begin
writeln;
writeln;
writeln('Karena',galat:11:8,'<',eps:9:9);
writeln;
writeln('Maka Akar f(x):cos(x)+1-x=0 ialah x=',c:9:9);
end;
end;
readln;
End.

TAMPILAN

You might also like