Integral Calculation - Exercise 20

We are asked to evaluate the following indefinite integral:

$$ \int \frac{\sin x + \cos x}{\sin x - \cos x} \ dx $$

We’ll use the differential method, focusing on the expression \( \sin x - \cos x \) as a substitution candidate.

First, compute its differential:

$$ d( \sin x - \cos x ) = ( \cos x + \sin x ) \ dx $$

Now, solve for dx by dividing both sides by \( \cos x + \sin x \):

$$ \frac{ d( \sin x - \cos x ) }{ \cos x + \sin x } = dx $$

We substitute this expression for dx back into the integral:

$$ \int \frac{\sin x + \cos x}{\sin x - \cos x} \cdot \left[ \frac{ d( \sin x - \cos x ) }{ \cos x + \sin x } \right] $$

This allows us to cancel the numerator and denominator:

$$ \int \frac{1}{\sin x - \cos x} \cdot d( \sin x - \cos x ) $$

Next, let’s set a new variable: \( t = \sin(x) - \cos(x) \).

$$ \int \frac{1}{t} \ dt $$

This is a standard form, whose antiderivative is:

$$ \int \frac{1}{t} \ dt = \log |t| + c $$

Substituting back \( t = \sin(x) - \cos(x) \), we obtain:

$$ \log | \sin x - \cos x | + c $$

So the final solution is:

$$ \int \frac{\sin x + \cos x}{\sin x - \cos x} \ dx = \log | \sin x - \cos x | + c $$

Alternative Solution

Here’s a quicker method, suggested by a user.

$$ \int \frac{\sin x + \cos x}{\sin x - \cos x} \ dx $$

Notice that the numerator \( \sin(x) + \cos(x) \) is exactly the derivative of the denominator \( \sin(x) - \cos(x) \).

This allows us to apply one of the standard integration rules directly:

$$ \int \frac{f'(x)}{f(x)} \ dx = \log |f(x)| + c $$

(Here, "log" refers to the natural logarithm, i.e., ln.)

This means the integrand is the derivative of the composite function \( \log[\sin(x) - \cos(x)] \).

To confirm this, differentiate explicitly:

$$ \frac{d}{dx} \log[\sin(x) - \cos(x)] = \frac{1}{\sin(x) - \cos(x)} \cdot \frac{d}{dx}[\sin(x) - \cos(x)] $$

$$ = \frac{1}{\sin(x) - \cos(x)} \cdot [\cos(x) + \sin(x)] $$

$$ = \frac{\sin(x) + \cos(x)}{\sin(x) - \cos(x)} $$

Therefore, we once again conclude:

$$ \int \frac{\sin x + \cos x}{\sin x - \cos x} \ dx = \log | \sin x - \cos x | + c $$

And so on...

 

 
 

Please feel free to point out any errors or typos, or share suggestions to improve these notes. English isn't my first language, so if you notice any mistakes, let me know, and I'll be sure to fix them.

FacebookTwitterLinkedinLinkedin
knowledge base

Calculus

Exercises

Definite Integrals

Indefinite Integrals

Multivariable Integration

Numerical Integration