# Why does dividing by $\sin^2 x$ solve the integral?

## Homework Statement:

$\int \frac{\cos x + \sqrt 3}{1 + 4\sin \left(x+ \pi/3\right) + 4\sin^2 \left(x+\pi/3\right)} dx$

## Homework Equations:

$1 + 4\sin \left(x+ \pi/3\right) + 4\sin^2 \left(x+\pi/3\right) = \left(1+2\sin\left(x+\pi/3\right)\right)^2$
If we look at the denominator of this integral $$\int \frac{\cos x + \sqrt 3}{1 + 4\sin \left(x+ \pi/3\right) + 4\sin^2 \left(x+\pi/3\right)} dx$$ then we can see that $1 + 4\sin \left(x+ \pi/3\right) + 4\sin^2 \left(x+\pi/3\right) = \left(1+2\sin\left(x+\pi/3\right)\right)^2$ and $2\sin\left(x+\pi/3\right)\ = \sin x + \sqrt 3 \cos x$. Now, our integral reduces to
$$\int \frac{\cos x + \sqrt 3}{ 1+\sin x + \sqrt 3 \cos x} dx$$. After this I tried so many things, but no substitution worked. Therefore, I finally looked for the solution in my book and there it was written
Dividing by $\sin ^2 x$ we get $\int \frac{\csc x \cot x + \sqrt 3 csc^2 x}{\left(\csc x + 1 + \sqrt 3 \cot x\right)^2} dx = \frac{1}{\csc x +1+ \sqrt 3 \cot x} + C$
.

My question how does just dividing by $\sin^2 x$ made everything come out to be? I know that we did something like this $$\frac{\cos x/ \sin^2 x + \sqrt 3/\sin^2 x}{\left(1/\sin x + \sin x/\sin x + \sqrt 3 \cos x/\sin x\right)^2} \\ \int \frac{\csc x \cot x + \sqrt 3 csc^2 x}{\left(\csc x + 1 + \sqrt 3 \cot x\right)^2} dx \\ \textrm{taking the denominator as u} \\ du = -\csc x \cot x - \sqrt 3 \csc^2 x dx \\ \int \frac{-du}{u^2} \\ \frac{1}{u} = \frac{1}{\csc x +1+ \sqrt 3 \cot x} +C$$ What I want to know is how that dividing the numerator and denominator by $\sin^2 x$ did the whole thing? It's like a magic and I'm no magician I'm a a mathematics student so how can I solve integrals like this in future? How to learn these magic tricks?

Related Calculus and Beyond Homework Help News on Phys.org
Mark44
Mentor
What I want to know is how that dividing the numerator and denominator by $\sin^2 x$ did the whole thing? It's like a magic and I'm no magician I'm a a mathematics student so how can I solve integrals like this in future? How to learn these magic tricks?
It's not magic, but it appears to be the result of many fruitless attempts, the last one of which (dividing everything by $\sin^2 x$) actually worked. This strategy is not at all obvious, IMO.

How to solve integrals like this? The only thing I can say is that lots of practice gives you more things to try.

fresh_42
Mentor
How to learn these magic tricks?
My teacher at school used to say: "Everybody can differentiate, but to integrate it takes an artist."

I don't think that you can learn 'those magic tricks'. In the end it is a matter of experience, practice and learning a repertoire of standard techniques: symmetries, transformations, Weierstraß substitution, etc.

One thing which you can always do is to differentiate a part of the formula and see whether the result occurs somewhere. This will give you a hint for a possible substitution, because you will need $u'$. One of my mottos with integration is: 'Try to remove what disturbs most.'

In your example one sees immediately that $1+4a+4a^2=(1+2a)^2$ and the addition theorem for sine resolves the addition in the argument, which is what I would try first, leaving me with only $\sin x$ and $\cos x$.

It's not magic, but it appears to be the result of many fruitless attempts, the last one of which (dividing everything by $\sin^2 x$) actually worked. This strategy is not at all obvious, IMO.

How to solve integrals like this? The only thing I can say is that lots of practice gives you more things to try.
This type of thing happened to me before, when I needed to calculate the integral of $\sec x$ , there we divided and multiplied by $\sec x + \tan x$ . That too seemed to me like a magic, I sometimes wonder how it was done for the first time and the person who did that must have devoted enormous energy into that.

I want to know should a person judge himself if he is not able to solve these integrals?

fresh_42
Mentor
I want to know should a person judge himself if he is not able to solve these integrals?
In general? No. But if it is due to the lack of practice, maybe.

Weierstraß substitutions (halt tangent substitution) often works in such cases. And after simplifying the formula as I suggested above, it looks like a typical case.

One thing which you can always do is to differentiate a part of the formula and see whether the result occurs somewhere. This will give you a hint for a possible substitution, because you will need $u'$. One of my mottos with integration is: 'Try to remove what disturbs most.'
Can you please explain that differntiation technique with an example?

