Integral of cosecant function: understanding different approaches

  • Context: High School 
  • Thread starter Thread starter mcastillo356
  • Start date Start date
  • Tags Tags
    Calculus Logarithms
Click For Summary

Discussion Overview

The discussion revolves around the integral of the cosecant function, specifically exploring various approaches to evaluate it. Participants examine different derivations, identities, and methods related to trigonometric integrals, with a focus on understanding the underlying principles rather than simply memorizing results.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • Some participants suggest using the method of substitution for evaluating trigonometric integrals, particularly for the integral of cosecant.
  • One participant questions the relationship between the negative and positive logarithmic forms of the integral, seeking clarification on why they are equivalent under certain conditions.
  • Another participant proposes differentiating the logarithmic result to verify that it yields the cosecant function, suggesting this as a hint for integration.
  • Several derivations are presented, including one that utilizes half-angle identities and another that involves partial fractions, indicating multiple methods to arrive at the integral.
  • Some participants express confusion about the steps involved in the derivations and seek further clarification or advice on how to proceed with the calculations.
  • A participant shares an alternative derivation from a Spanish math forum, which includes various transformations and identities to express the integral in different forms.
  • There are mentions of potential sign errors in the derivations, with participants attempting to reconcile these discrepancies and clarify the correct forms of the solutions.

Areas of Agreement / Disagreement

Participants do not reach a consensus on a single method or solution for the integral of cosecant, as multiple competing views and approaches are presented. The discussion remains unresolved with various interpretations and derivations being explored.

Contextual Notes

Some participants reference basic trigonometric identities and suggest that certain steps in the derivations may depend on these identities. There are also indications of confusion regarding the application of logarithmic properties and the handling of absolute values in the context of the integral.

mcastillo356
Gold Member
Messages
658
Reaction score
362
TL;DR
Natural logarithm is always the answer, but I would like an explanation of the different answers.
Hi, PF

Trigonometric Integrals

"The method of substitution is often useful for evaluating trigonometric integrals" (Calculus, R. Adams and Christopher Essex, 7th ed)

Integral of cosecant

$$\displaystyle\int{\csc{(x)}}=\displaystyle\int{\displaystyle\frac{1}{\sin{(x)}}}=-\ln{(|\csc{(x)}+\cot{(x)}|)}=\ln{(|\csc{(x)}-\cot{(x)}|)}=\ln{\Bigg|\tan\Bigg(\displaystyle\frac{1}{2}x\Bigg)\Bigg|}$$

The textbook recommends to memorize all of this: should I, or give a try and outline a proof? I mean, this is the first time I'm suggested to memorize. But, just some questions:

(i) Why the negative natural logarithm of the sum inside the absolute value is equal to the positive one, provided the subtraction?.
(ii) Could I approach somehow to some kind of explanation about the evaluation of this integral?.

Greetings!

PD: Post without preview.
 
Physics news on Phys.org
Why don’t you differentiate
-\ln |cosec\ x + \cot x|
with x to confirm that it should be cosec x ? You may get a hint of integration by this.
 
  • Like
Likes   Reactions: SammyS and mcastillo356
mcastillo356 said:
TL;DR Summary: Natural logarithm is always the answer, but I would like an explanation of the different answers.

Hi, PF

Trigonometric Integrals

"The method of substitution is often useful for evaluating trigonometric integrals" (Calculus, R. Adams and Christopher Essex, 7th ed)

Integral of cosecant

$$\displaystyle\int{\csc{(x)}}=\displaystyle\int{\displaystyle\frac{1}{\sin{(x)}}}=-\ln{(|\csc{(x)}+\cot{(x)}|)}=\ln{(|\csc{(x)}-\cot{(x)}|)}=\ln{\Bigg|\tan\Bigg(\displaystyle\frac{1}{2}x\Bigg)\Bigg|}$$

The textbook recommends to memorize all of this: should I, or give a try and outline a proof? I mean, this is the first time I'm suggested to memorize. But, just some questions:

(i) Why the negative natural logarithm of the sum inside the absolute value is equal to the positive one, provided the subtraction?.

Recall your basic trig identities. |\csc x + \cot x||\csc x - \cot x| = |\csc^2x - \cot^2 x| = \left|\frac{1 - \cos^2 x}{\sin^2 x}\right| = 1. Therefore <br /> \ln |\csc x + \cot x | + \ln |\csc x - \cot x| = 0.

