Excuse me, I tried to solve this problem but i can't get the right answer .. any help?
$\int \frac{1}{4\cdot \sin \left(x\right)-5\cdot \cos \left(x\right)}dx$
Excuse me, I tried to solve this problem but i can't get the right answer .. any help?
$\int \frac{1}{4\cdot \sin \left(x\right)-5\cdot \cos \left(x\right)}dx$
Matik's answer is the textbook approach to these kinds of problems, but you can also reason out how to solve the integral directly. This will take a lot longer, but shows you how you can solve the problem even if you don't know, or don't remember, the "trick."
First, notice you have two different trig functions in the denominator. To simplify them using trig identities, you would rather have them squared; this motivates "rationalizing" the denominator:
$$\int \frac{4\sin x + 5\cos x}{16\sin^2x - 25\cos^2 x}\,dx.$$
Now you can split up the integral into simpler pieces:
$$\int \frac{4\sin x}{16\sin^2x - 25\cos^2x}\,dx + \int \frac{5\cos x}{16\sin^2x -25\cos^2x}\,dx.$$ For each integral, you can replace the denominator with something that either depends only on sine, or only on cosine. Which one? Well, think ahead a bit and notice you will want to next use substitution, and that for the substitution to work out you want the denominator's function to be the opposite of the numerator's: $$\int \frac{4\sin x}{16(1-\cos^2x) - 25\cos^2x}\,dx + \int \frac{5\cos x}{16\sin^2x -25(1-\sin^2x)}\,dx.$$
Now let $u=\cos x, v = \sin x$: $$\int \frac{-4}{16-41u^2}\,du + \int \frac{5}{41v^2-25}\,dv.$$
The denominators are difference of squares, which beg for partial fraction decomposition: $$\int \frac{1}{2\sqrt{41}u-8} + \frac{1}{-2\sqrt{41}u-8}\,du + \int\frac{1}{2\sqrt{41}v-10} + \frac{1}{-2\sqrt{41}v-10}\,dv$$ $$\frac{\log |2\sqrt{41}u-8| - \log|2\sqrt{41}u+8| + \log|2\sqrt{41}v-10|-\log|2\sqrt{41}v+10|}{2\sqrt{41}}+C$$ $$\frac{\log \left|\frac{(2\sqrt{41}\cos x-8)(2\sqrt{41}\sin x-10)}{(2\sqrt{41}\cos x+8)(2\sqrt{41}\sin x +10)}\right|}{2\sqrt{41}} +C$$ and if you want, you can continue simplifying the expression inside the $\log$.
A function of the form $f(x)=a\sin x+b\cos x$ can always be put in the form $$ f(x)=A\sin(x+\varphi) $$ for suitable $A$ and $\varphi$. Indeed, take $A=\sqrt{a^2+b^2}$ and find $\varphi$ such that $$ \cos\varphi=\frac{a}{A},\quad \sin\varphi=\frac{b}{A} $$ which is always possible, because $$\frac{a^2}{A^2}+\frac{b^2}{A^2}=1.$$ Then your integral becomes $$ \frac{1}{A}\int\frac{1}{\sin(x+\varphi)}dx $$ that can be reduced to computing $$ \int\frac{1}{\sin u}du $$ via the substitution $x+\varphi=u$. This is known: \begin{align} \int\frac{1}{\sin u}du &=\int\frac{\cos^2(u/2)+\sin^2(u/2)}{2\sin(u/2)\cos(u/2)}du\\[2ex] &=\frac{1}{2}\int\frac{\cos(u/2)}{\sin(u/2)}du+\frac{1}{2}\int\frac{\sin(u/2)}{\cos(u/2)}du\\[2ex] &=\log|\sin(u/2)|-\log|\cos(u/2)|+C\\[2ex] &=\log\left|\tan\frac{u}{2}\right|+C \end{align}
The final expression for your integral is now just a matter of back substituting (if you really want to write it).