I'm using tikz
to create two arbitrary curves and fill the area between them. What I'm trying to do is:
This is my approach:
\documentclass{standalone}
\usepackage{amsmath}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[line join=round]
\draw [-latex,thick] (-0.5,0) -- (4.5,0) node[below]{$x$};
\draw [-latex,thick] (0,-0.5) -- (0,3.5) node[left]{$y$};
\draw [fill=white!50!blue,opacity=0.3, smooth,samples=100,domain=0.5:3.5] plot(\x, {sin(\x*200)*0.25+0.5}) -- plot(\x, {sin(\x*200)*0.25+2.5}) -- cycle;
\draw (0,0) node[below left]{$0$} ;
\draw (2,1.5) node[]{$D$} ;
\draw [blue, domain=-0.25:4, smooth, variable=\x] plot (\x, {sin(\x*200)*0.25+0.5});
\draw [blue, domain=-0.25:4, smooth, variable=\x] plot (\x, {sin(\x*200)*0.25+2.5});
\draw [blue] (0.5,-0.25) -- (0.5,3) ;
\draw [blue] (3.5,-0.25) -- (3.5,3);
\draw (0.5,0) node[below left]{$a$} ;
\draw (3.5,0) node[below right]{$b$};
\draw (4,3) node[right]{$y=\psi(x)$} ;
\draw (4,1) node[right]{$y=\varphi(x)$};
\end{tikzpicture}
\end{document}
And what I get:
I don't know how to fix these crossed lines.
I'm also having trouble to define the sin(\x*200)*0.25+2.5
in the y axis, to get something very similar:
Best Answer