(ii) Could I approach somehow to some kind of explanation about the evaluation of this integral?.
This follows from <br /> \frac{d}{dx} \csc x = -\csc x \cot x \qquad \frac{d}{dx} \cot x = -\csc^2 x.<br /> Adding or subtrtacting these these gives \begin{split}<br /> \frac{d}{dx} (\csc x + \cot x) &amp;= -\csc x (\csc x + \cot x) \\<br /> \frac{d}{dx} (\csc x - \cot x) &amp;= \csc x (\csc x - \cot x)\end{split}<br /> and hece \begin{split}<br /> \csc x &amp;= -\frac{1}{\csc x + \cot x} \frac{d}{dx}(\csc x + \cot x) \\<br /> &amp;= \frac{1}{\csc x - \cot x} \frac{d}{dx}(\csc x - \cot x). \end{split}
 
  • Like
Likes   Reactions: mcastillo356, dextercioby, mathwonk and 1 other person
Here are two articles that might interest you:

mcastillo356 said:
TL;DR Summary: Natural logarithm is always the answer, ...
The Amazing Relationship Between Integration And Euler’s Number
mcastillo356 said:
... but I would like an explanation of the different answers.
The Art of Integration

Especially when it comes to trigonometric functions, the exponential function is not always the answer, at least not the first one. It is often the Weierstraß or half-tangent substitution to transform the trigonometric function into a polynomial function. It is really a useful technique, even if the resulting polynomials might end up in the "always-answer".
 
  • Like
Likes   Reactions: mcastillo356 and dextercioby
anuttarasammyak said:
Why don’t you differentiate
-\ln |cosec\ x + \cot x|
with x to confirm that it should be cosec x ? You may get a hint of integration by this.
Thank you! Now I've got a hint.
@pasmith, @fresh_42, I will reply in three days.
Greetings!
 
An alternative derivation is \begin{split}<br /> \frac{1}{\sin x} &amp;= \frac{1}{2\sin(\tfrac x2) \cos(\tfrac x2)} \\<br /> &amp;=\frac{\cos(\tfrac x2)}{2\sin(\tfrac x2)\cos^2(\tfrac x2)} \\<br /> &amp;= \frac{1}{\tan(\tfrac x2)} \frac12 \sec^2(\tfrac x2) \\<br /> &amp;= \frac{1}{\tan(\tfrac x2)} \frac{d}{dx} \tan(\tfrac x2) \\<br /> &amp;=\frac{d}{dx} \ln |\tan(\tfrac x2)|.\end{split} You can again check using basic identities that <br /> \csc x - \cot x = \tan(\tfrac x2).
 
  • Like
Likes   Reactions: vanhees71, mcastillo356 and dextercioby
#3 is the usual derivation, i.e.

csc(x) dx = csc(x).[(csc(x) + cot(x))/(csc(x) + cot(x))] dx

= [csc^2 + csc(x)cot(x)]/(csc(x) + cot(x)) dx

= - d(csc(x) + cot(x))/(csc(x) + cot(x)).

= -d[ln(csc(x) + cot(x))], (where the argument is positive).
 
Last edited:
mathwonk said:
#3 is the usual derivation, i.e.

= - d(csc(x) + cot(x))/(csc(x) + cot(x)).

= -ln(csc(x) + cot(x)), (where the argument is positive).
Hi, @mathwonk, is this the derivative of a constant?
I don't understand.
Greetings!
 
if u = csc(x) + cot(x), it is du/u = d[ln(u)], not d(u/u) = 0.

oops, I edited to put in the "d's".
 
  • Like
Likes   Reactions: mcastillo356
  • #10
Another derivation is
$$\int \csc x\,dx = \int\frac{1}{\sin x}\cdot \frac{\sin x}{\sin x}\,dx = \int\frac{\sin x}{1-\cos^2 x} \,dx = \int \frac{du}{u^2-1}$$ where ##u=\cos x##. Then use partial fractions to do the integral.
 
  • Like
Likes   Reactions: mcastillo356 and dextercioby
  • #11
vela said:
Another derivation is
$$\int \csc x\,dx = \int\frac{1}{\sin x}\cdot \frac{\sin x}{\sin x}\,dx = \int\frac{\sin x}{1-\cos^2 x} \,dx = \int \frac{du}{u^2-1}$$ where ##u=\cos x##. Then use partial fractions to do the integral.
As we know, it is the case of a quadratic denominator. Eventually,
$$\displaystyle\int{\displaystyle\frac{1}{u^2-1}}$$
##=\displaystyle\int{\displaystyle\frac{1}{u+1}}+\displaystyle\int{\displaystyle\frac{1}{u-1}}##

$$\displaystyle\int{\frac{1}{u^2-1}}\,du=\displaystyle\frac{1}{2}\cdot{\ln{|u-1|}-\ln{|u+1|}}+C$$

So there must be displayed some more algebra, but I don't know to go any further. If I could be given advice...
Greetings!
PD: Post without preview
Second PD: Edited in red on centered text on 08/10/2023. I've taken a look at how to type LaTeX on the forum.
Third PD: Online delimiters typed at las formula, to give another try.
Thanks!
 