In your example one sees immediately that 1+4a+4a2=(1+2a)21+4a+4a2=(1+2a)21+4a+4a^2=(1+2a)^2 and the addition theorem for sine resolves the addition in the argument, which is what I would try first, leaving me with only sinxsin⁡x\sin x and cosxcos⁡x\cos x.
Is it the same thing which I did in my first two steps?

In general? No. But if it is due to the lack of practice, maybe.
Can you please give me the reason why in general the answer is : NO? A reason would help me a lot, otherwise my mind is just saying that “Sir fresh_42 has said NO only because to give you some hope and not to hurt you” . Why in general a person should not be judged for his ability to solve these magical integrals.

Mark44
Mentor
Can you please give me the reason why in general the answer is : NO?
Because, as @fresh_42 already said, it's much easier to differentiate than to go in the opposite direction (antidifferentiate).

Infrared
Gold Member
This type of thing happened to me before, when I needed to calculate the integral of $\sec x$ , there we divided and multiplied by $\sec x + \tan x$ . That too seemed to me like a magic
That solution is also pretty mysterious for me. Here's a way of integrating secant that I find a lot more straightforward.

$\int\sec(x)dx=\int\frac{1}{\cos(x)} dx=\int\frac{\cos(x)}{\cos^2(x)}dx=\int\frac{\cos(x)}{1-\sin^2(x)}dx=\int\frac{1}{1-u^2}du$

where $u=\sin(x)$. This last integral can be done with partial fractions.

Because, as @fresh_42 already said, it's much easier to differentiate than to go in the opposite direction (antidifferentiate).
But if something is hard then does it imply that good number of people will not be able to it? And those who cannot do it are the mediocre ones?

That solution is also pretty mysterious for me. Here's a way of integrating secant that I find a lot more straightforward.

$\int\sec(x)dx=\int\frac{1}{\cos(x)} dx=\int\frac{\cos(x)}{\cos^2(x)}dx=\int\frac{\cos(x)}{1-\sin^2(x)}dx=\int\frac{1}{1-u^2}du$

where $u=\sin(x)$. This last integral can be done with partial fractions.
Wow! Thanks for that.

fresh_42
Mentor
But if something is hard then does it imply that good number of people will not be able to it? And those who cannot do it are the mediocre ones?
Real life is always a mixture of talent and time and practice.You cannot become a John von Neumann without talent, but you can become a good student by time, effort and practice. It's not difficult anymore to find examples on the internet to practice, e.g. here:

