JohnPaul
This is mycode. How to get f(sqrt(2))=2*sqrt(2)+9 in this code?


\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{fpu}
\usepackage{amsmath}
\begin{document}
\begin{tikzpicture}[%
>=stealth, scale=1,c/.style={circle,fill,inner sep=1.2pt},
declare function={a=1;b=3;c=0;d=3;
f(\x)=a*\x*\x*\x+b*\x*\x+c*\x+d;
}
]
\path (current bounding box.south) node[below=4pt, fill=yellow!50]{
\begin{minipage}
{14cm}
\pgfkeys{%
/pgf/number format/frac,/pgf/number format/frac whole=false,
}
\pgfmathparse{1/2}%
$f\left(\dfrac{1}{2}\right)= \pgfmathprintnumber\pgfmathresult$
\pgfkeys{%
/pgf/number format/frac,/pgf/number format/frac whole=true,
}
\pgfmathparse{-5}%
$f(-5)= \pgfmathprintnumber\pgfmathresult$
\pgfkeys{%
/pgf/number format/frac,/pgf/number format/frac whole=true,
}
\pgfmathparse{-25}%
$f(-25)= \pgfmathprintnumber\pgfmathresult$
\pgfkeys{%
/pgf/number format/frac,/pgf/number format/frac whole=true,
}
\pgfmathparse{7/9}%
$f(7/9)= \pgfmathprintnumber\pgfmathresult$

\pgfkeys{%
/pgf/number format/frac,/pgf/number format/frac whole=false,
}
\pgfmathparse{sqrt(2)}%
$f(\sqrt{2})= \pgfmathprintnumber\pgfmathresult$
\end{minipage}};
\end{tikzpicture}
\end{document}



Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.