# inttanx/(1-sinx)?

Mar 2, 2018

$I = \frac{1}{2} {\sec}^{2} x + \left[\frac{1}{2} \sec x \tan x - \frac{1}{2} \cdot \ln \left(\sec x + \tan x\right)\right] + C$

#### Explanation:

$I = \int \frac{\tan x}{1 - \sin x} \mathrm{dx}$

Divide each, numerator and denominator by $\cos x$

$= \int \frac{\tan \frac{x}{\cos} x}{\frac{1}{\cos} x - \sin \frac{x}{\cos} x} \mathrm{dx}$

$= \int \frac{\sec x \tan x}{\sec x - \tan x} \mathrm{dx}$

Multiply and divide the expression by $\left(\sec x + \tan x\right)$

$= \int \frac{\left(\sec x \tan x\right) \left(\sec + \tan x\right)}{\left(\sec x - \tan x\right) \left(\sec + \tan x\right)} \mathrm{dx}$

$\Rightarrow \int \frac{\left(\sec x + \tan x\right) \sec x \tan x}{{\sec}^{2} x - {\tan}^{2} x} \mathrm{dx}$

as,  color(magenta)(sec^2x-tan^2x=1

$\Rightarrow \int \left(\sec x + \tan x\right) \times \sec x \tan x \mathrm{dx}$

Let, color(red)(secx=t, therefore ,$\sec x \tan x \mathrm{dx} = \mathrm{dt}$

$\Rightarrow I = \int \left(t + \sqrt{{t}^{2} - 1}\right) \mathrm{dt}$

$= \int t . \mathrm{dt} + \int \sqrt{{t}^{2} - 1} . \mathrm{dt}$

Applying, color(green)(intsqrt(X^2-a^2)dX=X/2sqrt(X^2-a^2)-a^2/2*ln|X+sqrt(X^2-a^2)|+C

$= {t}^{2} / 2 + \left[\frac{t}{2} \sqrt{{t}^{2} - 1} - \frac{1}{2} \cdot \ln \left(t + \sqrt{{t}^{2} - 1}\right)\right] + C$

Replacing , $t = \sec x$

$\Rightarrow I = {\sec}^{2} \frac{x}{2} + \left[\sec \frac{x}{2} \sqrt{{\sec}^{2} x - 1} - \frac{1}{2} \cdot \ln | \sec x + \sqrt{{\sec}^{2} x - 1 |}\right] + C$

$\Rightarrow I = {\sec}^{2} \frac{x}{2} \left[\frac{1}{2} \sec x \textcolor{m a \ge n t a}{\tan x} - \frac{1}{2} \cdot \ln | \sec x + \textcolor{m a \ge n t a}{\tan x} |\right] + C$

Mar 2, 2018

The answer is $= - \frac{1}{4} \ln \left(1 + \sin x\right) - \frac{1}{2 \left(1 - \sin x\right)} + \frac{1}{4} \ln \left(1 - \sin x\right) + C$

#### Explanation:

We need

${\cos}^{2} x = 1 - {\sin}^{2} x$

Therefore,

$\int \frac{\tan x \mathrm{dx}}{1 - \sin x} = \int \frac{\sin x \mathrm{dx}}{\cos x \left(1 - \sin x\right)}$

$= \int \frac{\sin x \cos x \mathrm{dx}}{{\cos}^{2} x \left(1 - \sin x\right)}$

$= \int \frac{\sin x \cos x \mathrm{dx}}{\left(1 - {\sin}^{2} x\right) \left(1 - \sin x\right)}$

$= \int \frac{\sin x \cos x \mathrm{dx}}{\left(1 + \sin x\right) {\left(1 - \sin x\right)}^{2}}$

Perform the substitution

$u = \sin x$, $\implies$, $\mathrm{du} = \cos x \mathrm{dx}$

Therefore,

$\int \frac{\tan x \mathrm{dx}}{1 - \sin x} = \int \frac{u \mathrm{du}}{\left(1 + u\right) {\left(1 - u\right)}^{2}}$

Perform the decomposition into partial fractions

$\frac{u}{\left(1 + u\right) {\left(1 - u\right)}^{2}} = \frac{A}{1 + u} + \frac{B}{1 - u} ^ 2 + \frac{C}{1 - u}$

$= \frac{A {\left(1 - u\right)}^{2} + B \left(1 + u\right) + C \left(1 + u\right) \left(1 - u\right)}{\left(\left(1 + u\right) {\left(1 - u\right)}^{2}\right)}$

The denominators are the same, compare the numerators

$u = A {\left(1 - u\right)}^{2} + B \left(1 + u\right) + C \left(1 + u\right) \left(1 - u\right)$

Let $u = - 1$, $\implies$, $- 1 = 4 A$, $\implies$, $A = - \frac{1}{4}$

Let $u = 1$, $\implies$, $1 = 2 B$, $\implies$, $B = \frac{1}{2}$

Coefficients of ${u}^{2}$

$0 = A - C$, $\implies$, $C = A = - \frac{1}{4}$

Therefore,

$\frac{u}{\left(1 + u\right) {\left(1 - u\right)}^{2}} = \frac{- \frac{1}{4}}{1 + u} + \frac{\frac{1}{2}}{1 - u} ^ 2 + \frac{- \frac{1}{4}}{1 - u}$

So,

$\int \frac{\tan x \mathrm{dx}}{1 - \sin x} = \int \frac{- \frac{1}{4} \mathrm{du}}{1 + u} + \int \frac{\frac{1}{2} \mathrm{du}}{1 - u} ^ 2 + \int \frac{- \frac{1}{4} \mathrm{du}}{1 - u}$

$= - \frac{1}{4} \ln \left(1 + u\right) - \frac{1}{2} \cdot \frac{1}{1 - u} + \frac{1}{4} \ln \left(1 - u\right)$

$= - \frac{1}{4} \ln \left(1 + \sin x\right) - \frac{1}{2 \left(1 - \sin x\right)} + \frac{1}{4} \ln \left(1 - \sin x\right) + C$