#sec(theta) + cos^2(theta) - cos(theta)#
To simplify in terms of #sin(theta)# let us write #sec(theta)# as #1/cos(theta)#
#=1/cos(theta) + cos^2(theta) - cos(theta)#
#=1/cos(theta) + (cos^2(theta)cos(theta))/cos(theta) - (cos(theta)cos(theta))/cos(theta)#
#= (1+cos^3(theta)-cos^2(theta))/cos(theta)#
#=(1-cos^2(theta) + cos(theta)cos^2(theta))/cos(theta)#
#=(sin^2(theta)+sqrt(1-sin^2(theta))(1-sin^2(theta)))/sqrt(1-sin^2(theta)#
If you need it can be simplified further as
#=sin^2(theta)/sqrt(1-sin^2(theta)) + (sqrt(1-sin^2(theta))(1-sin^2(theta)))/sqrt(1-sin^2(theta)#
#=sin^2(theta)/sqrt(1-sin^2(theta)) + (cancel(sqrt(1-sin^2(theta)))(1-sin^2(theta)))/cancel(sqrt(1-sin^2(theta))#
#=sin^2(theta)/sqrt(1-sin^2(theta)) + 1- sin^2(theta)#