Drawing an Inflection Point with Tikz
Here is a minimal modification of your code using the sin
and cos
paht constructions, which are explained in section 2.12 of the pgfmanual.
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{center}
\begin{tikzpicture}[scale=1]
\draw[->] (-.5,0)--(6,0) node[below] {$x$};
\draw[->] (0,-.5)--(0,6) node[left] {$y$};
\coordinate (1) at (.5,2.75);
\coordinate (2) at (1.5,4.5);
\coordinate (3) at (3,3);
\coordinate (4) at (4.5,1.5);
\coordinate (5) at (5.5,3.25);
\draw [red,thick,-] (1)sin (2)
cos (3) sin (4) cos (5);
\draw[fill] (3) circle (2pt) node[above right] {$P$};
\end{tikzpicture}
\end{center}
\end{document}
Of course, you can also plot a function....
Just choose more accurate values for the in
and out
around the inflection point, like .. in=120] (3) to[out=300 ..
, and add some looseness
for more smoother curve.
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{center}
\begin{tikzpicture}[scale=1]
\draw[->] (-.5,0)--(6,0) node[below] {$x$};
\draw[->] (0,-.5)--(0,6) node[left] {$y$};
\coordinate (1) at (.5,2.75);
\coordinate (2) at (1.5,4.5);
\coordinate (3) at (3,3);
\coordinate (4) at (4.5,1.5);
\coordinate (5) at (5.5,3.25);
\draw [red,thick,looseness=.8] (1) to[out=80,in=180] (2)
to[out=0,in=120] (3) to[out=300,in=180] (4) to[out=0,in=260] (5);
\draw[fill] (3,3) circle (2pt) node[above right] {$P$};
\end{tikzpicture}
\end{center}
\end{document}
Since you drew this curve by approximation, I show you another way to draw this same curve by approximation.
Bezier curves can be used by indicating the control points for the start and finish point (as indicated on page 140 of the manual). Here, only the starting points (1)
and arrival points (5)
are sufficient, the others are useless.
I drew the tangents used by the Bézier curve in cyan.
To place the inflection point, always by approximation, I used the decorations.markings
library.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{center}
\begin{tikzpicture}[decoration={
markings,
mark=at position .55 with \fill circle (2pt) node[above right] {$P$};}]
\draw[->] (-.5,0)--(6,0) node[below] {$x$};
\draw[->] (0,-.5)--(0,6) node[left] {$y$};
\coordinate (1) at (.5,2.75);
\coordinate (5) at (5.5,3.25);
\draw[postaction={decorate}] (1) ..controls +(75:7) and +(-110:6)..(5);
\draw[cyan,->] (1) -- +(75:7);
\draw[cyan,<-] (5) -- +(-110:6);
\end{tikzpicture}
\end{center}
\end{document}