I mentioned a toolbox in my first post: integral symmetries, additive as well as multiplicative, transformation theorems, the Weierstraß substitution $t := \tan \frac{x}{2}$, integration by parts, partial fraction decomposition, and last but not least, a good list of standard integrals is very helpful, too.
https://de.wikibooks.org/wiki/Formelsammlung_Mathematik:_Integrale
Can you please explain that differntiation technique with an example?
If we have $\int f(p(x))\,dx$ and want to substitute $u:=p(x)$, then we need to substitute $dx$, too. Now $\dfrac{du}{dx}= p'(x)$ or $dx = \dfrac{du}{p'(x)}$ which gives us $\int f(p(x))\,dx = \int f(u)\cdot \dfrac{1}{p'(x)}\,du\,.$ So if we find $p'(x)$ somewhere in the original formula, then in the reverse direction we have a hint what $u$ might be. Integration is often a try and error procedure. Testing some possibilities for $u$ and calculating $u'$ in order to find $p'(x)$ in the given formula is one way to find a good substitution.
Is it the same thing which I did in my first two steps?
Yes.

Math_QED
Homework Helper
2019 Award
If you look for a good integration problem, try $$\int \sqrt{\tan x} dx$$ It is a difficult but rewarding integral.

ehild
Homework Helper
That solution is also pretty mysterious for me. Here's a way of integrating secant that I find a lot more straightforward.

$\int\sec(x)dx=\int\frac{1}{\cos(x)} dx=\int\frac{\cos(x)}{\cos^2(x)}dx=\int\frac{\cos(x)}{1-\sin^2(x)}dx=\int\frac{1}{1-u^2}du$

where $u=\sin(x)$. This last integral can be done with partial fractions.
There is also a method applied to rational functions of sin(x). cos(x), tan(x)...
Rewrite all the trigonometric functions in the integrand in terms of tan(x/2), do the substitution u=tan(x/2), dx=2du/(1+u^2). You get a rational function of u to integrate.
It is useful to know
$\cos(x)=\frac{1-\tan^2(x/2)}{1+\tan^2(x/2)}$
$\sin(x)=\frac{2\tan(x/2)}{1+\tan^2(x/2)}$

Infrared
Gold Member
There is also a method applied to rational functions of sin(x). cos(x), tan(x)...
Rewrite all the trigonometric functions in the integrand in terms of tan(x/2), do the substitution u=tan(x/2), dx=2du/(1+u^2). You get a rational function of u to integrate.
It is useful to know
$\cos(x)=\frac{1-\tan^2(x/2)}{1+\tan^2(x/2)}$
$\sin(x)=\frac{2\tan(x/2)}{1+\tan^2(x/2)}$
This is a fun substitution, but to make this seem a little less magical (as is the theme of this thread...) this comes from the parameterization of the unit circle $x=\frac{1-t^2}{1+t^2}, y=\frac{2t}{1+t^2}$, which, incidentally, also gives all of the Pythagorean triples.

This parameterization is found by starting at the point $(-1,0)$ on the unit circle, and following a line of slope $t$ until the second intersection point is found.

fresh_42
Mentor
I did not know the name. We learnt this method during the Calculus course
Well, it is a bit of a spite sentiment of me. Many ordinary theorems I learnt, suddenly became named on PF, e.g. Bézout's Lemma. I always took it as simple corollary of the Euclidean algorithm. I assume it is an anglo-saxon quirk to remember theorems etc. by name. The english Wikipedia has the substitution under 'half angle substitution'. To call it Weierstraß substitution as the german Wikipedia does is a bit of a revenge, because almost anything here has names. I even started to write Abelian and Cartesian with a capital letter, and L'Hôpital without an s but with its accent.

If you look for a good integration problem, try $$\int \sqrt{\tan x} dx$$ It is a difficult but rewarding integral.
You were right, this integral was really rewarding, this is how I solved it. The feeling was quite nice after doing it. I'm thankful to you for giving me that feeling.

You cannot become a John von Neumann without talent, but you can become a good student by time, effort and practice.
Sir, what does it mean to have talent? As far as my readings are concerned Mr. John Von Neumann solved many problems at an early age. Here are some references from A Princeton Companion to Mathematics

He was a child prodigy, learning several languages and demonstrating an early enthusiasm for mathematics.
And after this we find these lines

During the following years he published on the axiomatic foundations of set theory, on measure theory [III.55], and on the mathematical foundations of quantum mechanics. He also wrote his first paper on game theory (“Zur Theorie der Gesellschaftsspiele,” pub- lished in Mathematische Annalen in 1928), proving the minimax theorem (the theorem that states that every two-person finite zero-sum game has optimal mixed strategies).
Does doing all these things require to be a prodigy? Well, I will disagree on it because Set Theory was established by Henry John Stephen Smith and was developed further by Georg Cantor. Quantum Mechanics was started by Max Planck and it's mathematics was developed by Erwin Schrodinger and as far as I know none of these people were prodigy. They were just refined thinkers of everyday thinking.

Correct me if I'm wrong.

fresh_42
Mentor
John von Neumann was a genius. I took him as a representative of this class. You may substitute him by another brilliant mind, say Terence Tao to name a modern mathematician, or Gauß, Euler or Cauchy if you want names from the top league of geniuses. All these mathematicians were or are equipped with a mathematical understanding that cannot be learnt regardless how hard you try.

Nevertheless, these few are faced with countless unnamed other mathematicians who were and are far brighter than I will ever be. And they ended up where they are by practice and efforts. The more you study, the more techniques and experiences you will gain. Mathematics is often just applying a method from field A in field B. Knowing both gets you an advantage. And the more integrals you will have solved, the easier you will find those magic tricks, which depend far to much on case by case to be learnt in general.

Math_QED
Homework Helper
2019 Award
You were right, this integral was really rewarding, this is how I solved it. The feeling was quite nice after doing it. I'm thankful to you for giving me that feeling.
Looks like you did some magic yourself!

All these mathematicians were or are equipped with a mathematical understanding that cannot be learnt regardless how hard you try.
I remember Darwin’s theory
In a grass field there were a breed of insect and they were present in two colours, one category was of green colour insects and the other one were red. It was hard for flying birds to see those green ones, but the red ones were exposed fully beacuse of this innocent red ones were eaten up and after long long time we had only the green ones left .

So, sir I will not stop working hard for becoming an elegant contributor in the field of Mathematics and Physics whether evolution gonna make me extinct or not.

Nevertheless, these few are faced with countless unnamed other mathematicians who were and are far brighter than I will ever be
I don’t know how a reasonable man like you can ever say these illogical words. You don’t say what you are, ask me I will tell you loud and clear who you actually are, you have helped me the way no one could (no matter how much dollars I give them).

A trick you might add to your repertoire is described here https://en.wikipedia.org/wiki/Bioche's_rules. The substitution $u=\tan \frac{x}{2}$ works for your integral.
You should remember how the sine and cosine functions can be expressed in terms of the tangent of the half angle (post #14).
The rules also work for hyperbolic trigonometric functions (french link, use google's page translation option) https://fr.wikipedia.org/wiki/Règles_de_Bioche.

Last edited: