2003 Paper 2 Q6

Year: 2003
Paper: 2
Question Number: 6

Course: LFM Pure
Section: Integration

Difficulty: 1600.0 Banger: 1500.0

Problem

The function \(\f\) is defined by $$ \f(x)= \vert x-1 \vert\;, $$ where the domain is \({\bf R}\,\), the set of all real numbers. The function \(\g_n =\f^n\), with domain \({\bf R}\,\), so for example \(\g_3(x) = \f(\f(\f(x)))\,\). In separate diagrams, sketch graphs of \(\g_1\,\), \(\g_2\,\), \(\g_3\,\) and \(\g_4\,\). The function \(\h\) is defined by \[ \h(x) = |\sin {{{\pi}x} \over 2}|, \] where the domain is \({\bf R}\,\). Show that if \(n\) is even, \[ \int_0^n\,\big( \h(x)-\g_n(x)\big)\,\d x = \frac{2n}{\pi} -\frac{n}2\;. \]

Solution

TikZ diagram
TikZ diagram
TikZ diagram
TikZ diagram
If \(n\) is even, and \(0 < x < n\) then \(g_n(x) = \begin{cases} \{x \} & \text{if }\lfloor x \rfloor\text{ is even} \\ 1-\{x \} & \text{if }\lfloor x \rfloor\text{ is odd} \\\end{cases}\), in other words, there are \(\frac{n}{2}\) triangles, with height \(1\) and base \(2\), giving total area of \(\frac{n}{2}\). Each section of \(|\sin (\frac{n \pi}{2})|\) will have area \(\frac{2}{\pi}\) and there will be \(n\) of them, therefore \(\frac{2n}{\pi} - \frac{n}{2}\)
Rating Information

Difficulty Rating: 1600.0

Difficulty Comparisons: 0

Banger Rating: 1500.0

Banger Comparisons: 0

Show LaTeX source
Problem source
The function $\f$  is defined by 
$$
\f(x)=  \vert x-1 \vert\;,
$$
where the domain is ${\bf R}\,$, the set of all real numbers. 
The function $\g_n =\f^n$, with domain ${\bf R}\,$, 
so for example $\g_3(x) = \f(\f(\f(x)))\,$.
In separate diagrams, sketch graphs of $\g_1\,$, $\g_2\,$, $\g_3\,$ and $\g_4\,$.
The function $\h$ is defined by
\[
\h(x) = |\sin {{{\pi}x} \over 2}|,
\]
where  the domain is ${\bf R}\,$. Show that if $n$ is even,
\[
\int_0^n\,\big( \h(x)-\g_n(x)\big)\,\d x = \frac{2n}{\pi} -\frac{n}2\;.
\]
Solution source

