function [Bk,Hk]=DFP(ddf,Xk,df,f,Bk_old)

pt2=Xk(1,1);
pt3=Xk(2,1);
pr2=Xk(3,1);
pr3=Xk(4,1);

gk_temp=eval(df);

pk=-inv(Bk_old)*gk_temp;

alpha_k=wolfe(Xk,f,pk,df);

sk=alpha_k*pk;

gk=eval(df);

temp=Xk+alpha_k*pk;
pt2=temp(1,1);
pt3=temp(2,1);
pr2=temp(3,1);
pr3=temp(4,1);

temp_gk=eval(df);

yk=temp_gk-gk;

rouk=1/(yk.'*sk);

Bk=(eye(length(df))-rouk*yk*sk.')*Bk_old*(eye(length(df))-rouk*sk*yk.')+rouk*yk*yk.';

Hk=inv(Bk_old)-inv(Bk_old)*yk*yk.'*inv(Bk_old)/(yk.'*inv(Bk_old)*yk)+sk*sk.'/(yk.'*sk);

