You are on page 1of 2

Program Deret_Tayor_ln_1; uses wincrt; type larik = array[0..

100] of real; var x,x0 n,i a jumlah1 : real; : integer; : larik; :real;

function df(x0 :real ; k:integer ):real; var i : integer; fak,hasil,n :real; begin fak :=1; for i:=0 to k do if i = 0 then fak:=1 else fak := fak*(0.5 -i+1); hasil := fak*exp((0.5 -i)*ln(x0+1)); df:=hasil; end;

{--suku(x)--} function suku(x,x0 : real; k : integer):real; begin suku:= exp(k*ln(x)); end;

function fak(k:integer):integer; var kali,i : integer; begin kali:=1; for i:= 0 to k do if i=0 then kali:=1 else kali:=kali*i; fak:=kali; end;

function jumlah(a:larik;k:integer):real; var

readln(n).n. writeln. for i:= 0 to k do begin a[i]:=(df(x0. jumlah(a.x0. jumlah:=sum.jumlah1:15:8). writeln('Fungsi f(x) = ln(x+1) '). writeln.x0.fak(i):10.n). jumlah1:=jumlah(a.n). writeln.(df(x0. WRITELN('MATA KULIAH : UTS PRAKTIKUM METNUM'). end. begin WRITELN('NAMA : ANDRE ARIZONA').suku(x. end. end. sum := 0. : integer. fak(n).n). ' adalah '. .i))*(suku(x.i):10:0.' untuk x ='. sum:=sum + a[i].readln(x). write('Ekspansi disekitar x0 = '). write('Orde Polinomial (n) = ').x0. : real.x0. for i:=0 to n do writeln(i:7. write('Nilai ekpansi Polinomial di x = ').df(x0. suku(x.sum i jumlah1 begin : real.readln(x0).i))*(suku(x.n). writeln('Polinomial orde '.i)/fak(i)).x:4:0. df(x0.i):10:0. WRITELN('NIM : 10951006914').i)/f ak(i)):15:5).