I want to calculate the integral $\int \sqrt{1+\sin x}\, dx$.   I have done the following: \begin{equation*}\int \sqrt{1+\sin x}\, dx=\int \sqrt{\frac{(1+\sin x)(1-\sin x)}{1-\sin x}}\, dx=\int \sqrt{\frac{1-\sin^2 x}{1-\sin x}}\, dx=\int \sqrt{\frac{\cos^2x}{1-\sin x}}\, dx=\int \frac{\cos x}{\sqrt{1-\sin x}}\, dx\end{equation*}   We substitute $$u=\sqrt{1-\sin x} \Rightarrow du=\frac{1}{2\sqrt{1-\sin x}}\cdot (1-\sin x)'\, dx \Rightarrow du=-\frac{\cos x}{2\sqrt{1-\sin x}}\, dx \\ \Rightarrow  -2\, du=\frac{\cos x}{\sqrt{1-\sin x}}\, dx $$   We get the following:  \begin{equation*}\int \frac{\cos x}{\sqrt{1-\sin x}}\, dx=\int(-2)\, du=-2\cdot \int 1\, du=-2u+c\end{equation*}   Therefore \begin{equation*}\int \frac{\cos x}{\sqrt{1-\sin x}}\, dx=-2\sqrt{1-\sin x}+c\end{equation*}   In Wolfram the answer is a different one. What have I done wrong?
33586
To find:  $$\int \sqrt{1+\sin(x)} dx$$  What I  tried:  I put $\tan(\frac{x}{2}) = t$, using which I got it to:  $$I = 2\int \dfrac{1+t}{(1+t^2)^{\frac{3}{2}}}dt$$  Now I am badly stuck. There seems no way to approach this one. Please give a hint. Also, can we initially to some manipulations on the original integral to make it easy? Thank you.
30836
Calculate   $$\frac{\int_0^\pi x^3\ln(\sin x)\,dx}{\int_0^\pi x^2\ln(\sqrt{2}(\sin x))\,dx}$$   In this problem, I'm unable to understand how to start.  I tried applying integration by parts but I couldn't solve it. I also tried the various properties of definite integration but they were of no use. Maybe applying integration by parts (or DI method) successively may work but it leads to a form of $\frac{\infty}{\infty}$.
68465
Integrate $\dfrac{dx}{(a^2 \cos^2x+b^2 \sin^2x)^2}$.  I can go up to the residue formula like in this example   but then I just can't end up with the result for when $n=2$. I keep messing up my math. Can someone please show me how to get to the answer when $n=2$? I think I've spent 3+ hours trying to get to it and no luck unfortunately. Thank you!
3043
I want a hint on this following integral. I don't know the first step, do I do $u$-sub. or do I use trig. sub or something?  $$\int \frac{1}{2+ \sin x + \cos x} ~\mathrm{d}x$$
17869
$$\int \frac{\sin\left(x\right)}{1+x^2}dx$$  I have tried to integrate by parts but it doesn't work. How do I evaluate it? Any advice, hint or well-thought solution will be appreciated.
87978
Integrate: $\int (x^2+a^2)^{-3/2} \cdot dx$        My Approach:       $\int (x^2+a^2)^{-3/2} \cdot dx$ $\int (x^2+a^2)^{-3/2} \cdot d(a^2+x^2)\cdot \frac{dx}{d(x^2+a^2)}$       But this doesn't give the right answer. I showed this to my friend and he said $d(x^2+a^2)$ is not possible which makes sense since you can't take a small element of the  form $(x^2+a^2)$. How can I then solve this integration without using trigonometry?
117930
I'm stuck in solving the integral of $\dfrac{1}{\sin(x-a)\sin(x-b)}$. I "developed" the sin at denominator and then I divided it by $\cos^2x$ obtaining $$\int\frac{1}{\cos(a)\cos(b)\operatorname{tan}^2x-\cos(a)\sin(b)\operatorname{tan}x-\sin(a)\cos(b)\operatorname{tan}x+\sin(a)\sin(b)}\frac{1}{\cos^2x}dx$$  Then I made a substitution by $t=\operatorname{tan}x$ arriving to this $$\int\frac{1}{\cos(a)\cos(b)t^2-(\cos(a)\sin(b)+\sin(a)\cos(b))t+\sin(a)\sin(b)}dt$$ How can I solve it now? (probably I forgot something, it easy to make mistakes here)   Thank you in advance!
75214
How do I integrate the following $$\int \frac{dx}{\sin^3 x + \cos^3 x}$$ ?  It appears that I am supposed to break this up into $(\sin x + \cos x)(1-\cos x \sin x)$, but the next thing to do is not apparent to me.
116269
$$\int_0^1\sqrt\frac x{1-x}\,dx$$ I saw in my book that the solution is $x=\cos^2u$ and $dx=-2\cos u\sin u\ du$. I would like to see different approaches, can you provide them?
56865
Evaluate the following integral.$$\int \frac{\sec x}{\sqrt{3+\tan x}}dx$$  On putting $t=\tan x$ I am getting $$\int\frac{1}{\sqrt{(t^2+1)(t+3)}}dt$$.  How should i proceed from here.
84518
Integrate the following  :   $$\int \frac{\sin x}{\sin4x}dx$$  My approach :   $$=\int \frac{\sin x}{2\sin2x \cos2x}dx$$  $$= \int \frac{\sin x}{4\sin x \cos x \cos2x}dx$$ $$= \int \frac{1}{4\cos x \cos2x}dx $$ [ didn't get the hint here ] then I did the following way.  $$= \int \frac{\sin x}{4\sin x \cos x (\cos2x) }dx$$  Now putting $\cos x =t$ $\Rightarrow -\sin x \, dx = dt $   $$= \int \frac{-dt}{4\sqrt{1-t^2} t(2t^2-1)}$$  [Using : $ \cos2x = 2\cos^2x-1]$
104018
If we have to integrate $$f(x)=\frac{x}{\sqrt{1-x^2}}$$ and we substitute $x=\sin \theta$ then we eventually have to take the square root of $\cos^2x$ which is equal to $|\cos x|$.  But in my textbook and class lectures, we simply remove the absolute value sign and replace it with $\cos x$.  Why do we do this? I don't understand how we can do this.
86335
Question: How to evaluate $\displaystyle \int \frac{1}{\sin x\cos x} dx $  I know that the correct answer can be obtained by doing: $\displaystyle\frac{1}{\sin x\cos x} = \frac{\sin^2(x)}{\sin x\cos x}+\frac{\cos^2(x)}{\sin x\cos x} = \tan(x) + \cot(x)$ and integrating.  However, doing the following gets a completely different answer: \begin{eqnarray*} \int \frac{1}{\sin x\cos x} dx &amp;=&amp;\int \frac{\sin x}{\sin^2(x)\cos x} dx\\ &amp;=&amp;\int \frac{\sin x}{(1-\cos^2(x))\cos x} dx. \end{eqnarray*} let $u=\cos x, du=-\sin x dx$; then \begin{eqnarray*} \int \frac{1}{\sin x\cos x} dx &amp;=&amp;\int \frac{-1}{(1-u^2)u} du\\ &amp;=&amp;\int \frac{-1}{(1+u)(1-u)u}du\\  &amp;=&amp;\int \left(\frac{-1}{u} - \frac{1}{2(1-u)} + \frac{1}{2(1+u)}\right) du\\ &amp;=&amp;-\ln|\cos x|+\frac{1}{2}\ln|1-\cos x|+\frac{1}{2}\ln|1+\cos x|+C \end{eqnarray*}    I tested both results in Mathematica, and the first method gets the correct answer, but the second method doesn't. Is there any reason why this second method doesn't work?
95025
Find the indefinite integral  $$\int {dx \over {(1+x^2) \sqrt{1-x^2}}} $$  Is there a smart substitution or algebric trick that I'm missing? Because integration by parts hasn't helped..
60773
$$\int {\dfrac{x^2+\left(n-1\right)n}{\left(x\sin\left(x\right)+n\cos\left(x\right)\right)^2}}dx $$   My Try:  I multiple $x^{2n-2}$ to both N and D, then took D as $u$ and then solved to get $\dfrac{n\sin\left(x\right)-x\cos\left(x\right)}{x\sin\left(x\right)+n\cos\left(x\right)} + C$ as answer.  My teacher told that this would have been much easier if we had applied linearity and written question as   $={\displaystyle\int}\dfrac{x\sin\left(x\right)+\left(n-1\right)\cos\left(x\right)}{x\sin\left(x\right)+n\cos\left(x\right)}\,\mathrm{d}x-{\displaystyle\int}\dfrac{\left(\left(1-n\right)\sin\left(x\right)+x\cos\left(x\right)\right)\left(n\sin\left(x\right)-x\cos\left(x\right)\right)}{\left(x\sin\left(x\right)+n\cos\left(x\right)\right)^2}\,\mathrm{d}x$  I didn't get it, how did we write the above statement? I mean, please explain the method or steps for reaching to this part.
389
The integral is from P. Nahin's "Inside Interesting Integrals...", problem C2.1. His proposed solution includes trigonometric substitution and the use of log-sine integral.  However, I think the problem should have an easier solution (without appealing to another complicated integral at least).  I have the following trick in mind. Let's introduce the substitution $x=4-z$  $$I=\int_0^4 \frac{\ln x}{\sqrt{4x-x^2}}~dx=\int_0^4 \frac{\ln (4-z)}{\sqrt{4z-z^2}}~d(4-z)=\int_0^4 \frac{\ln (4-z)}{\sqrt{4z-z^2}}~dz$$  $$2I=\int_0^4 \frac{\ln (4x-x^2)}{\sqrt{4x-x^2}}~dx$$  $$I=\int_0^4 \frac{\ln \sqrt{4x-x^2}}{\sqrt{4x-x^2}}~dx$$    And here I'm stuck. I'm not sure if this can go somewhere. Maybe partial integration can help, but I don't know how to choose the functions. What do you think?    Here is .  Only  does not use trig substitution, it used gamma function instead. If there are no other ways, I'm prepared to give up on my question. But I would be grateful if it's left open at least for several days    Edit  After many attempts, I conclude that there is no trick to this integral. The reason is: the general form of this integral in not zero, but has the same symmetry properties, as the above case:  $$I(a)=\int_0^a \frac{\ln x}{\sqrt{ax-x^2}}~dx=\int_0^a \frac{\ln (a-x)}{\sqrt{ax-x^2}}~dx=\int_0^a \frac{\ln \sqrt{ax-x^2}}{\sqrt{ax-x^2}}~dx \neq 0$$  $$I(4)=0$$  So we will get nothing from symmetry considerations alone. There are two possible ways to solve this - either trigonometric substitution or gamma function.  Edit 2  I was wrong it seems, see the accepted answer.
76497
$$\begin{align} \int \sec x \, dx  &amp;= \int \cos x \left(  \frac{1}{\cos^2x} \right)  \, dx \\ &amp;= \int \cos x \left(  \frac{1}{1-\sin^2x} \right) \, dx \\ &amp; = \int\cos x\cdot\frac{1}{1-\frac{1-\cos2x}{2}} \, dx \\ &amp;= \int \cos x \cdot\frac{2}{1+\cos2x} \, dx  \end{align}$$  I am stuck in here. Any help to integrate secant?