Last edited:
  • #12
You made a sign error. Anyway, you can combine the logs to get
$$\int \csc x\,dx = \frac 12 \log \frac{\cos x - 1}{\cos x+1}.$$ Then it's just a matter of using trig identities to get the different forms of the solution.
 
  • Like
Likes   Reactions: mcastillo356
  • #13
Hi, PF

First of all, I'm grateful for the effort displayed by all of you. Now I must confess the truth: I've struggled with this topic, for sure, a lot; but I'm mostly impressed with the effort all of you have made to raise my knowledge. Unfortunately, I haven't been able to understand completely your tries to make me figure out the topic; so I've turned to a Spanish math forum. They also have tried to give me advice... An there it goes:

vela said:
You made a sign error. Anyway, you can combine the logs to get
$$\int \csc x\,dx = \frac 12 \log \frac{\cos x - 1}{\cos x+1}.$$ Then it's just a matter of using trig identities to get the different forms of the solution.
$$\ln\left|\tan \dfrac{x}{2}\right|+C$$
$$=\ln \sqrt{\dfrac{1-\cos x}{1+\cos x}}+C$$
$$=\ln \sqrt{\dfrac{1+\cos^2x-2\cos x}{\sin^2x}}+C$$
$$=\ln \sqrt{\csc^2x+\cot^2x -2\csc x\cot x}+C$$
$$=\ln \sqrt{(\csc x-\cot x)^2}+C=\ln|\csc x-\cot x| +C$$
Source: Spanish "Rincón Matemático" (Traduced as "Mathematical Corner")

Now, in terms of sine, cosine, tangent, and writing
$$\csc x = \dfrac{1}{\sin x}$$
$$= \dfrac{\sin x}{\sin^2 x}$$
$$= \dfrac{\sin x}{1-\cos^2 x}$$
$$= \dfrac{1}{2}\left(\dfrac{\sin x}{1-\cos x} + \dfrac{\sin x}{1+\cos x}\right)$$
We get
$$\displaystyle\int{\csc x \, dx}$$
$$= \dfrac{1}{2}\displaystyle\int{ \left(\dfrac{\sin x}{1-\cos x} + \dfrac{\sin x}{1+\cos x}\right) \, dx}$$
$$= \frac{1}{2}\left(\ln(1-\cos x) - \ln(1+\cos x)\right)$$
$$= \frac{1}{2}\ln\left(\dfrac{1-\cos x}{1+\cos x}\right)$$
As...
$$\dfrac{1-\cos x}{1+\cos x}$$
$$= \dfrac{(1-\cos x)(1+\cos x)}{(1+\cos x)^2}$$
$$= \left(\dfrac{\sin x}{1+\cos x}\right)^2$$
We add
$$\dfrac{1}{2}\ln\left(\dfrac{1-\cos x}{1+\cos x}\right) = \ln\left|\dfrac{\sin x}{1+\cos x}\right|$$
So then, we have
$$\ln\left|\dfrac{\sin x}{1+\cos x}\right|$$
$$= -\ln\left|\dfrac{1+\cos x}{\sin x}\right|$$
$$= -\ln\left|\dfrac{1}{\sin x}+\dfrac{\cos x}{\sin x}\right|$$
(Same source)
I hope I am keeping the track; it is a "copy and paste" I've made on my own. I'm willing to get your opinions.
Greetings!
 
  • #14
It is my own, same as yours.
\frac{1}{\sin x}=\frac{(1+\cos x)}{\sin x(1+\cos x)}=\frac{\cos x}{\sin x}+\frac{\sin x}{1+\cos x}
=\frac{d}{dx}\ln |\sin x| - \frac{d}{dx}\ln |1+\cos x|
 
  • Like
Likes   Reactions: dextercioby and mcastillo356
  • #15
fresh_42 said:
Here are two articles that might interest you:

The Amazing Relationship Between Integration And Euler’s Number

The Art of Integration

Especially when it comes to trigonometric functions, the exponential function is not always the answer, at least not the first one. It is often the Weierstraß or half-tangent substitution to transform the trigonometric function into a polynomial function. It is really a useful technique, even if the resulting polynomials might end up in the "always-answer".
Very interesting. I confess I ain't understood lots of concepts (Weierstrass or half-tangent substitution), but I've realized that Euler's number is an amazing discovery. I'm going to put a link thought for beginners that made me notice of the magic behind ##e##.

https://www.mathsisfun.com/numbers/e-eulers-number.html

Greetings!
 
  • Like
Likes   Reactions: vanhees71 and fresh_42

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K