# What is int \ (sinx+cosx)/sqrt(1+sin2x) \ dx ?

Feb 12, 2018

$\frac{\left(\sin x + \cos x\right) \cdot \mathrm{dx}}{\sqrt{1 + \sin 2 x}} = x + c$

#### Explanation:

$\frac{\left(\sin x + \cos x\right) \cdot \mathrm{dx}}{\sqrt{1 + \sin 2 x}}$

=$\frac{\left(\sin x + \cos x\right) \cdot \mathrm{dx}}{\sqrt{{\left(\sin x + \cos x\right)}^{2}}}$

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

=$\int \mathrm{dx}$

=$x + c$

Feb 13, 2018

$\int \setminus \frac{\sin x + \cos x}{\sqrt{1 + \sin 2 x}} \setminus \mathrm{dx} = \arctan \tan x + C$

#### Explanation:

In addition to the existing solution:

We seek:

$I = \int \setminus \frac{\sin x + \cos x}{\sqrt{1 + \sin 2 x}} \setminus \mathrm{dx}$

Using the trigonometric Identity:

${\sin}^{2} A + {\cos}^{2} A \equiv 1$

We can manipulate the integral as follows:

$I = \int \setminus \frac{\sin x + \cos x}{\sqrt{1 + 2 \sin x \cos x}} \setminus \mathrm{dx}$

$\setminus \setminus = \int \setminus \frac{\sin x + \cos x}{\sqrt{{\sin}^{2} x + {\cos}^{2} x + 2 \sin x \cos x}} \setminus \mathrm{dx}$

$\setminus \setminus = \int \setminus \frac{\sin x + \cos x}{\sqrt{{\left(\sin x + \cos x\right)}^{2}}} \setminus \mathrm{dx}$ ..... [A]

We may be tempted to continue as follows:

$I = \int \setminus \frac{\sin x + \cos x}{\sqrt{{\left(\sin x + \cos x\right)}^{2}}} \setminus \mathrm{dx}$
$\setminus \setminus = \int \setminus \frac{\sin x + \cos x}{\sin x + \cos x} \setminus \mathrm{dx}$
$\setminus \setminus = \int \setminus 1 \setminus \mathrm{dx}$
$\setminus \setminus = x + c$ ..... [B]

However, There now two issues that require further analysis:

(1) There are discontinuities in the integrand when:

$\sin x + \cos x = 0 \implies \tan x = - 1 \implies x = n \pi - \frac{\pi}{4}$
e.g at $x = \frac{- 5 \pi}{4} , - \frac{\pi}{4} , \frac{3 \pi}{4} , \frac{7 \pi}{4}$

(2) Any linear combination of periodic functions is itself periodic, further, any linear combination of sinusoidal functions is also sinusoidal. The introduction of the square in the denominator causes it be positive $\forall x \in \mathbb{R}$, thus:

if { (sinx+cosx<0, =>, "Integrand " < 0), (sinx+cosx=0, =>, "Integrand is undefined"), (sinx+cosx>0, =>, "Integrand " > 0) :}

We can graph the function as follows, and we discover it represents a "saw tooth" with period $\pi$ and amplitude $a$

Consequently, we expect the solution to the integral to be periodic, and this is not reflected in the naive solution [B]

Instead, we evaluate the integral as follows:

$I = \int \setminus \frac{\sin x + \cos x}{\sqrt{1 + 2 \sin x \cos x}} \setminus \mathrm{dx}$

Perform a substitution $u = \tan x$ so that:

$I = \int \setminus \frac{1}{1 + {u}^{2}} \setminus \mathrm{du}$
$\setminus \setminus = \arctan u + C$
$\setminus \setminus = \arctan \tan x + C$
$\setminus \setminus \ne x + C \setminus \setminus \forall x \in \mathbb{R}$

And we can graph the the integral result (in red) alongside the original periodic function:

And we see that we get a periodic sawtooth function appropriate for the area under a square wave function.