The first step was your mistake. $\displaystyle \frac{\cos t}{1+\sin t} \neq \cos t + \frac{\cos t}{\sin t}$
So you're given $\displaystyle \int_0^\frac{\pi}{2} \frac{\cos t}{1 + \sin t} \, \mathrm{d}x$
It would be better to set u equal to the denominator since the derivative of 1 is 0, allowing you to substitute more.
Set u as the denominator | $\displaystyle u = 1 + \sin t$
$\displaystyle \mathrm{d}u = \cos t \, \mathrm{d}t$ |
Substitute | $\displaystyle \int_0^\frac{\pi}{2} \frac{1}{u} \, \mathrm{d}u$ |
Integrate | $\displaystyle \ln u \, \biggr|_0^\frac{\pi}{2}$ |
Back track u | $\displaystyle \ln |1 + \sin t \, | \, \biggr|_0^\frac{\pi}{2}$ |
Evaluate anti-derivative at limits | $\displaystyle \ln |1 + \sin \frac{\pi}{2} \, | - \ln |1 + \sin 0 |$ |
Simplify | $\displaystyle 2$ |