Afficher en version longue
Rédiger le cours
Vider les graphiques
Moon Arrows Sun
Arrows

Les fonctions affines

Une droite se résume à deux nombres : on les calcule, et ils disent tout de la fonction.

Un forfait mobile coûte \(8 \ \text{€}\) par mois, plus \(0.05 \ \text{€}\) par SMS hors forfait. Le prix d'un mois où l'on en envoie \(x\) s'écrit :

$$ f(x) = 0.05x + 8 $$

\(8\) est ce que l'on paie sans rien envoyer, \(0.05\) le prix de chaque SMS : l'ordonnée à l'origine et le coefficient directeur.

Le prix monte toujours du même pas : sa représentation est une droite.

Définition

Une fonction affine

Une fonction affine, représentée par une droite, s'écrit :

$$f(x) = ax + b \hspace{2em} (a \in \mathbb{R} \quad \text{et} \quad b \in \mathbb{R}) $$
Fonction affine
Graphe vide avec vecteurs unitaires
la fonction affine : \(f(x) = ax+b\)

Avec :

Avec deux points distincts de la courbe, on calcule d'abord \(a\), puis on en déduit \(b\).

Le coefficient directeur : \(a\)

Il indique l'inclinaison de la droite.

Avec \(M_1\bigl( x_1 ; y_1 \bigr)\) et \(M_2\bigl( x_2 ; y_2 \bigr)\) :

$$ a = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\Delta y}{\Delta x} $$
Fonction affine coef dir
Graphe vide avec vecteurs unitaires
le calcul du coefficient directeur \(a\)

le calcul du coefficient directeur \(a\)

Soit \(f\) une fonction affine.

Soient \(M_1\bigl( x_1 ; y_1 \bigr)\) et \(M_2\bigl( x_2 ; y_2 \bigr)\) deux points distincts de \(\mathcal{C}_f\) :

