help with a calculus question
Int dx/(sinx+cosx)= Int (cosx-Sinx)dx/(Cos2x-sin2x)= Int cosx dx/ (1-2Sin2x) - Int sinx dx/ (2cos2x-1) ..(.1)
Let 1-2sin2x =u and 2cos2x-1 =v
so, du= -2 (2)cosx dx =-4cosx dx, thus cosx dx = -1/4 du........(2)
and dv= -2 (2) sinx dx = -4sin x dx, thus sinx dx= -1/4 dv....(3)
let's now plug-in the value of sin x and cosx in (1)
We have int -1/4 (du)/u - Int (-1/4) dv/v
=-1/4 ln(u) -1/4 ln (v)+C
= -1/4 ln (2cos2x-1)-1/4 ln (1-2sin2x) +C
Hint: sin(x)+cos(x) = sqrt(2)sin(x+pi/4), and integral of 1/sin(x) = ln(|sin(x/2)| - ln(|cos(x/2)|
You may be interested to know that there is a general formula for condensing the sum of a sine and a cosine wave into a single sine or cosine wave. I'll show you how to condense such a sum into a single sine wave, but the derivation for a single cosine wave is exactly the same.
Goal: Find C and D, in terms of A and B, so that Asin(x)+Bcos(x)=Csin(x+D)
Well, we might make some progress if we expand the right-hand side using the sum formula for sine. This becomes
Now we should just compare the coefficients of sin(x) and cos(x) on each side of the equation. The coefficient of sin(x) on the left-hand side is A and the coefficient of sin(x) on the right-hand side is Ccos(D), so we want A=Ccos(D). Similarly, comparing coefficients for cos(x) on both sides of the equation shows we want B=Csin(D). If we divide this second equation by the first, we get tan(D)=B/A. That means D should be arctan(B/A). So we've figured out what D should be. What about C? Well, notice that
by the Pythagorean identity. So C should just be sqrt(A2+B2). This tells us what numbers C and D to choose if we want to write any sum Asin(x)+Bcos(x) as a single sine wave. This fact is very important in analyzing simple harmonic motion and the differential equation that governs it.
Now we can see where Robert's hint comes from. He told you that
But where does this fact come from? It just comes from the fact we just proved. In this case, A=1 and B=1, so C should be sqrt(12+12)=sqrt(2). And D should be arctan(B/A)=arctan(1/1)=arctan(1)=pi/4. That's where he gets those numbers.
Hope this deeper explanation helps!