Q:

How to plot intersection points in latex for this equation

How to plot intersection points between sin  curve and zero function.
I try this code but looks not nice. 
\documentclass{article} 
\usepackage{pgfplots}
\usetikzlibrary{intersections}

% Grouping the common style settings here to make the code below easier to read
\pgfkeys{/pgfplots/Axis Style/.style={
    width=13.5cm, height=5cm,
    axis x line=center, 
    axis y line=middle, 
    samples=100,
   % ymin=-1.5, ymax=1.5,
       ymin=-1.0, ymax=1.0,
    %xmin=-7.0, xmax=7.0,
     xmin=0, xmax=9.0,
    domain=0*pi:8*pi
}}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
    Axis Style,
    xtick={
        0.4268, 3.1416,  5.8564, 6.2832,  6.7100
    },
    xticklabels={
        $~$, $x_1$, $x_2$, $x_3$,
        $x_4$, $x_5$
    }
]
\addplot [name path=line 5] (0,1) -- (2050,0);
%\addplot [name path=line 0] (0,1) -- (1,1);

\addplot [name path=line 0] (0,0) -- (2850,0); % I want to draw stright line from (0,1) to (5,1) but unfortuntely i could not

\addplot [name path=line 1, ultra thick, red] {sin(deg(x))};
\addplot [name path=line 2, ultra thick, blue] {cos(deg(x))};

 \fill[green,name intersections={of=line 1 and line 0,total=\t}]
    \foreach \s in {1,...,\t}{(intersection-\s) circle (2pt) node {\footnotesize\s}};
     \fill[green,name intersections={of=line 2 and line 5,total=\t}]
    \foreach \s in {1,...,\t}{(intersection-\s) circle (2pt) node {\footnotesize\s}};  
\end{axis}
\end{tikzpicture}
\end{document}

Can anyone please have a better method.

A:

As I already mentioned in the comment below the question you used a strange syntax for \addplot coordinates. Here the correct variant which should give the desired behavior. I think with that it would be quite simple to adapt it to find the intersections of the "cosinus" curve with the "zero" line.
\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
    \usetikzlibrary{intersections}

% Grouping the common style settings here to make the code below easier to read
\pgfkeys{
    /pgfplots/Axis Style/.style={
        width=13.5cm, height=5cm,
        axis x line=center,
        axis y line=middle,
        samples=100,
        ymin=-1.0, ymax=1.0,
        xmin=0, xmax=9.0,
        domain=0*pi:8*pi
    }
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
    Axis Style,
    xtick={
        0.4268, 3.1416,  5.8564, 6.2832,  6.7100
    },
    xticklabels={
        $~$, $x_1$, $x_2$, $x_3$,
        $x_4$, $x_5$
    },
]
    \addplot [name path=line 5] coordinates { (0,1) (8*pi,1) };

    \addplot [name path=line 0] coordinates { (0,0) (8*pi,0) };

    \addplot [name path=line 1, ultra thick, red]  {sin(deg(x))};
    \addplot [name path=line 2, ultra thick, blue] {cos(deg(x))};

    \fill [green,name intersections={of=line 1 and line 0,total=\t}]
        \foreach \s in {1,...,\t}{
            (intersection-\s) circle (2pt)
                % the nodes are almost invisible and partially clipped ...
                % Are they really needed?
                node {\color{black}\footnotesize\s}}
        ;

    \fill [green,name intersections={of=line 2 and line 5,total=\t}]
        \foreach \s in {1,...,\t}{
            (intersection-\s) circle (2pt)
                node {\color{black}\footnotesize\s}}
        ;
\end{axis}
\end{tikzpicture}
\end{document}

