222 lines
6.4 KiB
TeX
222 lines
6.4 KiB
TeX
\documentclass[a4paper,10pt]{article}
|
|
<<<<<<< HEAD
|
|
\usepackage[utf8x]{inputenc}
|
|
\usepackage[francais]{babel}
|
|
\usepackage{amssymb}
|
|
\usepackage{amsmath}
|
|
\usepackage{amsfonts}
|
|
|
|
% Title Page
|
|
\title{Jouons avec DS\_géné et pyMath}
|
|
% \quatreC \quatreD \troisB \troisPro
|
|
\date{}
|
|
|
|
=======
|
|
\RequirePackage[utf8x]{inputenc}
|
|
\RequirePackage[francais]{babel}
|
|
\RequirePackage{amssymb}
|
|
\RequirePackage{amsmath}
|
|
\RequirePackage{amsfonts}
|
|
\RequirePackage{subfig}
|
|
\RequirePackage{graphicx}
|
|
\RequirePackage{color}
|
|
|
|
% Title Page
|
|
\title{Calcul littéral et statistiques}
|
|
\date{\today}
|
|
>>>>>>> origin/dev
|
|
|
|
\begin{document}
|
|
\maketitle
|
|
|
|
<<<<<<< HEAD
|
|
<<<<<<< HEAD
|
|
\section{Exercice de simplification de fraction}
|
|
\Block{do RdExpression.set_form("exp")}
|
|
\Block{set A = RdExpression("{a}/2+2")()}
|
|
\Block{set B = RdExpression("{a}/2+2")()}
|
|
Développer et réduire les expressions suivantes:
|
|
|
|
\begin{equation*}
|
|
A = \Var{ A } \qquad
|
|
B = \Var{ B }
|
|
\end{equation*}
|
|
|
|
Solutions:
|
|
\Var{A.simplify() | calculus}
|
|
\Var{B.simplify() | calculus(name = "B")}
|
|
|
|
\section{Mettre sous forme canonique}
|
|
\Block{set P = RdExpression("{a}x^2 + {b}x + {c}")()}
|
|
Mettre $\Var{P}$ sous la forme canonique.
|
|
|
|
Solution:
|
|
|
|
On simplifie le polynôme:
|
|
\begin{eqnarray*}
|
|
\Var{P.simplify() | calculus(name = "P(x) = ")}
|
|
\end{eqnarray*}
|
|
|
|
|
|
Calcul des coordonnées du sommet de la courbe:
|
|
\begin{eqnarray*}
|
|
\alpha & = & \frac{-b}{2a} = \\
|
|
\beta & = & -\frac{b^2 - 4ac}{4a} =
|
|
\end{eqnarray*}
|
|
|
|
=======
|
|
\Calc
|
|
Le barème est donné à titre indicatif, il pourra être modifié.
|
|
|
|
\begin{Exo}[4.5]
|
|
\Block{set A = Expression.random("{a} / 2 + 2")}
|
|
\Block{set P = Polynom.random(["{b}","{a}"])}
|
|
\Block{set Q = Polynom.random(["{b+2}","{a}"])}
|
|
\Block{set R = P('x')*Q('x') }
|
|
Développer et réduire les expressions suivantes:
|
|
\begin{eqnarray*}
|
|
A &=& \Var{ A } \\
|
|
P(x) &=& \Var{ P } \\
|
|
Q(x) &=& \Var{ Q }\\
|
|
R(x) &=& \Var{R}
|
|
\end{eqnarray*}
|
|
|
|
Solutions:
|
|
\Var{A.simplify() | calculus}
|
|
\Var{P(2).simplify() | calculus(name = "P(2)")}
|
|
\Var{Q(2).simplify() | calculus(name = "Q(2)")}
|
|
\Var{(P+Q) | calculus(name = "P(x) + Q(X)")}
|
|
\Var{(P('x')+Q('x')).simplify() | calculus(name = "P(x) + Q(X)")}
|
|
\Var{R.simplify() | calculus(name = "R(x)")}
|
|
|
|
\end{Exo}
|
|
|
|
\begin{Exo}
|
|
\Block{set P = Polynom.random(["{a}", "{b}", "{c}"])}
|
|
=======
|
|
|
|
\section{Polynômes}
|
|
|
|
|
|
\Block{set P = Polynom.random(["{a}", "{b}", "{c}"], ["{b}**2 - 4*{a}*{c} == 0"])}
|
|
>>>>>>> origin/dev
|
|
Résoudre l'équation suivante
|
|
\begin{eqnarray*}
|
|
\Var{P} & = & 0
|
|
\end{eqnarray*}
|
|
|
|
Solution:
|
|
|
|
On commence par calculer le discriminant
|
|
\Block{set Delta = Expression("{b}^2 - 4*{a}*{c}".format(a = P._coef[2], b = P._coef[1], c = P._coef[0]))}
|
|
\begin{eqnarray*}
|
|
\Delta & = & b^2-4ac \\
|
|
\Var{Delta.simplify()|calculus(name="\\Delta")}
|
|
\end{eqnarray*}
|
|
\Block{set Delta = Delta.simplified()}
|
|
|
|
\Block{if Delta > 0}
|
|
Alors $\Delta = \Var{Delta} > 0$ donc il y a deux solutions
|
|
|
|
\Block{set x1 = (-P._coef[1] - sqrt(Delta))/(2*P._coef[2])}
|
|
\Block{set x2 = (-P._coef[1] + sqrt(Delta))/(2*P._coef[2])}
|
|
|
|
\begin{eqnarray*}
|
|
x_1 & = & \frac{-b - \sqrt{\Delta}}{2a} = \frac{\Var{-P._coef[1]} - \sqrt{\Var{Delta}}}{2 \times \Var{P._coef[2]}} = \Var{x1 | round(2)} \\
|
|
x_2 & = & \frac{-b + \sqrt{\Delta}}{2a} = \frac{\Var{-P._coef[1]} + \sqrt{\Var{Delta}}}{2 \times \Var{P._coef[2]}} = \Var{x2 | round(2)}
|
|
\end{eqnarray*}
|
|
|
|
Les solutions sont donc $\mathcal{S} = \left\{ \Var{x1|round(2)}; \Var{x2|round(2)} \right\}$
|
|
|
|
\Block{elif Delta == 0}
|
|
Alors $\Delta = \Var{Delta} = 0$ donc il y a une solution
|
|
|
|
\Block{set x1 = Expression("-{b}/(2*{a})".format(b = P._coef[1], a = P._coef[2]))}
|
|
|
|
\begin{eqnarray*}
|
|
x_1 = \frac{-b}{2a} = \Var{" = ".join(x1.simplify())}
|
|
\end{eqnarray*}
|
|
|
|
Les solutions sont donc $\mathcal{S} = \left\{ \Var{x1.simplified()}\right\}$
|
|
|
|
\Block{else}
|
|
Alors $\Delta = \Var{Delta} < 0$ donc il n'y a pas de solution.
|
|
|
|
\Block{endif}
|
|
|
|
\bigskip
|
|
~\dotfill
|
|
\bigskip
|
|
|
|
|
|
\Block{set P = Polynom.random(["{a}", "{b}", "{c}"])}
|
|
\Block{set Q = Polynom.random(["{a}", "{b}", "{c}"])}
|
|
Résoudre l'équation suivante
|
|
\begin{eqnarray*}
|
|
\Var{P} & = & \Var{Q}
|
|
\end{eqnarray*}
|
|
|
|
Solution:
|
|
|
|
On commence par se ramener à une équation de la forme $ax^2+bx+c = 0$.
|
|
|
|
\begin{eqnarray*}
|
|
\Var{P} = \Var{Q} & \Leftrightarrow & \Var{P} - (\Var{Q}) = 0 \\
|
|
\Var{(P - Q)|calculus(name = "", sep = "\\Leftrightarrow", end = "= 0")}
|
|
\end{eqnarray*}
|
|
|
|
\Block{set R = (P-Q)[-1]}
|
|
On cherche maintenant à résoudre l'équation $\Var{R} = 0$.
|
|
|
|
<<<<<<< HEAD
|
|
\end{Exo}
|
|
>>>>>>> origin/dev
|
|
=======
|
|
On commence par calculer le discriminant
|
|
\Block{set Delta = Expression("{b}^2 - 4*{a}*{c}".format(a = R._coef[2], b = R._coef[1], c = R._coef[0]))}
|
|
\begin{eqnarray*}
|
|
\Delta & = & b^2-4ac \\
|
|
\Var{Delta.simplify()|calculus(name="\\Delta")}
|
|
\end{eqnarray*}
|
|
\Block{set Delta = Delta.simplified()}
|
|
|
|
\Block{if Delta > 0}
|
|
Alors $\Delta = \Var{Delta} > 0$ donc il y a deux solutions
|
|
|
|
\Block{set x1 = (-R._coef[1] - sqrt(Delta))/(2*R._coef[2])}
|
|
\Block{set x2 = (-R._coef[1] + sqrt(Delta))/(2*R._coef[2])}
|
|
|
|
\begin{eqnarray*}
|
|
x_1 & = & \frac{-b - \sqrt{\Delta}}{2a} = \frac{\Var{-R._coef[1]} - \sqrt{\Var{Delta}}}{2 \times \Var{R._coef[2]}} = \Var{x1 | round(2)} \\
|
|
x_2 & = & \frac{-b + \sqrt{\Delta}}{2a} = \frac{\Var{-R._coef[1]} + \sqrt{\Var{Delta}}}{2 \times \Var{R._coef[2]}} = \Var{x2 | round(2)}
|
|
\end{eqnarray*}
|
|
|
|
Les solutions sont donc $\mathcal{S} = \left\{ \Var{x1|round(2)}; \Var{x2|round(2)} \right\}$
|
|
|
|
\Block{elif Delta == 0}
|
|
Alors $\Delta = \Var{Delta} = 0$ donc il y a une solution
|
|
|
|
\Block{set x1 = Expression("-{b}/(2*{a})".format(b = R._coef[1], a = R._coef[2]))}
|
|
|
|
\begin{eqnarray*}
|
|
x_1 = \frac{-b}{2a} = \Var{" = ".join(x1.simplify())}
|
|
\end{eqnarray*}
|
|
|
|
Les solutions sont donc $\mathcal{S} = \left\{ \Var{x1.simplified()}\right\}$
|
|
|
|
\Block{else}
|
|
Alors $\Delta = \Var{Delta} < 0$ donc il n'y a pas de solution.
|
|
|
|
\Block{endif}
|
|
>>>>>>> origin/dev
|
|
|
|
|
|
\end{document}
|
|
|
|
%%% Local Variables:
|
|
%%% mode: latex
|
|
%%% TeX-master: "master"
|
|
%%% End:
|
|
|
|
|