# How to solve it ?

Mar 11, 2018

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

#### Explanation:

We want to solve

$I = \int \cos \frac{x}{\cos \left(x\right) + \sin \left(x\right)} \mathrm{dx}$

We can quite easily find

color(green)(I_1=int(cos(x)+sin(x))/(cos(x)+sin(x))dx and $\textcolor{g r e e n}{{I}_{2} = \int \frac{\cos \left(x\right) - \sin \left(x\right)}{\cos \left(x\right) + \sin \left(x\right)} \mathrm{dx}}$

So can we find some constants such

$I = A {I}_{1} + B {I}_{2}$

Only the denominator have changed, thus we seek

$\cos \left(x\right) = A \left(\cos \left(x\right) + \sin \left(x\right)\right) + B \left(\cos \left(x\right) - \sin \left(x\right)\right)$

By letting $x = 0$ and $x = \frac{\pi}{2}$

$1 = A + B$
$\textcolor{w h i t e}{0 = A - B s s c \mathrm{dc} f c s s} \implies A = B = \frac{1}{2}$
$0 = A - B$

Therefore

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

$\textcolor{w h i t e}{I} = \frac{1}{2} \int \mathrm{dx} + \frac{1}{2} \int \frac{1}{u} \mathrm{du}$

$\textcolor{w h i t e}{I} = \frac{1}{2} x + \frac{1}{2} \ln \left(u\right) + C$

$\textcolor{w h i t e}{I} = \frac{1}{2} \left(x + \ln \left(\cos \left(x\right) + \sin \left(x\right)\right)\right) + C$

The other can be solve by similar approach

Mar 11, 2018

${I}_{1} = \frac{1}{2} \left[x + \ln | \left(\sin x + \cos x\right) |\right] + {C}_{1} ,$

and

${I}_{2} = \frac{1}{2} \left[x - \ln | \left(\sin x + \cos x\right) |\right] + {C}_{2}$.

#### Explanation:

${I}_{1} = \int \cos \frac{x}{\cos x + \sin x} \mathrm{dx} , \mathmr{and} {I}_{2} = \int \sin \frac{x}{\sin x + \cos x} \mathrm{dx}$.

$\therefore {I}_{1} + {I}_{2} = \int \frac{\cos x + \sin x}{\sin x + \cos x} \mathrm{dx} = \int 1 \mathrm{dx}$.

$\therefore {I}_{1} + {I}_{2} = x \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots . \left({\ast}^{1}\right)$.

Also, ${I}_{1} - {I}_{2} = \int \frac{\cos x - \sin x}{\sin x + \cos x} \mathrm{dx}$,

$= \int \frac{\frac{d}{\mathrm{dx}} \left(\sin x + \cos x\right)}{\sin x + \cos x} \mathrm{dx}$.

$\therefore {I}_{1} - {I}_{2} = \ln | \left(\sin x + \cos x\right) | \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \left({\ast}^{2}\right)$.

Soving ${I}_{1} \mathmr{and} {I}_{2}$, we have,

${I}_{1} = \frac{1}{2} \left[x + \ln | \left(\sin x + \cos x\right) |\right] + {C}_{1} , \mathmr{and} ,$

${I}_{2} = \frac{1}{2} \left[x - \ln | \left(\sin x + \cos x\right) |\right] + {C}_{2}$.