We need to find the area enclosed by f(x)=max{sinx,cosx} for −π≤x≤π and the x-axis.
Find where sinx=cosx
sinx=cosx when tanx=1, i.e., x=4π and x=−43π in [−π,π].
Determine f(x) on each interval
On [−π,−43π]: At x=−π, sin(−π)=0>cos(−π)=−1, so f(x)=sinx.
On [−43π,4π]: At x=0, cos0=1>sin0=0, so f(x)=cosx.
On [4π,π]: At x=2π, sin2π=1>cos2π=0, so f(x)=sinx.
Compute the area (integral of ∣f(x)∣)
Interval [−π,−43π]: Here f(x)=sinx≤0, so ∣f(x)∣=−sinx.
∫−π−3π/4(−sinx)dx=[cosx]−π−3π/4=cos(−43π)−cos(−π)=−22+1=1−22
Interval [−43π,4π]: Here f(x)=cosx. Since cosx<0 on [−43π,−2π] and cosx≥0 on [−2π,4π], we split:
∫−3π/4−π/2(−cosx)dx=[−sinx]−3π/4−π/2=−sin(−2π)+sin(−43π)=1−22
∫−π/2π/4cosxdx=[sinx]−π/2π/4=22−(−1)=22+1
Subtotal = (1−22)+(22+1)=2
Interval [4π,π]: Here f(x)=sinx≥0.
∫π/4πsinxdx=[−cosx]π/4π=−cosπ+cos4π=1+22
Total area
Area=(1−22)+2+(1+22)=4
The correct answer is Option B: 4.