How to solve the function and check the concavity of the function with respect to x?

enter image description here

As shown in the above formula.

Given x, we are able to solve nR and thereby the pi.
We check that nR increase in x using x ranging from [0:1:50] by plotting. But how to check the concavity of pi with respect to x to show the existence and uniqueness of x* Finally, check how the optimal x* changes with alpha.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear;

v0 = 0;  v = 10;  m = 4;  f = 1.5;  pT = 8;  beta = 20;  n = 100;  gamma = 10;  w0 = 10;  alpha=0.2; c0=1; c1=0.3; alpha=0.2; x_gd = [0:1:10000];  for nk = 1:length(x_gd)  x = x_gd(nk);   funCustomer = @(y) y - n.*exp (v-m*f+beta.*gamma.*x./(m.*y)-w0)./(exp(v0)+...           exp(v-m*f+beta.*gamma.*x./(m.*y)-w0)+exp(v-pT));   nR(nk) = fzero(@(y) funCustomer(y), [-1000, 1000]);  nS(nk) = n.*exp (v-pT)./(exp(v0)+exp(v-m.*f+beta.*gamma.*x./(m.*nR(nk))-w0)+exp(v-pT));  pi_x(nk)=(1-0.2)*f*m*nS(nk)-c1*x-c0; end  figure(1)  plot(x_gd,nR) xlabel('x');  ylabel('nR');   figure(2)  plot(x_gd,nS) xlabel('x');  ylabel('nS');   figure(3)  plot(x_gd,pi_x) xlabel('x');  ylabel('pi_x');