Solve Indefinite Integral: 3 Ways

In summary, the indefinite integral of dx/(cos x + sin x) can be solved in three different ways: using an online integrator, a calculator, or a table. However, the challenge is to solve it without these means. One possible solution is using the tangent half angle formula. Thank you to topsquark and greg1313 for their contributions and for mentioning this alternative solution.
  • #1
lfdahl
Gold Member
MHB
749
0
Solve the indefinite integral

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

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

-Dan
 
  • #3
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:
  • #4
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$).
 
  • #5
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)
 
  • #6
The moment when the correct answer doesn't get most of the thanks.
 
  • #7
(Giggle)
 
  • #8
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\]
 

FAQ: Solve Indefinite Integral: 3 Ways

What is an indefinite integral?

An indefinite integral is a mathematical concept that represents the antiderivative of a given function. It is also known as a primitive function and is used to find the original function from its derivative.

What are the three ways to solve an indefinite integral?

The three ways to solve an indefinite integral are:

  1. Using the power rule: This method involves using the power rule formula to find the antiderivative of a polynomial function.
  2. Using integration by parts: This method involves breaking down a complicated function into simpler parts and integrating each part separately.
  3. Using substitution: This method involves substituting a variable with another expression to simplify the integral and then integrating the simplified expression.

How do you use the power rule to solve an indefinite integral?

To use the power rule, follow these steps:

  1. Find the coefficient of the variable and add 1 to its exponent.
  2. Divide the entire expression by the new exponent.
  3. Add the constant of integration (C) at the end.

What is integration by parts?

Integration by parts is a method used to solve integrals of products of functions. It involves breaking down a complicated function into simpler parts and integrating each part separately.

How do you use substitution to solve an indefinite integral?

To use substitution, follow these steps:

  1. Identify the variable that can be replaced with a simpler expression.
  2. Choose a substitution that will simplify the integral.
  3. Replace the variable in the integral with the simpler expression.
  4. Integrate the new expression.
  5. Substitute back the original variable and add the constant of integration (C) at the end.

Similar threads

Replies
6
Views
3K
Replies
4
Views
2K
Replies
3
Views
2K
Replies
2
Views
1K
Back
Top