Once while solving problems from Romanian Mathematical Olympiads I encountered a mathematical gem. The problem I found was asking to calcualte the following integral \[I=\int\frac{\cos x}{a\sin x+b\cos x}\,dx.\]

What do I find especially beautiful about this problem? It rewards the desire to examine a bit more than is asked initially!

**Solution.** Let's try to evaluate one more integral
\[J=\int{\frac{\sin x}{a\sin x+b\cos x}}\,dx.\]

Can you guess the next step?

Yes, we will take advantage of the fact that the sum of integrals is the integral of sum. In other words: \[aJ+bI=a\int{\frac{\sin x}{a\sin x+b\cos x}}\,dx+b\int{\frac{\cos x}{a\sin x+b\cos x}}\,dx\\=\int{\frac{a\sin x+b\cos x}{a\sin x+b\cos x}}\,dx=x+C.\]

On other hand we can easily calculate integrals of the form \(\int{\frac{f^\prime(x)}{f(x)}}\,dx\). The derivative of \( (a\sin x+b\cos x)\) is equal to \( (a\cos x-b\sin x)\), which can also be expressed as a linear combination of our two integrals, i.e. \[aI-bJ=\int{\frac{a\cos x-b\sin x}{a\sin x+b\cos x}}\,dx=\ln{|a\sin x+b\cos x|}+C.\]

Now we simply have to solve a system of linear equations. We obtain \[I=\frac{a\ln{|a\sin x+b\cos x|}+bx}{a^2+b^2}+C.\] and \[J=\frac{ax-\ln{|a\sin x+b\cos x|}}{a^2+b^2}+C.\]

Has anyone of you seen problems with the similar ideas? How often while solving a problem you investigate possible variations of the conditions?

## Comments

Sort by:

TopNewestTry solving this the same way: \(\Large I = \int \frac {a \sin x + b \cos x }{c \sin x + d \cos x} \,dx \) – Pi Han Goh · 3 years, 5 months ago

Log in to reply

Log in to reply

– Pi Han Goh · 3 years, 5 months ago

Smiley_Face.gifLog in to reply

\[\begin{equation} \int_0^{\Large\frac{\pi}{4}}\left[\frac{(1-x^2)\ln(1+x^2)+(1+x^2)-(1-x^2)\ln(1-x^2)}{(1-x^4)(1+x^2)}\right] x\, \exp\left[\frac{x^2-1}{x^2+1}\right]\, dx \end{equation}\]. – Anastasiya Romanova · 2 years, 11 months ago

Invitation (click the problem)Log in to reply

This looks very useful, thanks for sharing Nicolae. :) – Pranav Arora · 3 years, 5 months ago

Log in to reply

Invitation (click the problem) \[\begin{equation} \int_0^{\Large\frac{\pi}{4}}\left[\frac{(1-x^2)\ln(1+x^2)+(1+x^2)-(1-x^2)\ln(1-x^2)}{(1-x^4)(1+x^2)}\right] x\, \exp\left[\frac{x^2-1}{x^2+1}\right]\, dx \end{equation}\]. – Anastasiya Romanova · 2 years, 11 months ago

Log in to reply

Thanks for sharing !! – Purvam Modi · 3 years, 5 months ago

Log in to reply

Thanks for sharing – Rajath Krishna R · 3 years, 4 months ago

Log in to reply