MHB Solve Indefinite Integral: 3 Ways

lfdahl
Gold Member
MHB
Messages
747
Reaction score
0
Solve the indefinite integral

\[\int \frac{dx}{\cos x+\sin x}\]

- in three different ways.
 
Mathematics news on Phys.org
I did it in W|A, my calculator, and I looked it up in a set of tables. Does that count? (Nerd)

-Dan
 
topsquark said:
I did it in W|A, my calculator, and I looked it up in a set of tables. Does that count? (Nerd)

-Dan

Hi, topsquark/Dan!

Thankyou for your input.

You can use an online table or integrator to check your results, but the challenge is to solve the integral in three different ways without these means :cool:
 
Last edited:
lfdahl said:
Solve the indefinite integral

\[\int \frac{dx}{\cos x+\sin x}\]

- in three different ways.

1)

$$\int\frac{1}{\sin(x)+\cos(x)}\,dx=\int\frac{1}{\sqrt2\sin\left(x+\frac{\pi}{4}\right)}\,dx$$

$$=-\frac{1}{\sqrt2}\ln\left|\cot\left(x+\frac{\pi}{4}\right)+\csc\left(x+\frac{\pi}{4}\right)\right|+C$$

2) Unfortunately, this method of solution introduces a zero where the original integrand is defined. As an indefinite integral it is correct in the sense that its derivative is equivalent to the integrand, under certain circumstances.

$$\int\frac{1}{\cos(x)+\sin(x)}\,dx=\int\frac{\cos(x)-\sin(x)}{\cos(2x)}\,dx$$

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

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

$$+\frac{1}{2\sqrt2}\left(\ln\left|1-\sqrt2\cos(x)\right|-\ln\left|1+\sqrt2\cos(x)\right|\right)+C$$

3)

$$\int\frac{1}{\sin(x)+\cos(x)}\,dx=\int\frac{1}{\frac{e^{ix}+e^{-ix}}{2}+\frac{e^{ix}-e^{-ix}}{2i}}\,dx$$

$$=\int\frac{2i}{(i+1)e^{ix}+(i-1)e^{-ix}}\,dx=\int\frac{2ie^{ix}}{(i+1)e^{2ix}+(i-1)}\,dx$$

$$\sqrt i\tan w=e^{ix},\quad\sqrt i\sec^2w\,dw=ie^{ix}\,dx$$

$$\sqrt2i\int\,dw=\sqrt2i w+C=-\sqrt2i\arctan\left(\frac{e^{ix}}{\sqrt i}\right)+C$$

$$=-\sqrt2i\arctan\left(e^{i(x-\pi/4)}\right)+C$$

(we need a negative to account for $i^2=-1$).
 
greg1313 said:
1)

$$\int\frac{1}{\sin(x)+\cos(x)}\,dx=\int\frac{1}{\sqrt2\sin\left(x+\frac{\pi}{4}\right)}\,dx$$

$$=-\frac{1}{\sqrt2}\ln\left|\cot\left(x+\frac{\pi}{4}\right)+\csc\left(x+\frac{\pi}{4}\right)\right|+C$$

2) Unfortunately, this method of solution introduces a zero where the original integrand is defined. As an indefinite integral it is correct in the sense that its derivative is equivalent to the integrand, under certain circumstances.

$$\int\frac{1}{\cos(x)+\sin(x)}\,dx=\int\frac{\cos(x)-\sin(x)}{\cos(2x)}\,dx$$

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

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

$$+\frac{1}{2\sqrt2}\left(\ln\left|1-\sqrt2\cos(x)\right|-\ln\left|1+\sqrt2\cos(x)\right|\right)+C$$

3)

$$\int\frac{1}{\sin(x)+\cos(x)}\,dx=\int\frac{1}{\frac{e^{ix}+e^{-ix}}{2}+\frac{e^{ix}-e^{-ix}}{2i}}\,dx$$

$$=\int\frac{2i}{(i+1)e^{ix}+(i-1)e^{-ix}}\,dx=\int\frac{2ie^{ix}}{(i+1)e^{2ix}+(i-1)}\,dx$$

$$\sqrt i\tan w=e^{ix},\quad\sqrt i\sec^2w\,dw=ie^{ix}\,dx$$

$$\sqrt2i\int\,dw=\sqrt2i w+C=-\sqrt2i\arctan\left(\frac{e^{ix}}{\sqrt i}\right)+C$$

$$=-\sqrt2i\arctan\left(e^{i(x-\pi/4)}\right)+C$$

(we need a negative to account for $i^2=-1$).
Well done, greg1313! Thankyou for your participation!

It was your first two solutions, I had in mind. My 3rd solution is a tangent half angle substitution (Weierstrass)
 
The moment when the correct answer doesn't get most of the thanks.
 
(Giggle)
 
In case, anyone is interested in the tanget half angle solution, here it is:

$t = \tan \frac{x}{2}$: \[\int \frac{1}{\cos x + \sin x}dx = \int \frac{1}{\left ( \frac{1-t^2}{1+t^2}+\frac{2t}{1+t^2} \right )}\frac{2dt}{1+t^2}= \int \frac{-2dt}{t^2-2t-1}=\int \frac{-2dt}{(t+\sqrt{2}-1)(t-\sqrt{2}-1)}= \\\\\frac{1}{\sqrt{2}}\int \left ( \frac{1}{t-1+\sqrt{2}}-\frac{1}{t-1-\sqrt{2}} \right )dt =\frac{1}{\sqrt{2}}\left ( \ln \left ( \left | t-1+\sqrt{2} \right | \right )-\ln \left ( \left | t-1-\sqrt{2} \right | \right ) \right )+C \\\\= \frac{1}{\sqrt{2}}\left ( \ln \left ( \left | \tan \frac{x}{2}-1+\sqrt{2} \right | \right )-\ln \left ( \left | \tan \frac{x}{2}-1-\sqrt{2} \right | \right ) \right )+C \\\\ = \frac{1}{\sqrt{2}} \ln \left ( \left | \frac{\tan \frac{x}{2}-1+\sqrt{2}}{\tan \frac{x}{2}-1-\sqrt{2}} \right | \right ) +C\]
 
Back
Top