%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% ---- ASETUKSET---- %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[12pt,a4paper]{amsart}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[finnish]{babel}
\usepackage{graphicx}
\usepackage{enumitem}
\usepackage{tikz}
\newcommand{\D}{\mathbb{D}}
\newcommand{\R}{\mathbb{R}}

\begin{document}
\noindent
\includegraphics[width=0.3\textwidth]{Logo_UEF}
\hfill
\begin{tabular}{@{}l@{}}
  Integraalilaskenta, verkkomateriaali\\
  Matematiikan perusopinnot\\[0.85cm]
\end{tabular}

\vspace*{-0.5cm}
\noindent\hrulefill
\vspace*{2cm}




%%%%%%%%%%%%%%%%%%%%%%%%
%%%% ---- OTSIKKO ---- %%%%
%%%%%%%%%%%%%%%%%%%%%%%%
 
\noindent
\textsc{\Large 5. Integrointi}\\[0.2cm]%
\textsc{\large 5.2 Pinta-alat summien raja-arvona}\\[0.2cm]%%
\textbf{\large 5.2.1 Pinta-alaongelma}\\[0.2cm]%%%
\bigskip\bigskip

%
%
%
%
%

 
%%%%%%%%%%%%%%%%%%%%%%
%%%% ---- TEKSTI ---- %%%%
%%%%%%%%%%%%%%%%%%%%%%

Suorakulmion ja suorakulmaisen kolmion pinta-alat pidetään tunnettuina.
\bigskip

\noindent\textbf{Pinta-alaongelma.} Aluetta $R$ rajoittavat $x$-akseli, käyrä $y=f(x)$ ja suorat $x=a$ ja $x=b$.

%\begin{figure}[h!]
%    \centering
%\includegraphics[width=0.75\linewidth]{area-as-integral.pdf}
%    \caption{Mikä on alueen $A$ pinta-ala?}
%    \label{fig:my_label}
%\end{figure}

%<script type="text/javascript" charset="UTF-8" src="//cdnjs.cloudflare.com/ajax/libs/jsxgraph/0.99.7/jsxgraphcore.js"></script>
%<div id='testikuva' class='jxgbox' style='width:300px; height:300px;'></div>
%<script>
%var taulu = JXG.JSXGraph.initBoard('testikuva',{boundingbox:[-0.5, 1.5, 3, -0.5],axis:true,showCopyright:false,showNavigation:false});
%var ax = Math.PI/5;var bx = Math.PI*3/4;
%var a = taulu.create('point', [ax,0], {name:'a', fixed:false,Color:'blue'});
%var b = taulu.create('point', [bx,0], {name:'b', fixed:false,Color:'blue'});
%var c1 = taulu.create('functiongraph', [function (t) { return Math.sin(t);}]);
%var i1 = taulu.create('integral', [[function(){return a.X()},function(){return b.X()}], c1]);
%</script>

%<!--

\begin{center}
\def\nuPi{3.1459265}
\begin{tikzpicture}[>=stealth,scale=2]
\draw[very thin, gray!30, step=0.5 cm,](-0.5,-0.5) grid (3,1.5);
\fill [red!75!white,fill opacity=0.5, domain=0.785:2.35, variable=\x]
      (0.785, 0)
      -- plot ({\x}, {sin(180*\x/\nuPi)})
      -- (2.35, 0)
      -- cycle;
\draw[blue, domain=-0.5:3, variable=\x]
(0,0) -- plot ({\x}, {sin(180*\x/\nuPi)});
\draw[->] (-0.5,0) -- (3,0);
\draw[->] (0,-0.5) -- (0,1.5);
\filldraw[color=blue] (0.785,0) circle (2pt) node[black,below=2mm]{$a$};
\filldraw[color=blue] (2.35,0) circle (2pt) node[black,below=2mm]{$b$};
\end{tikzpicture}
\end{center}

%-->

Mikä on alueen $R$ pinta-ala?

%%%%%%%%%%%%%%%%%%%%%%%%
%%%% ---- VIITTEET ---- %%%%
%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip

\begin{thebibliography}{9}
\bibitem{calculus} 
R.~A.~Adams and C.~Essex,
\emph{Calculus: a~complete course}, Ninth edition, Pearson, Ontario, 2018. Sivu 291.
\end{thebibliography}
\end{document}