Struggling to find a Closed Form for an Integral 
$$\large{\int_0^\theta (\tan\theta-\sin\theta)\sec^2\theta d\theta}$$

$$$$
The following Integral came up while computing the value of Work performed by a Spring force. I tried to search for the Closed Form on wolfram Alpha too, but could not get any Closed Form. $$$$I would truly appreciate i if somebody would kindly show me how to compute the Integral. Many thanks!
 A: Hint:  Converting everything to sines and cosines sometimes helps.  In this case
$$\int(\tan\theta-\sin\theta)\sec^2\theta\,d\theta=\int\left({1\over\cos^3\theta}-{1\over\cos^2\theta}\right)\sin\theta\,d\theta$$
Now let $u=\cos\theta$.
A: Split the integral as,
$$\displaystyle\int_{0}^\theta\tan\theta\sec^2\theta\ d\theta-\displaystyle\int_{0}^\theta\sec\theta\tan\theta\ d\theta$$
For the first integral substitute $\sec^2\theta=u$ or $\tan\theta=u$. I hope you can do the second one.
A: $\textbf{hint}$
$$
(\tan \theta - \sin \theta)\sec^2\theta = \left(\sec \theta -1\right)\sin \theta \sec^2\theta = \left(\sec \theta -1\right)\tan\theta \sec\theta
$$
what is the derivative of $\sec \theta -1$?
A: First of all, you might notice that the limit of integration and the variable of integration cannot be the same! So the right way of writing this down is
$$\int_0^\theta  {\left( {\tan x - \sin x} \right){{\sec }^2}xdx} $$
As I just memorize the derivatives for ${\sin x }$ and ${\cos x }$, I do it this way
$$\eqalign{
  & \int_0^\theta  {\left( {\tan x - \sin x} \right){{\sec }^2}xdx}  = \int_0^\theta  {\tan x{{\sec }^2}xdx}  - \int_0^\theta  {\sin x{{\sec }^2}xdx}   \cr 
  & \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, = \,\int_0^\theta  {{{\sin x} \over {{{\cos }^3}x}}dx - \int_0^\theta  {{{\sin x} \over {{{\cos }^2}x}}dx} }   \cr 
  & \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, = \left. {{{{{\cos }^{ - 2}}x} \over 2}} \right|_0^\theta  - \left. {{{{{\cos }^{ - 1}}x} \over 1}} \right|_0^\theta  \cr} $$
and I leave the rest of computation for your! :)
