# Differentiating a function and using the result to calculate the indefinite integral of another.

We should differentiate the function $f(x) = \sqrt{cosx}$ and use the result to calculate the indefinite integral $\int \frac{sinx}{\sqrt{cosx}}dx$.

So I started by differentiating $f(x) = \sqrt{cosx}$ and got the result $-\frac{sinx}{2\sqrt{cosx}}$, which is fine.

However.. I'm not sure what I'm supposed to see next. I know that $\int \frac{sinx}{\sqrt{cosx}}dx$ is very similar to $-\frac{\sin x}{2\sqrt{cosx}}$.

So I know that when we differentiated $\sqrt{cosx}$ we almost got the thing we want to integrate. But the difference is.. well.. $-\frac{1}{2}$, it seems.

Could anyone explain the next steps?

• Please prefix functions like $\sin$ and $\cos$ with  like so: \sin and \cos. Also please consider using diplaymode for some of your equations, that is done by having 2 $s around the formula instead of one: $\sin x$ and $$\sin x$$ becomes$\sin x$and $$\sin x$$ – Alice Ryhl Oct 3 '14 at 21:09 ## 1 Answer What about calculating$\displaystyle -2\int -\frac12\frac{\sin x}{\sqrt{\cos x}}\,dx$? $$\int \frac{\sin x}{\sqrt{\cos x}}\,dx=-2\underbrace{\int -\frac12\frac{\sin x}{\sqrt{\cos x}}\,dx}_{\sqrt{\cos x}}=-2\sqrt{\cos x}+C$$ • Thanks for your reply. Am I correct that the reasoning is.. I see that the difference is$-\frac{1}{2} * \$ what I have, and thus.. in order to add that (so I can calculate the integral), I will need to multiply the whole thing by -2 so I don't change anything? – user2451412 Oct 3 '14 at 21:15
• @user2451412 Yes, exactly. – rae306 Oct 3 '14 at 21:15
• Thanks, you're a legend. – user2451412 Oct 3 '14 at 21:16
• No problem! As always, click the checkbox :) – rae306 Oct 3 '14 at 21:17
• I've asked questions here three times and you've answered I think.. most likely every one of them. And you always do it very well, like, you really know your math and can explain it well. So thanks a lot, you deserve a lot of praise. – user2451412 Oct 3 '14 at 21:21