$$ \Biggl \{ \begin{gather*} y_1 = a x_1 + b \hspace{2em} (1) \\ y_2 = a x_2 + b \hspace{2em} (2) \end{gather*} $$
$$ \text{avec} \enspace \Biggl \{ \begin{gather*} (a, b) \in \hspace{0.01em} \mathbb{R}^2 \\ x_1 \neq x_2 \end{gather*} $$

\((2) - (1)\) :

$$ y_2 - y_1= a x_2 + b - (a x_1 + b) $$
$$ y_2 - y_1 = a x_2+ b - a x_1 - b $$

Les \(b\) s'éliminent :

$$ y_2 - y_1 = a x_2 - a x_1 $$

On factorise par \(a\) :

$$ y_2 - y_1 = a(x_2 - x_1) $$

Comme \(x_1 \neq x_2\) :

$$ a = \frac{y_2 - y_1}{x_2 - x_1} $$

L'ordonnée à l'origine : \(b\)

  1. Détermination de \(b\)

    Il existe deux possibilités pour obtenir \(b\).

    1. en connaissant les coordonnées d'un point de la courbe

      Une fois \(a\) calculé, avec \(M_1\) :

      $$ M_1(x_1; y_1) \in \hspace{0.01em} \mathcal{C}_f \Longleftrightarrow f(x_1) = ax_1 + b $$
      $$ f(x_1) - ax_1 = b $$

      On en déduit \(b\) :

      $$M_1(x_1; y_1) \in \hspace{0.01em} \mathcal{C}_f \Longleftrightarrow b = f(x_1) -a x_1 $$
    2. en connaissant la formule de l'équation

      On calcule \(f(0)\) :

      $$ f(0) = a \times 0 + b = b $$

      D'où l'ordonnée à l'origine :

      $$b = f(0) $$
  2. Cas particulier : fonction linéaire

    Si \(b = 0\), on parle de fonction linéaire :

    $$f(x) = ax \hspace{2em} (a \in \mathbb{R}) $$
    Fonction lineaire
    Graphe vide avec vecteurs unitaires
    la fonction linéaire : \(f(x) = ax\)

Signes et variations d'une fonction affine

Soit \(f(x) = ax+b\).

Son sens de variation ne dépend que de la pente \(a\).

$$ x $$
$$ -\infty $$
$$ - \frac{b}{a} $$
$$ +\infty $$
$$ \textcolor{rgb(93 183 129)}{si \ a \ \text{est} \ +} $$
$$ \textcolor{rgb(232 124 124)}{-} $$
$$ 0 $$
$$ \textcolor{rgb(93 183 129)}{+} $$
Arrow
$$ \textcolor{rgb(232 124 124)}{si \ a \ \text{est} \ -} $$
$$ \textcolor{rgb(93 183 129)}{+} $$
$$ 0 $$
$$ \textcolor{rgb(232 124 124)}{-} $$
Arrow
signes d'une fonction affine : \(f(x) = ax+b\)

Le signe d'une fonction affine

Soit \(f(x) = ax+b\), avec \(a \neq 0\). On résout :

$$ f(x) > 0 $$
$$ ax+b > 0 $$
$$ ax > -b $$
$$ \left \{ \begin{gather*} \textcolor{rgb(93 183 129)}{si \ a \ \text{est} \ +}, \ x > -\frac{b}{a} \\ \\ \textcolor{rgb(232 124 124)}{si \ a \ \text{est} \ -}, \ x < -\frac{b}{a} \end{gather*} \right \} $$
$$ f(x) = 0 $$
$$ ax+b = 0 $$
$$ ax = -b $$
$$ x = -\frac{b}{a} $$
$$ f(x) < 0 $$
$$ ax+b < 0 $$
$$ ax < -b $$
$$ \left \{ \begin{gather*} \textcolor{rgb(93 183 129)}{si \ a \ \text{est} \ +}, \ x < -\frac{b}{a} \\ \\ \textcolor{rgb(232 124 124)}{si \ a \ \text{est} \ -}, \ x > -\frac{b}{a} \end{gather*} \right \} $$
$$ x $$
$$ -\infty $$
$$ - \frac{b}{a} $$
$$ +\infty $$
$$ \textcolor{rgb(93 183 129)}{si \ a \ \text{est} \ +} $$
$$ \textcolor{rgb(232 124 124)}{-} $$
$$ 0 $$
$$ \textcolor{rgb(93 183 129)}{+} $$
$$ \textcolor{rgb(232 124 124)}{si \ a \ \text{est} \ -} $$
$$ \textcolor{rgb(93 183 129)}{+} $$
$$ 0 $$
$$ \textcolor{rgb(232 124 124)}{-} $$
signes d'une fonction affine : \(f(x) = ax+b\)

Les variations d'une fonction affine

Pour deux points \(M_1\bigl( x_1 ; y_1 \bigr)\) et \(M_2\bigl( x_2 ; y_2 \bigr)\) :

$$ a = \frac{y_2 - y_1}{x_2 - x_1} $$

Avec \(x_1 < x_2\) :

$$ a = \frac{y_2 - y_1}{\underbrace{x_2 - x_1} _\text{toujours \(> 0\)}} $$

Le signe de \(a\) est celui de \(y_2 - y_1\).

$$ \textcolor{rgb(93 183 129)}{si \ a \ \text{est} \ +}, $$
$$ y_2 -y_1 > 0 $$
$$ y_1 < y_2 $$

Alors,

$$ \bigl[ x_1 < \ ; \ x_2 \bigr] \land \Bigl[ f(x_1) < \ ; \ f(x_2) \Bigr] $$

Les images sont dans le même ordre :

\(\Longrightarrow\) la fonction est croissante

$$ \textcolor{rgb(232 124 124)}{si \ a \ \text{est} \ -}, $$
$$ y_2 -y_1 < 0 $$
$$ y_1 > y_2 $$

Alors,

$$ \bigl[ x_1 < \ ; \ x_2 \bigr] \land \Bigl[ f(x_1) > \ ; \ f(x_2) \Bigr] $$

Les images sont dans l'ordre contraire :

\(\Longrightarrow\) la fonction est décroissante

Exemple :

$$ f(x) = -3x + 1 $$

La pente est négative : la fonction est strictement décroissante.

$$ x $$
$$ -\infty $$
$$ \frac{1}{3} $$
$$ +\infty $$
signe de \(f\)
$$ \textcolor{rgb(93 183 129)}{+} $$
$$ 0 $$
$$ \textcolor{rgb(232 124 124)} {-} $$
variations de \(f\)
Arrow
$$ x $$
$$ -\infty $$
$$ $$
$$ +\infty $$
signe de \(f\)
$$ $$
$$ 0 $$
$$ $$
variations de \(f\)
signes et variations de \(f(x) = -3x+1\)

Point d'intersection entre deux fonctions affines : \(f_1 = f_2\)

Soit deux fonctions affines :

$$ \forall x \in \mathbb{R}, \ \Biggl \{ \begin{gather*} f_1(x) = a_1 x + b_1 \\ f_2(x) = a_2 x + b_2 \end{gather*} $$
$$ \text{avec} \enspace \Biggl \{ \begin{gather*} (a_1, \ b_1, \ a_2, \ b_2) \in \hspace{0.01em} \mathbb{R}^4 \\ a_1 \neq a_2 \end{gather*} $$

Les droites ne sont pas parallèles : elles se coupent où \(f_1(x) = f_2(x)\) :

$$ f_1(x) = f_2(x) \Longrightarrow x = - \frac{b_2- b_1}{a_2 - a_1} = - \frac{\Delta b}{\Delta a} $$

Le point d'intersection entre deux fonctions affines non parallèles

On résout :

$$f_1(x) = f_2(x) $$

Soit :

$$ a_1 x + b_1 = a_2 x + b_2 $$
$$ a_1 x - a_2 x = b_2 - b_1 $$
$$ x(a_1 - a_2) = b_2 - b_1 $$
$$ x = \frac{b_2- b_1}{a_1 - a_2} $$

On sort le signe \((-)\) :

$$ x = \frac{b_2- b_1}{-(a_2 - a_1)} $$
$$x = - \frac{b_2- b_1}{a_2 - a_1} = - \frac{\Delta b}{\Delta a} $$
$$ \text{avec} \ (a_1 \neq a_2) $$

Le coefficient directeur comme taux d'accroissement

Pour \(f(x) = mx + p\), \(m\) est la variation de \(f(x)\) par unité de \(x\) : c'est le taux d'accroissement de \(f\).

$$ m = \frac{f(b) - f(a)}{b - a} \hspace{2em} \text{pour tous réels } a \neq b $$

Le taux d'accroissement d'une fonction affine est constant

Soient \(a \neq b\) deux réels :

$$ f(b) - f(a) = (mb + p) - (ma + p) = m(b - a) $$

En divisant par \(b - a \neq 0\) :

$$ \frac{f(b) - f(a)}{b - a} = m $$

Ce taux ne dépend ni de \(a\) ni de \(b\).

Si \(m = 3\), quand \(x\) augmente de \(1\), \(f(x)\) augmente de \(3\).

Plus généralement :

Une fonction est affine si et seulement si son taux d'accroissement entre deux points quelconques est constant.