-1

I want to plot an increasing/decreasing mathematical function with a segment schema. I put an image about that: enter image description here

I prefer the plot with TikZ. Thanks.

4
  • Why no MWE? You should post one.
    – c.p.
    Mar 21, 2017 at 8:45
  • sorry, i'm spanish and i don't know what is MWE, and it is very difficult to me explain in english what i want, so i draw an image.
    – Tobal
    Mar 21, 2017 at 8:47
  • 2
    With your reputation you should know what a minimal working example (MWE) is!
    – CarLaTeX
    Mar 21, 2017 at 8:49
  • 1
    Debes subir un intento (código compilable) de lo que pretendes dibujar con TikZ. De otra manera, la gente piensa que quieres que ellos trabajen para ti. El sitio es para ayudar a los usuarios, no para que la gente trabaje para ellos.
    – c.p.
    Mar 21, 2017 at 8:59

3 Answers 3

6

Like this?

enter image description here

Your question is type of "do-it-for/instead-me", but TeX.SE is not site for such a service ... Since temporally I have some spare time and for my exercise and joy I wrote the following MWE:

\documentclass[tikz,margin=3mm]{standalone}
\usetikzlibrary{arrows.meta,shapes, shapes.arrows}

\begin{document}
    \begin{tikzpicture}[
every node/.style = {minimum size=1em,inner sep=2pt},
     Arrow/.style = {single arrow, draw, minimum height=3ex, 
                     single arrow head extend=1ex,
                     shape border rotate=#1}
                        ]
\draw[line width=1mm,{Bar[width=4mm,round]}-{Bar[width=4mm,round]}]
    (0,0) node [above=2mm] {$f'(x)$} 
          node [below=2mm] {$-\infty$}  -- ++ 
    (8,0) node [above=2mm] {}
          node [below=2mm] {$+\infty$} ;
\draw[line width=1mm,line cap=round]
    (3,-0.2) node[below] {$0$} -- ++ (0,0.4) 
    (5,-0.2) node[below] {$2$} -- ++ (0,0.4);
% signs    
\node[above] at (1.5,0.2) {$+$};
\node[above] at (4.0,0.2) {$-$};
\node[above] at (6.5,0.2) {$+$};
% arrows
\node[Arrow= 90, below] at (1.5,-0.2) {};
\node[Arrow=270, below] at (4.0,-0.2) {};
\node[Arrow= 90, below] at (6.5,-0.2) {};
    \end{tikzpicture}
\end{document}
1
\documentclass[10pt]{article}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows,decorations.markings}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\clip(0.35,0.87) rectangle (5.51,2.79);
\draw (1.,2.)-- (5.,2.);
\draw (0.2,2.70) node[anchor=north west] {$f'(x)$};
\draw (0.70,2) node[anchor=north west] {$-\infty$};
\draw (0.2,1.53) node[anchor=north west] {$f(x)$};
\draw (1.48,2.60) node[anchor=north west] {$+$};
\draw (4.8,2.6) node[anchor=north west] {$+$};
\draw (4.6,1.9) node[anchor=north west] {$+\infty$};
\draw (2.1,1.9) node[anchor=north west] {$0$};
\draw (4,2) node[anchor=north west] {$2$};
\draw (3,2.6) node[anchor=north west] {$-$};
\draw [->,>=stealth] (1.6,1.2) -- (1.6,1.8);
\draw [->,>=stealth] (4.5,1.2) -- (4.5,1.8);
\draw [->,>=stealth] (3.1,1.8) -- (3.1,1.2);
\begin{scriptsize}
\draw [fill=black] (5.,2.0) circle (2.5pt);
\draw [fill=black] (1.,2.0) circle (2.5pt);
\draw [fill=black] (2.2,2) circle (2.5pt);
\draw [fill=black] (4.,2.0) circle (2.5pt);
\end{scriptsize}
\end{tikzpicture}
\end{document}
1

Ok, I need the same figure with mathjax, too. So I can't use Tikz. I've made this code

\begin{tabular}{c c c c c c c c}
    $f^\prime (x)$ &  & - &  & + &  & - &  \\ 
    \hline 
    $f(x)$ & $-\infty$ & $\uparrow$ & 0 & $\downarrow$ & 2 & $\uparrow$ & $+\infty$ \\ 
\end{tabular}

Sorry for my inconvienence.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .