Solveeit Logo

Question

Question: $\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} f(x) dx =$ Where $f(x) = \sin|x| + \cos|x|, x \in \left[-\fr...

π2π2f(x)dx=\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} f(x) dx =

Where f(x)=sinx+cosx,x[π2,π2]f(x) = \sin|x| + \cos|x|, x \in \left[-\frac{\pi}{2}, \frac{\pi}{2}\right].

A

0

B

2

C

4

D

8

Answer

4

Explanation

Solution

To evaluate the definite integral π2π2f(x)dx\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} f(x) dx, where f(x)=sinx+cosxf(x) = \sin|x| + \cos|x|, we note that the interval of integration is symmetric about 0. Also, f(x)f(x) is an even function because f(x)=sinx+cosx=sinx+cosx=f(x)f(-x) = \sin|-x| + \cos|-x| = \sin|x| + \cos|x| = f(x).

For an even function, aaf(x)dx=20af(x)dx\int_{-a}^{a} f(x) dx = 2 \int_{0}^{a} f(x) dx. Therefore,

π2π2(sinx+cosx)dx=20π2(sinx+cosx)dx\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} (\sin|x| + \cos|x|) dx = 2 \int_{0}^{\frac{\pi}{2}} (\sin x + \cos x) dx

Since x=x|x| = x for x[0,π2]x \in [0, \frac{\pi}{2}].

Now, we evaluate the integral:

20π2(sinx+cosx)dx=2[cosx+sinx]0π2=2[(cos(π2)+sin(π2))(cos(0)+sin(0))]=2[(0+1)(1+0)]=2[1+1]=42 \int_{0}^{\frac{\pi}{2}} (\sin x + \cos x) dx = 2 [-\cos x + \sin x]_{0}^{\frac{\pi}{2}} = 2 [ (-\cos(\frac{\pi}{2}) + \sin(\frac{\pi}{2})) - (-\cos(0) + \sin(0)) ] = 2 [ (0 + 1) - (-1 + 0) ] = 2 [1 + 1] = 4.

Thus, the value of the integral is 4.