\begin{center}
    \begin{tikzpicture}
    \def\functionf(#1){abs((#1)-1)};
    \def\xl{-5};
    \def\xu{5};
    \def\yl{-1};
    \def\yu{9};
    
    % Calculate scaling factors to make the plot square
    \pgfmathsetmacro{\xrange}{\xu-\xl}
    \pgfmathsetmacro{\yrange}{\yu-\yl}
    \pgfmathsetmacro{\xscale}{10/\xrange}
    \pgfmathsetmacro{\yscale}{10/\yrange}
    
    % Define the styles for the axes and grid
    \tikzset{
        axis/.style={very thick, ->},
        grid/.style={thin, gray!30},
        x=\xscale cm,
        y=\yscale cm
    }
    
    % Define the bounding region with clip
    \begin{scope}
        % You can modify these values to change your plotting region
        \clip (\xl,\yl) rectangle (\xu,\yu);
        
        % Draw a grid (optional)
        % \draw[grid] (-5,-3) grid (5,3);
        
        \draw[thick, blue, smooth, domain=\xl:\xu, samples=101] 
            plot ({\x}, {\functionf(\x)});

        % \draw[thick, blue, smooth, domain=\xl:\xu, samples=101] 
        %     plot ({\x}, {\functionf(\functionf(\x))});

        % \draw[thick, blue, smooth, domain=\xl:\xu, samples=101] 
        %     plot ({\x}, {\functionf(\functionf(\functionf(\x)))});

        % \draw[thick, blue, smooth, domain=\xl:\xu, samples=101] 
        %     plot ({\x}, {\functionf(\functionf(\functionf(\functionf(\x))))});
        
        % \draw[thick, blue, smooth, domain=\yl:-1, samples=100] 
        %     plot ({sqrt(\x*\x-1)-0.25}, {\x});
        % \draw[thick, blue, smooth, domain=\yl:-1, samples=100] 
        %     plot ({-(sqrt(\x*\x-1)-0.25)}, {\x});
        
    \end{scope}


    
    % Set up axes
    \draw[axis] (\xl,0) -- (\xu,0) node[right] {$x$};
    \draw[axis] (0,\yl) -- (0,\yu) node[above] {$y$};
    
    \end{tikzpicture}
\end{center}

\begin{center}
    \begin{tikzpicture}
    \def\functionf(#1){abs((#1)-1)};
    \def\xl{-5};
    \def\xu{5};
    \def\yl{-1};
    \def\yu{9};
    
    % Calculate scaling factors to make the plot square
    \pgfmathsetmacro{\xrange}{\xu-\xl}
    \pgfmathsetmacro{\yrange}{\yu-\yl}
    \pgfmathsetmacro{\xscale}{10/\xrange}
    \pgfmathsetmacro{\yscale}{10/\yrange}
    
    % Define the styles for the axes and grid
    \tikzset{
        axis/.style={very thick, ->},
        grid/.style={thin, gray!30},
        x=\xscale cm,
        y=\yscale cm
    }
    
    % Define the bounding region with clip
    \begin{scope}
        % You can modify these values to change your plotting region
        \clip (\xl,\yl) rectangle (\xu,\yu);
        
        % Draw a grid (optional)
        % \draw[grid] (-5,-3) grid (5,3);
        
        % \draw[thick, blue, smooth, domain=\xl:\xu, samples=101] 
        %     plot ({\x}, {\functionf(\x)});

        \draw[thick, blue, smooth, domain=\xl:\xu, samples=101] 
            plot ({\x}, {\functionf(\functionf(\x))});

        % \draw[thick, blue, smooth, domain=\xl:\xu, samples=101] 
        %     plot ({\x}, {\functionf(\functionf(\functionf(\x)))});

        % \draw[thick, blue, smooth, domain=\xl:\xu, samples=101] 
        %     plot ({\x}, {\functionf(\functionf(\functionf(\functionf(\x))))});
        
        % \draw[thick, blue, smooth, domain=\yl:-1, samples=100] 
        %     plot ({sqrt(\x*\x-1)-0.25}, {\x});
        % \draw[thick, blue, smooth, domain=\yl:-1, samples=100] 
        %     plot ({-(sqrt(\x*\x-1)-0.25)}, {\x});
        
    \end{scope}


    
    % Set up axes
    \draw[axis] (\xl,0) -- (\xu,0) node[right] {$x$};
    \draw[axis] (0,\yl) -- (0,\yu) node[above] {$y$};
    
    \end{tikzpicture}
\end{center}


\begin{center}
    \begin{tikzpicture}
    \def\functionf(#1){abs((#1)-1)};
    \def\xl{-5};
    \def\xu{5};
    \def\yl{-1};
    \def\yu{9};
    
    % Calculate scaling factors to make the plot square
    \pgfmathsetmacro{\xrange}{\xu-\xl}
    \pgfmathsetmacro{\yrange}{\yu-\yl}
    \pgfmathsetmacro{\xscale}{10/\xrange}
    \pgfmathsetmacro{\yscale}{10/\yrange}
    
    % Define the styles for the axes and grid
    \tikzset{
        axis/.style={very thick, ->},
        grid/.style={thin, gray!30},
        x=\xscale cm,
        y=\yscale cm
    }
    
    % Define the bounding region with clip
    \begin{scope}
        % You can modify these values to change your plotting region
        \clip (\xl,\yl) rectangle (\xu,\yu);
        
        % Draw a grid (optional)
        % \draw[grid] (-5,-3) grid (5,3);
        
        % \draw[thick, blue, smooth, domain=\xl:\xu, samples=101] 
        %     plot ({\x}, {\functionf(\x)});

        % \draw[thick, blue, smooth, domain=\xl:\xu, samples=101] 
        %     plot ({\x}, {\functionf(\functionf(\x))});

        \draw[thick, blue, smooth, domain=\xl:\xu, samples=101] 
            plot ({\x}, {\functionf(\functionf(\functionf(\x)))});

        % \draw[thick, blue, smooth, domain=\xl:\xu, samples=101] 
        %     plot ({\x}, {\functionf(\functionf(\functionf(\functionf(\x))))});
        
        % \draw[thick, blue, smooth, domain=\yl:-1, samples=100] 
        %     plot ({sqrt(\x*\x-1)-0.25}, {\x});
        % \draw[thick, blue, smooth, domain=\yl:-1, samples=100] 
        %     plot ({-(sqrt(\x*\x-1)-0.25)}, {\x});
        
    \end{scope}


    
    % Set up axes
    \draw[axis] (\xl,0) -- (\xu,0) node[right] {$x$};
    \draw[axis] (0,\yl) -- (0,\yu) node[above] {$y$};
    
    \end{tikzpicture}
\end{center}

\begin{center}
    \begin{tikzpicture}
    \def\functionf(#1){abs((#1)-1)};
    \def\xl{-5};
    \def\xu{5};
    \def\yl{-1};
    \def\yu{9};
    
    % Calculate scaling factors to make the plot square
    \pgfmathsetmacro{\xrange}{\xu-\xl}
    \pgfmathsetmacro{\yrange}{\yu-\yl}
    \pgfmathsetmacro{\xscale}{10/\xrange}
    \pgfmathsetmacro{\yscale}{10/\yrange}
    
    % Define the styles for the axes and grid
    \tikzset{
        axis/.style={very thick, ->},
        grid/.style={thin, gray!30},
        x=\xscale cm,
        y=\yscale cm
    }
    
    % Define the bounding region with clip
    \begin{scope}
        % You can modify these values to change your plotting region
        \clip (\xl,\yl) rectangle (\xu,\yu);
        
        % Draw a grid (optional)
        % \draw[grid] (-5,-3) grid (5,3);
        
        % \draw[thick, blue, smooth, domain=\xl:\xu, samples=101] 
        %     plot ({\x}, {\functionf(\x)});

        % \draw[thick, blue, smooth, domain=\xl:\xu, samples=101] 
        %     plot ({\x}, {\functionf(\functionf(\x))});

        % \draw[thick, blue, smooth, domain=\xl:\xu, samples=101] 
        %     plot ({\x}, {\functionf(\functionf(\functionf(\x)))});

        \draw[thick, blue, smooth, domain=\xl:\xu, samples=101] 
            plot ({\x}, {\functionf(\functionf(\functionf(\functionf(\x))))});
        
        % \draw[thick, blue, smooth, domain=\yl:-1, samples=100] 
        %     plot ({sqrt(\x*\x-1)-0.25}, {\x});
        % \draw[thick, blue, smooth, domain=\yl:-1, samples=100] 
        %     plot ({-(sqrt(\x*\x-1)-0.25)}, {\x});
        
    \end{scope}


    
    % Set up axes
    \draw[axis] (\xl,0) -- (\xu,0) node[right] {$x$};
    \draw[axis] (0,\yl) -- (0,\yu) node[above] {$y$};
    
    \end{tikzpicture}
\end{center}

If $n$ is even, and $0 < x < n$ then $g_n(x) = \begin{cases} \{x \} & \text{if }\lfloor x \rfloor\text{ is even} \\ 1-\{x \} & \text{if }\lfloor x \rfloor\text{ is odd} \\\end{cases}$, in other words, there are $\frac{n}{2}$ triangles, with height $1$ and base $2$, giving total area of $\frac{n}{2}$.

Each section of $|\sin (\frac{n \pi}{2})|$ will have area $\frac{2}{\pi}$ and there will be $n$ of them, therefore $\frac{2n}{\pi} - \frac{n}{2}$