I am unable to highlight the intersection area of $x^2+y^2=2x ; x=y^2$ using TikZ, I have tried two different codes by using pgfonlayer, as mentioned below, one is running but giving output as filling shade in the form of triangle, other is not running which I have shown below in comments.
Please help... thanks
\documentclass{article}
\usepackage{tikz,pgfplots}
%\usepackage[x11names]{xcolor}
\usepackage{tikz}
\usetikzlibrary{intersections}
\pgfdeclarelayer{bg} % declare background
\pgfsetlayers{bg,main} % order of layers (main = standard layer)
\pgfplotsset{compat=1.13}
\usepackage{amsmath}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\draw(1,0)circle(1cm); % DRAW CIRCLE
\draw[blue,line width = 0.50mm] plot[smooth,domain= -2:2,variable=\y]
( {(\y)^2},\y);
\draw (-2,0)--(4,0) (0,-2)--(0,4);
\draw(1,1)node(a){A}--(1,0)node(c){C};
\draw(2,0)node(b){B}--(0,0)node(o){O};
\begin{pgfonlayer}{bg} % select background
\path [fill=blue!50] (o.center) --(a.center) --(b.center) -- cycle;
\end{pgfonlayer}
I have tried the following code as well, but it is showing some error, please help.
% \begin{pgfonlayer}{bg} % select background
% \clip plot[smooth,domain=0:2] (\sqrt{1-(x-1)^2}, \x);
% \fill[red] plot[smooth,domain= -2:2,variable=\y] ({(\y)^2},\y);
% \end{pgfonlayer}
\end{tikzpicture}
\end{document}




\clip plot[smooth,domain=0:2] ({sqrt(1-(\x-1)^2)}, \x);not\clip plot[smooth,domain=0:2] (\sqrt{1-(x-1)^2}, \x);– cis Mar 26 '20 at 12:58