# 007B Sample Midterm 1, Problem 5 Detailed Solution

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Find the area bounded by  ${\displaystyle y=\sin(x)}$  and  ${\displaystyle y=\cos(x)}$  from  ${\displaystyle x=0}$  to  ${\displaystyle x={\frac {\pi }{4}}.}$

Background Information:
1. You can find the intersection points of two functions, say  ${\displaystyle f(x),g(x),}$

by setting  ${\displaystyle f(x)=g(x)}$  and solving for  ${\displaystyle x.}$

2. The area between two functions,  ${\displaystyle f(x)}$  and  ${\displaystyle g(x),}$  is given by  ${\displaystyle \int _{a}^{b}f(x)-g(x)~dx}$

for  ${\displaystyle a\leq x\leq b,}$  where  ${\displaystyle f(x)}$  is the upper function and  ${\displaystyle g(x)}$  is the lower function.

Solution:

Step 1:
We start by finding the intersection points of these two functions.
So, we consider the equation  ${\displaystyle \sin x=\cos x.}$
In the interval  ${\displaystyle 0\leq x\leq {\frac {\pi }{4}},}$  the solutions to this equation are
${\displaystyle x=0}$  and  ${\displaystyle x={\frac {\pi }{4}}.}$
Also, for  ${\displaystyle 0  we have

${\displaystyle \sin(x)<\cos(x).}$

Step 2:
The area bounded by these functions is given by

${\displaystyle \int _{0}^{\frac {\pi }{4}}\cos x-\sin x~dx.}$

Then, we integrate to get
${\displaystyle {\begin{array}{rcl}\displaystyle {\int _{0}^{\frac {\pi }{4}}\cos x-\sin x~dx}&=&\displaystyle {\sin x+\cos x{\bigg |}_{0}^{\frac {\pi }{4}}}\\&&\\&=&\displaystyle {\sin {\bigg (}{\frac {\pi }{4}}{\bigg )}+\cos {\bigg (}{\frac {\pi }{4}}{\bigg )}-(\sin(0)+\cos(0))}\\&&\\&=&\displaystyle {{\frac {\sqrt {2}}{2}}+{\frac {\sqrt {2}}{2}}-1}\\&&\\&=&\displaystyle {{\sqrt {2}}-1.}\end{array}}}$

${\displaystyle {\sqrt {2}}-1}$