\documentclass[a4paper,10pt]{article} \usepackage{myXsim} %\usepackage{pgfplots} \usetikzlibrary {datavisualization.formats.functions} \author{Bertrand Benjamin} \title{Généralités sur les fonctions - Cours} \date{Septembre 2022} \pagestyle{empty} \usepackage{luacode} \begin{luacode*} function f_table () for t=-1, 1, 1 do local x=2*t-5 sf =[[%d & %d \\]] tex.print(string.format(sf, t, x)) end end \end{luacode*} \newcommand{\ftable}{\luadirect{f_table()}} \begin{document} \maketitle \setcounter{section}{1} \section{Les représentation de fonctions} On utilise essentiellement trois façons de représenter des fonctions \raggedcolumns \begin{multicols}{3} \textbf{Une formule} \[ f(x) = 2x - 5 \] \columnbreak \textbf{Un tableau de valeurs} \begin{center} \begin{tabular}{|c|c|} \hline $x$ & $f(x)$ \\ \hline \ftable \hline \end{tabular} \end{center} \columnbreak \textbf{Un graphique} \begin{tikzpicture} \datavisualization [ school book axes, visualize as smooth line, x axis={length=3cm, label}, y axis={length=3cm, label={$f(x)$}, ticks={step=2}}, all axes={grid}, ] data [format=function] { var x : interval [-1:4] samples 2; func y = \value x*2 - 5; }; \end{tikzpicture} \end{multicols} \afaire{Identifier image et antécédents dans ces trois représentations. Quel est l'ensemble de définition de la fonction $f$?} \paragraph{D'autres représentations} \afaire{Trouver deux autres représentations en tableau des fonctions} \end{document}