function [phi2]=Phi_2(thetmin,thetstar,gamma1)
%% define a function to compute the integral term Phi_2
% theta~Pareto(gamma1)
% theta_min=1-1/gamma_1
% the expectation of theta is assumed to be 1; the std of thet is 1\thet(thet-2)

% compute the integral term \min{\theta,\theta^{*}}
phi2= (-1./gamma1.*(thetmin./thetstar).^(gamma1-1)+1).*(thetstar>=thetmin)+thetstar.*(thetstar<thetmin);