---
title: "Show ∫ x/(sin x+cos x) dx"
subject: "Mathematics I"
chapter: 2
key: "semester_1/mathematics_i:integral-x-over-sin-plus-cos"
source: https://www.bctengineer.com/q/semester_1/mathematics_i/integral-x-over-sin-plus-cos
site: BCT Engineering
---

# Show ∫ x/(sin x+cos x) dx

Mathematics I · Chapter 2: Integration and its Applications

- Asked in: 2068 Chaitra
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_1/mathematics_i/integral-x-over-sin-plus-cos
- Whole chapter: https://www.bctengineer.com/md/semester_1/mathematics_i/chapter-2

## Question

Show that ∫₀^{π/2} x/(sin x + cos x) dx = (π/(2√2)) log(√2+1).

## Short answer

Use symmetry to obtain 2I = (π/2)∫_0^{π/2} dx/(sin x+cos x). Write denominator as √2 sin(x+π/4) and integrate to get √2 ln(√2+1), thus I = (π/(2√2)) ln(√2+1).

## Answer

Let I = ∫₀^(π/2) x/(sin x + cos x) dx. Using ∫₀^a f(x)dx = ∫₀^a f(a − x)dx with a = π/2 (sin and cos swap, the sum is unchanged):

I = ∫₀^(π/2) (π/2 − x)/(sin x + cos x) dx

Add: 2I = (π/2) ∫₀^(π/2) dx/(sin x + cos x).

**Evaluate K = ∫₀^(π/2) dx/(sin x + cos x).** Write sin x + cos x = √2 sin(x + π/4):

```text
K = (1/√2) ∫₀^(π/2) cosec(x + π/4) dx
  = (1/√2) [ln tan((x + π/4)/2)]₀^(π/2)
  = (1/√2) [ln tan(3π/8) − ln tan(π/8)]
```
tan(3π/8) = √2 + 1 and tan(π/8) = √2 − 1, so the ratio is (√2 + 1)/(√2 − 1) = (√2 + 1)².

K = (1/√2) · 2 ln(√2 + 1) = √2 ln(√2 + 1).

Then 2I = (π/2) · √2 ln(√2 + 1), so I = (π√2/4) ln(√2 + 1).

**I = (π/(2√2)) ln(√2 + 1).** Shown.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Replacing x by π/2 - x leaves sin x + cos x unchanged, so 2I equals
   A. π integral dx/(sin x + cos x)
   B. (π/2) integral dx/(sin x + cos x)
   C. (π/2) integral x dx
   D. π^2/4
   Answer: B. x + (π/2 - x) = π/2. (Key point: Symmetry)

2. sin x + cos x equals
   A. sin(x + π/2)
   B. 2 sin(x + π/4)
   C. sqrt2 sin(x + π/4)
   D. sqrt2 cos(x + π/2)
   Answer: C. Amplitude is sqrt2. (Key point: Rewrite)

3. K = integral dx/(sin x + cos x) from 0 to π/2 equals
   A. ln(sqrt2+1)
   B. sqrt2 ln 2
   C. (1/sqrt2) ln(sqrt2 + 1)
   D. sqrt2 ln(sqrt2 + 1)
   Answer: D. Using tan(3π/8)/tan(π/8) = (sqrt2+1)^2. (Key point: Evaluate K)

4. I equals
   A. (π/(2 sqrt2)) ln(sqrt2 + 1)
   B. (π/2) ln(sqrt2+1)
   C. (π/sqrt2) ln(sqrt2+1)
   D. (π/4) ln(sqrt2+1)
   Answer: A. I = (π/4)K. (Key point: Result)

## Related in Mathematics I

- [Show ∫ sin²x/(sin x+cos x) dx](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Aintegral-sin2x-over-sin-plus-cos) — Mathematics I, chapter 2
- [DUIS: ∫ log((a+b sin x)/(a−b sin x)) dx/sin x](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Aduis-log-a-plus-b-sinx) — Mathematics I, chapter 2, asked 9×
- [Show ∫ x log(sin x) dx](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Aintegral-x-log-sin-x) — Mathematics I, chapter 2
- [Gamma function: ∫ sin⁶(x/2) cos⁶(x/2) dx](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Agamma-sin6-cos6-half-x) — Mathematics I, chapter 2, asked 3×
- [DUIS: ∫ dx/(a²sin²x+b²cos²x)²](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Aduis-dx-over-a2sin2-b2cos2-squared) — Mathematics I, chapter 2, asked 2×
- [Beta-Gamma: ∫ sin⁴x cos²x dx = (3π−4)/192](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Abeta-gamma-sin4-cos2-pi4) — Mathematics I, chapter 2, asked 2×

## Related in other subjects

- [Gauss 2-point and 3-point: log(x+1)+sin 2x](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Agauss-2pt-3pt-log-sin) — Numerical Method, chapter 5
- [Gauss 3-point: sin x³ + cos x²](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Agauss-3pt-sin-x3-cos-x2) — Numerical Method, chapter 5, asked 2×
- [Sampling theorem; Nyquist of 1 + cos + sin](https://www.bctengineer.com/question.md?key=semester_4%2Fsignals_and_systems%3Asampling-theorem-nyquist-1-cos-sin) — Signals and Systems, chapter 4, asked 5×
- [Aliasing; Nyquist rate of 1 + cos + sin](https://www.bctengineer.com/question.md?key=semester_4%2Fsignals_and_systems%3Aaliasing-nyquist-1-cos-sin) — Signals and Systems, chapter 4, asked 4×
