\documentclass[12pt,a4paper]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{amsmath,amssymb}
\usepackage{tikz,tkz-tab}
\usepackage{pgfplots}
\pgfplotsset{compat=1.17}
\usetikzlibrary{arrows.meta,calc,positioning}
\usepackage{fontspec}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\usepackage{array}
\usepackage{polyglossia}
\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{french}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.15]{Amiri}
\newfontfamily\arabicfontsf[Script=Arabic,Scale=1.15]{Amiri}
\newcommand{\cadre}[1]{\begin{center}\begin{LTR}#1\end{LTR}\end{center}}
\newcommand{\cadrertl}[1]{\begin{center}#1\end{center}}
\newcommand{\ipa}[1]{#1}
\pagestyle{empty}
\setlength{\parindent}{0pt}
\newcounter{q}
\newcommand{\sujet}[1]{%
  \newpage\stepcounter{q}%
  \begin{tcolorbox}[colback=blue!5,colframe=blue!60!black,arc=3mm,boxrule=1pt]
  \centering {\Large\bfseries مسابقة بين الثانويات -- الرياضيات}\\[2mm]
  {\large السؤال رقم \theq \quad -- \quad #1 \quad -- \quad المدة: دقيقتان}
  \end{tcolorbox}\vspace{5mm}\large}
\newcommand{\rep}{\vfill\begin{tcolorbox}[colback=white,colframe=black!50,height=3.2cm,title=الإجابة:]\end{tcolorbox}}
\newenvironment{sanad}{\begin{tcolorbox}[colback=orange!4,colframe=orange!60!black,title=السند,fonttitle=\bfseries]}{\end{tcolorbox}}
\begin{document}
\sujet{جدول التغيرات}

لتكن $f$ دالة معرفة على $\mathbb{R}$، جدول تغيراتها كما يلي:

\cadre{\begin{tikzpicture}
\tkzTabInit[lgt=2,espcl=2.5]{$x$/1,$f'(x)$/1,$f(x)$/2.2}{$-\infty$,$-1$,$2$,$+\infty$}
\tkzTabLine{,+,z,-,z,+,}
\tkzTabVar{-/$-\infty$,+/$3$,-/$-2$,+/$+\infty$}
\end{tikzpicture}}

\textbf{السؤال:} ما هو عدد حلول المعادلة $f(x)=0$؟ وما هو عدد حلول المعادلة $f(x)=4$؟

\rep

\sujet{جدول الإشارة}

إليك جدول إشارة الدالة $f$ المعرفة على $\mathbb{R}-\{3\}$:

\cadre{\begin{tikzpicture}
\tkzTabInit[lgt=2,espcl=2.2]{$x$/1,$f(x)$/1}{$-\infty$,$-2$,$1$,$3$,$+\infty$}
\tkzTabLine{,-,z,+,z,-,d,+,}
\end{tikzpicture}}

\textbf{السؤال:} حلّ في $\mathbb{R}$ المتراجحة $f(x)\geqslant 0$.

\rep

\sujet{قراءة بيانية}

$(C_f)$ هو التمثيل البياني للدالة $f$ المعرفة على $\mathbb{R}$ بـ: $f(x)=x^2+bx+c$.

\cadre{\begin{tikzpicture}
\begin{axis}[axis lines=middle,grid=both,width=9cm,height=8cm,xmin=-3,xmax=5,ymin=-5,ymax=5,
 xtick={-2,...,4},ytick={-4,...,4},xlabel=$x$,ylabel=$y$,ticklabel style={font=\small}]
\addplot[blue,very thick,domain=-2.1:4.1,samples=100]{x^2-2*x-3};
\node[blue] at (axis cs:3.8,3) {$(C_f)$};
\end{axis}\end{tikzpicture}}

\textbf{السؤال:} عيّن بيانيًا $f'(1)$، ثم حلّ المتراجحة $f(x)<0$، ثم استنتج قيمتي $b$ و $c$.

\rep

\sujet{المماس}

$(C_f)$ منحنى دالة $f$ و $(T)$ مماسه عند النقطة $A$ ذات الفاصلة $1$.

\cadre{\begin{tikzpicture}
\begin{axis}[axis lines=middle,grid=both,width=9cm,height=8.5cm,xmin=-2,xmax=2.5,ymin=-4,ymax=5,
 xtick={-1,1,2},ytick={-3,...,4},xlabel=$x$,ylabel=$y$,ticklabel style={font=\small}]
\addplot[blue,very thick,domain=-1.9:1.55,samples=100]{x^3+1};
\addplot[red,thick,domain=-1:2.1]{3*x-1};
\fill (axis cs:1,2) circle (2pt) node[left] {$A$};
\node[blue] at (axis cs:-1.4,-2.2) {$(C_f)$};
\node[red] at (axis cs:2.2,3.8) {$(T)$};
\end{axis}\end{tikzpicture}}

\textbf{السؤال:} عيّن $f(1)$ و $f'(1)$، ثم اكتب معادلة للمماس $(T)$.

\rep

\sujet{المستقيمات المقاربة}

لتكن $f$ دالة معرفة على $\mathbb{R}-\{1\}$، جدول تغيراتها:

\cadre{\begin{tikzpicture}
\tkzTabInit[lgt=2,espcl=3]{$x$/1,$f'(x)$/1,$f(x)$/2.2}{$-\infty$,$1$,$+\infty$}
\tkzTabLine{,-,d,-,}
\tkzTabVar{+/$2$,-D+/$-\infty$/$+\infty$,-/$2$}
\end{tikzpicture}}

\textbf{السؤال:} استنتج معادلات المستقيمات المقاربة للمنحنى $(C_f)$.

\rep

\sujet{المتتاليات الحسابية}

$(u_n)$ متتالية حسابية حيث: $u_0=3$ و $u_5=13$.

\cadre{\renewcommand{\arraystretch}{1.6}
\begin{tabular}{|c|c|c|c|c|c|c|}\hline
$n$ & $0$ & $1$ & $2$ & $3$ & $4$ & $5$\\\hline
$u_n$ & $3$ & $\dots$ & $\dots$ & $\dots$ & $\dots$ & $13$\\\hline
\end{tabular}}

\textbf{السؤال:} أوجد الأساس $r$، ثم احسب $u_{20}$ والمجموع $S=u_0+u_1+\dots+u_{20}$.

\rep

\sujet{المتتاليات الهندسية}

الشكل يمثل الحدود الأولى لمتتالية هندسية $(v_n)$:

\cadre{\begin{tikzpicture}
\begin{axis}[axis lines=middle,grid=both,width=8cm,height=8cm,xmin=-0.5,xmax=4.5,ymin=0,ymax=9.5,
 xtick={0,...,4},ytick={0,...,9},xlabel=$n$,ylabel=$v_n$,ticklabel style={font=\small}]
\addplot[only marks,mark=*,red,mark size=3pt] coordinates {(0,1)(1,2)(2,4)(3,8)};
\end{axis}\end{tikzpicture}}

\textbf{السؤال:} عيّن الأساس $q$ و $v_0$، ثم احسب $v_{10}$ والمجموع $v_0+v_1+\dots+v_9$.

\rep

\sujet{إشارة المشتقة}

لتكن $f$ دالة قابلة للاشتقاق على $\mathbb{R}$، وإشارة دالتها المشتقة كما يلي:

\cadre{\begin{tikzpicture}
\tkzTabInit[lgt=2,espcl=2.5]{$x$/1,$f'(x)$/1}{$-\infty$,$-1$,$2$,$+\infty$}
\tkzTabLine{,-,z,+,z,+,}
\end{tikzpicture}}

\textbf{السؤال:} كم قيمة حدية محلية تقبلها الدالة $f$؟ حدّد طبيعتها وفاصلتها مع التعليل.

\rep

\sujet{منحنى الدالة المشتقة}

المنحنى التالي هو التمثيل البياني \textbf{للدالة المشتقة} $f'$ لدالة $f$ معرفة على $\mathbb{R}$:

\cadre{\begin{tikzpicture}
\begin{axis}[axis lines=middle,grid=both,width=9cm,height=8cm,xmin=-3,xmax=3,ymin=-2,ymax=5,
 xtick={-2,...,2},ytick={-1,...,4},xlabel=$x$,ylabel=$y$,ticklabel style={font=\small}]
\addplot[teal,very thick,domain=-2.4:2.4,samples=100]{x^2-1};
\node[teal] at (axis cs:2.6,4.3) {$(C_{f'})$};
\end{axis}\end{tikzpicture}}

\textbf{السؤال:} شكّل جدول تغيرات الدالة $f$ (دون حساب النهايات والقيم)، وعيّن فاصلة القيمة الحدية العظمى المحلية.

\rep

\sujet{الدالة الأسية}

\textbf{السؤال:} حلّ في $\mathbb{R}$ المعادلة:
\[ e^{2x}-3e^{x}+2=0 \]
\textit{(إرشاد: ضع $X=e^{x}$)}

\rep

\sujet{الدالة اللوغاريتمية}

لتكن الدالة $g$ المعرفة بـ: \[ g(x)=\ln\left(\frac{x-1}{x+2}\right) \]

\cadre{\begin{tikzpicture}
\tkzTabInit[lgt=2.6,espcl=2.5]{$x$/1,$x-1$/1,$x+2$/1,$\dfrac{x-1}{x+2}$/1.3}{$-\infty$,$-2$,$1$,$+\infty$}
\tkzTabLine{,,,,,,}
\tkzTabLine{,,,,,,}
\tkzTabLine{,,,,,,}
\end{tikzpicture}}

\textbf{السؤال:} أكمل جدول الإشارة ثم عيّن $D_g$ مجموعة تعريف الدالة $g$.

\rep

\sujet{النهايات}

\textbf{السؤال:} احسب النهايتين التاليتين:
\[ \lim_{x\to 0}\frac{e^{3x}-1}{x} \qquad\text{و}\qquad \lim_{x\to +\infty}\left(x-\ln x\right) \]

\rep

\sujet{الأعداد المركبة}

في المستوي المركب، النقطة $M$ صورة العدد المركب $z$:

\cadre{\begin{tikzpicture}[scale=1.3]
\draw[help lines,gray!40] (-1.5,-1.5) grid (2.5,2.5);
\draw[-{Stealth}] (-1.5,0)--(2.5,0) node[below] {$\Re$};
\draw[-{Stealth}] (0,-1.5)--(0,2.5) node[left] {$\Im$};
\node[below left] at (0,0) {$O$};
\node[below] at (1,0) {$1$}; \node[left] at (0,1) {$1$};
\draw[dashed] (1,0)--(1,1)--(0,1);
\draw[thick,blue,-{Stealth}] (0,0)--(1,1);
\fill[red] (1,1) circle (2pt) node[above right] {$M$};
\end{tikzpicture}}

\textbf{السؤال:} اكتب $z$ على الشكل الأسي، ثم احسب $z^{8}$.

\rep

\sujet{الاحتمالات}

كيس به $3$ كريات حمراء و $2$ بيضاء. نسحب عشوائيًا كريتين على التوالي \textbf{دون إرجاع}.

\cadre{\begin{tikzpicture}[level distance=3.2cm,
  level 1/.style={sibling distance=3.6cm},level 2/.style={sibling distance=1.8cm},
  grow=right,every node/.style={font=\large}]
\node {$\bullet$}
  child {node {$B$}
    child {node {$B$} edge from parent node[below,font=\small] {$\dots$}}
    child {node {$R$} edge from parent node[above,font=\small] {$\dots$}}
    edge from parent node[below,font=\small] {$\frac{2}{5}$}}
  child {node {$R$}
    child {node {$B$} edge from parent node[below,font=\small] {$\dots$}}
    child {node {$R$} edge from parent node[above,font=\small] {$\frac{2}{4}$}}
    edge from parent node[above,font=\small] {$\frac{3}{5}$}};
\end{tikzpicture}}

\textbf{السؤال:} أكمل الشجرة، ثم احسب احتمال الحصول على كريتين من نفس اللون.

\rep

\sujet{الحساب التكاملي}

$(C_f)$ التمثيل البياني لدالة $f$ معرفة ومستمرة على المجال $[0;4]$:

\cadre{\begin{tikzpicture}
\begin{axis}[axis lines=middle,grid=both,width=9cm,height=6.5cm,xmin=-0.5,xmax=4.8,ymin=-0.5,ymax=3,
 xtick={0,...,4},ytick={0,1,2},xlabel=$x$,ylabel=$y$,ticklabel style={font=\small}]
\addplot[fill=orange!25,draw=none] coordinates {(0,0)(2,2)(4,2)(4,0)} -- cycle;
\addplot[blue,very thick] coordinates {(0,0)(2,2)(4,2)};
\node[blue] at (axis cs:3,2.4) {$(C_f)$};
\end{axis}\end{tikzpicture}}

\textbf{السؤال:} احسب التكامل $\displaystyle I=\int_{0}^{4} f(x)\,dx$، ثم القيمة المتوسطة للدالة $f$ على $[0;4]$.

\rep

\sujet{المناقشة البيانية}

لتكن $f$ دالة معرفة على $\mathbb{R}$، جدول تغيراتها:

\cadre{\begin{tikzpicture}
\tkzTabInit[lgt=2,espcl=2.5]{$x$/1,$f'(x)$/1,$f(x)$/2.2}{$-\infty$,$0$,$2$,$+\infty$}
\tkzTabLine{,+,z,-,z,+,}
\tkzTabVar{-/$1$,+/$3$,-/$-1$,+/$+\infty$}
\end{tikzpicture}}

\textbf{السؤال:} عيّن قيم الوسيط الحقيقي $m$ التي من أجلها تقبل المعادلة $f(x)=m$ حلّين متمايزين بالضبط.

\rep

\sujet{مركز التناظر}

$(C_f)$ التمثيل البياني للدالة $f$ المعرفة على $\mathbb{R}-\{1\}$ بـ: $f(x)=\dfrac{2x+1}{x-1}$.

\cadre{\begin{tikzpicture}
\begin{axis}[axis lines=middle,grid=both,width=9.5cm,height=9cm,xmin=-5,xmax=7,ymin=-5,ymax=9,
 xtick={-4,-2,...,6},ytick={-4,-2,...,8},xlabel=$x$,ylabel=$y$,ticklabel style={font=\small}]
\addplot[blue,very thick,domain=-5:0.6,samples=100]{(2*x+1)/(x-1)};
\addplot[blue,very thick,domain=1.4:7,samples=100]{(2*x+1)/(x-1)};
\addplot[red,dashed,thick] coordinates {(1,-5)(1,9)};
\addplot[red,dashed,thick,domain=-5:7]{2};
\node[blue] at (axis cs:5.5,4) {$(C_f)$};
\end{axis}\end{tikzpicture}}

\textbf{السؤال:} عيّن إحداثيي مركز التناظر $\Omega$ للمنحنى $(C_f)$، ثم احسب $f(1+h)+f(1-h)$ حيث $h\neq 0$.

\rep

\sujet{كثير الحدود}

$P(x)=ax^2+bx+c$ كثير حدود حيث $P(0)=6$، وجدول إشارته:

\cadre{\begin{tikzpicture}
\tkzTabInit[lgt=2,espcl=2.5]{$x$/1,$P(x)$/1}{$-\infty$,$-1$,$3$,$+\infty$}
\tkzTabLine{,-,z,+,z,-,}
\end{tikzpicture}}

\textbf{السؤال:} عيّن الأعداد الحقيقية $a$ ، $b$ و $c$.

\rep

\sujet{تركيب الدوال}

لتكن $f$ دالة معرفة على $\mathbb{R}$، جدول تغيراتها:

نعتبر الدالة $g$ المعرفة على $\mathbb{R}$ بـ: $g(x)=e^{f(x)}$.\\[2mm]

\cadre{\begin{tikzpicture}
\tkzTabInit[lgt=2,espcl=3]{$x$/1,$f(x)$/2.2}{$-\infty$,$1$,$+\infty$}
\tkzTabVar{-/$-\infty$,+/$2$,-/$-\infty$}
\end{tikzpicture}}

\textbf{السؤال:} شكّل جدول تغيرات الدالة $g$ مع حساب النهايتين والقيمة الحدية.

\rep

\sujet{المتتاليات التراجعية}

$(u_n)$ متتالية معرفة بـ: $u_0=0$ و $u_{n+1}=f(u_n)$ حيث $f(x)=\frac{1}{2}x+1$. الشكل يمثل $(C_f)$ والمستقيم $(\Delta): y=x$.

\cadre{\begin{tikzpicture}
\begin{axis}[axis lines=middle,grid=both,width=9cm,height=8.5cm,xmin=-0.5,xmax=3.5,ymin=-0.5,ymax=3,
 xtick={0,1,2,3},ytick={1,2},xlabel=$x$,ylabel=$y$,ticklabel style={font=\small}]
\addplot[blue,very thick,domain=-0.5:3.5]{0.5*x+1};
\addplot[black,thick,domain=-0.5:3]{x};
\addplot[red,thick,-{Stealth}] coordinates {(0,0)(0,1)(1,1)(1,1.5)(1.5,1.5)(1.5,1.75)(1.75,1.75)};
\node[blue] at (axis cs:3,2.85) {$(C_f)$};
\node at (axis cs:2.75,2.45) {$(\Delta)$};
\node[below] at (axis cs:0,-0.05) {$u_0$};
\end{axis}\end{tikzpicture}}

\textbf{السؤال:} ضع تخمينًا حول اتجاه تغير $(u_n)$ وتقاربها، ثم بيّن أن $v_n=u_n-2$ متتالية هندسية يطلب تعيين أساسها.

\rep
\newpage
\begin{center}{\LARGE\bfseries الحلول النموذجية (خاصة بلجنة التحكيم)}\end{center}
{\small\renewcommand{\arraystretch}{1.3}
\begin{tabular}{|c|p{15.5cm}|}\hline
\textbf{رقم} & \textbf{الإجابة:}\\\hline
1 & $f(x)=0$: ثلاثة حلول. \quad $f(x)=4$: حل وحيد (في المجال $]2;+\infty[$).\\\hline
2 & $S=[-2;1]\cup\,]3;+\infty[$.\\\hline
3 & $f'(1)=0$ (ذروة القطع المكافئ)، \ $f(x)<0 \iff x\in\,]-1;3[$، \ $b=-2$ و $c=-3$.\\\hline
4 & $f(1)=2$، $f'(1)=3$ (ميل $(T)$)، \ $(T): y=3x-1$.\\\hline
5 & $x=1$ مقارب عمودي، \ $y=2$ مقارب أفقي (بجوار $\pm\infty$).\\\hline
6 & $r=2$، \ $u_{20}=43$، \ $S=\dfrac{21(3+43)}{2}=483$.\\\hline
7 & $q=2$، $v_0=1$، \ $v_{10}=1024$، \ $v_0+\dots+v_9=2^{10}-1=1023$.\\\hline
8 & قيمة حدية واحدة: قيمة صغرى محلية عند $x=-1$ ($f'$ تنعدم وتغير إشارتها). عند $x=2$ تنعدم $f'$ دون تغيير إشارتها فلا توجد قيمة حدية.\\\hline
9 & $f$ متزايدة على $]-\infty;-1]$ وعلى $[1;+\infty[$، ومتناقصة على $[-1;1]$. القيمة العظمى المحلية عند $x=-1$.\\\hline
10 & $X^2-3X+2=0 \Rightarrow X=1$ أو $X=2$، ومنه $S=\{0;\ \ln 2\}$.\\\hline
11 & $\frac{x-1}{x+2}$: موجبة على $]-\infty;-2[$، سالبة على $]-2;1[$، موجبة على $]1;+\infty[$. \ $D_g=]-\infty;-2[\,\cup\,]1;+\infty[$.\\\hline
12 & $\lim_{x\to0}\frac{e^{3x}-1}{x}=3$، \quad $\lim_{x\to+\infty}(x-\ln x)=\lim x\left(1-\frac{\ln x}{x}\right)=+\infty$.\\\hline
13 & $z=1+i=\sqrt2\,e^{i\frac{\pi}{4}}$، \ $z^8=(\sqrt2)^8e^{i2\pi}=16$.\\\hline
14 & فروع الشجرة: بعد $R$: $R$ بـ $\frac24$، $B$ بـ $\frac24$؛ بعد $B$: $R$ بـ $\frac34$، $B$ بـ $\frac14$. \ $P=\frac35\cdot\frac24+\frac25\cdot\frac14=\frac{2}{5}$.\\\hline
15 & $I=2+4=6$ (مساحة مثلث + مستطيل)، \ القيمة المتوسطة $=\frac{6}{4}=\frac32$.\\\hline
16 & $m\in\,]-1;1]\cup\{3\}$.\\\hline
17 & $\Omega(1;2)$، \ $f(1+h)+f(1-h)=4$ \ (لأن $f(x)=2+\frac{3}{x-1}$).\\\hline
18 & $P(x)=a(x+1)(x-3)$ و $P(0)=-3a=6$ ومنه $a=-2$، $b=4$، $c=6$.\\\hline
19 & $g'(x)=f'(x)e^{f(x)}$ لها إشارة $f'$: $g$ متزايدة على $]-\infty;1]$ ومتناقصة على $[1;+\infty[$، \ $g(1)=e^2$، $\lim_{\pm\infty}g=0$.\\\hline
20 & $(u_n)$ متزايدة ومتقاربة نحو $2$. \ $v_{n+1}=\frac12u_n+1-2=\frac12(u_n-2)=\frac12v_n$: هندسية أساسها $\frac12$.\\\hline
\end{tabular}}
\end{document}
