MATLAB: Hi, can any one please help me in solving the integral involving in this problem, The pdf is also attached. Thank you in advance

hmi amid

g = 1.55;
t = 2*10^-9;
L = 50*10^-6;
R = 50*10^-9;
u = (R+t)^2 – R^2;
kp = 3000;
kf = 0.663;
phi = 0.1;
phi1 = pi;
e = sqrt( 1 – (( R^2 + u ) / ( (L/2)^2 + u)));
G = ( 2 * e * ( 1 – e^2 )^1/6 ) / ( e * sqrt((1 – e^2)) + asin(e));
n = 3 * G^-g;
C = (( R + t )^2 – R^2 )/ R^2;
klr = ( kp * R * (1 + t/R – kf/ kp) * log (1 + t/R ))/ ( t * kf * log ((1 + t/R ) * kp / kf));
B = ( R/ (R + t))* ((( kp – klr)/(klr + kp)) – 1);
A = – (2 * klr / (kp + klr));
kpez = (kp + C * klr)/ (1 + C);
kpex = (A * phi * kp + B * C * phi *klr) / (A * phi + B * C * phi);
syms x;
g = inline('sqrt( (kpez)^2 * sin(x)^2+ (kpex)^2 * cos(x)^2)', 'x', 'kpez' , 'kpex')
kpe = (1/ pi) * int(g(x, kpez, kpex),x,0,pi);
B1 = (kpe + kf * (n – 1) + (n + 1)* (kpe – kf) * (1 + C) * phi1)/ (kpe + kf * (n – 1)- (kpe-kf) * (1 + C) * phi1 )

Best Answer

Remove
syms x
and use
g=@(x)sqrt(kpez^2*sin(x).^2+kpex^2*cos(x).^2);
kpe=1/pi*integral(g,0,pi);
Best wishes
Torsten.