kill(all)$

van=facebook.com/LearningCalculus$

f(x):=%e^(-x/2)*sqrt(1-sin(x))/(1+cos(x));

integrate(f(x),x);

F(x) := %e^(-x/2)*sqrt(1-sin(x))*sec(x)^2/(tan(x/2)-1)+C;

subst(1/cos(x),sec(x),F(x));