From ee65482fb4229ded5dedd77ebccfecac79c559ff Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:28:32 +0300 Subject: [PATCH 001/124] content: rewrite absolute-value-inequalities for first-time learners in both languages --- .../algebra/absolute-value-inequalities/ar.md | 65 +++++++++--------- .../algebra/absolute-value-inequalities/en.md | 66 +++++++++---------- 2 files changed, 64 insertions(+), 67 deletions(-) diff --git a/content/lessons/algebra/absolute-value-inequalities/ar.md b/content/lessons/algebra/absolute-value-inequalities/ar.md index e99cbe82..8295ca88 100644 --- a/content/lessons/algebra/absolute-value-inequalities/ar.md +++ b/content/lessons/algebra/absolute-value-inequalities/ar.md @@ -1,67 +1,66 @@ --- title: متباينات القيمة المطلقة -summary: >- - كل النقاط التي تبعد عن هدف أقل من حد معين. هذه فكرة إنذار الحمى وحدود التصنيع. +summary: 'أوجد جميع المدخلات التي تبعد عن هدف مسافة أقل من حد تختاره.' parameters: - c: المركز c - r: نصف القطر r - x: x (اسحب لإيجاد الحد الفاصل) + c: 'الهدف c' + r: 'حد المسافة r' + x: 'المدخل المختبر x' variables: - - مركز الفترة المسموح بها - - المسافة المسموح بها من المركز - - نقطة اختبار + - 'الهدف في مركز الفترة' + - 'حد المسافة الصارم' + - 'المدخل الذي نختبره' --- ## Try it -1. اسحب النقطة المسمّاة x يمينًا ويسارًا تحت المنحنى على شكل V. -2. راقب أين ينخفض المنحنى تحت المحور الأفقي. هذا الجزء يمثل كل قيم x التي تبعد عن الهدف مسافة مسموحة. -3. ارفع منزلق «نصف القطر r» وراقب ذلك الجزء المنخفض يتسع من الجانبين معًا. +1. اضبط c على 2 وr على 0.3. قارن x = 2 مع x = 2.2. الناتج المرسوم سالب في الحالتين، لذلك تحققان حد المسافة الصارم. +2. اضبط x على 2.3. الناتج صفر؛ هذه نقطة الحد، ولا تدخل في الحل لأن المتباينة صارمة. +3. ارفع r إلى 1. تتسع الفترة بين c ناقص r وc زائد r، ويبقى مركزها عند 2. ## Real-life examples -1. **تفاوت تصنيع مسمار.** يقبل المصنع المسمار فقط إذا كان طوله ضمن 0.3 مم (نصف القطر r) من علامة مستهدفة عند 2 مم (المركز c). ويرفض المصنع أي مسمار أبعد من ذلك. -2. **فحص الحمى.** يُطلق مقياس حرارة رقمي إنذارًا عندما تبتعد القراءة أكثر من 1 °م (نصف القطر r) عن خط الأساس الصحي عند 0 (المركز c). -3. **السياج الجغرافي لروبوت التوصيل.** يجب أن يبقى روبوت المستودع ضمن 5 وحدات (نصف القطر r) من محطة شحنه عند الموقع -4 (المركز c) على خريطة الأرضية. +1. **حد افتراضي لخطأ القياس.** هدفه 2 مم وخطؤه أقل من 0.3 مم يقبل الأطوال الأكبر من 1.7 والأصغر من 2.3 مم. يستبعد المثال الطرفين. +2. **الانحراف عن مرجع.** عند c = 0 وr = 1، تقع الانحرافات المقبولة بين -1 و1 دون الطرفين. الصفر انحراف مرجعي، وليس قراءة لحرارة الجسم. +3. **موضع على مسار.** عند c = -4 وr = 5، تكون المواضع المسموحة أكبر من -9 وأصغر من 1 على مسار أحادي البعد. ## Test yourself -1. حرّك النقطة x إلى الحافة تمامًا للمنطقة المنخفضة، حيث يلامس المنحنى المحور. -2. اجعل المدى المقبول بعرض 10 وحدات بالضبط، من حافة إلى حافة. -3. حرّك النقطة x إلى موضع يبعد 3 وحدات بالضبط خارج المدى المقبول. +1. ضع x عند أي من الحدين، حيث يكون الناتج المرسوم صفرًا. +2. اجعل عرض الفترة 10. +3. ضع x خارج أي من الحدين بثلاث وحدات، ليكون الناتج المرسوم 3. ## Intuition -يقبل المصنع المسمار فقط إذا كان طوله ضمن 0.3 مم من علامة مستهدفة عند 2 مم. وأي مسمار أبعد من ذلك يُرمى جانبًا. يعرض الرسم هذا الاختبار كمنحنى على شكل V، مرسوم من $|x-c|-r$، ينخفض ويلامس القاع تمامًا عند الهدف. اسحب النقطة x جانبيًا على طول المنحنى: كل مكان ينخفض فيه تحت المحور الأفقي هو طول يقبله المصنع. والنقطتان اللتان يعبر عندهما المنحنى ذلك المحور تحددان حافتي المدى المقبول. +لنفترض أن الطول المطلوب لقطعة هو 2 مم، والخطأ المسموح أقل من 0.3 مم. القياس 2.2 يبتعد عن الهدف بمقدار 0.2، فيُقبل. والقياس 1.6 يبتعد بمقدار 0.4، فيُرفض. نهتم بمقدار الفرق، لا بإشارته. -منزلق «المركز c» يضبط تلك العلامة المستهدفة، ومنزلق «نصف القطر r» يضبط مقدار الانحراف المسموح به. ارفع r فينخفض شكل V أكثر، فيتسع الجزء المقبول تحت المحور من الجانبين معًا. فالتفاوت الأوسع يقبل أطوالًا أكثر دائمًا. حرّك c بدلًا من ذلك فينزلق شكل V كله جانبيًا، الهدف والمدى المقبول معًا، دون أن يتغير اتساع ذلك المدى. +تعطينا القيمة المطلقة هذه المسافة. بعد طرح حد المسافة، يكون الناتج المرسوم سالبًا للمدخل المقبول، وصفرًا عند الحد، وموجبًا خارجه. يحدد الموضع الأفقي لشكل V الهدف، وتؤدي زيادة r إلى خفضه وتوسيع الفترة المقبولة. ## Formal -$|x - c| < r$ (من أجل $r > 0$) تعني أن $x$ تقع ضمن مسافة $r$ من $c$، أي $c - r < x < c + r$. +عندما يكون r موجبًا، تكافئ $|x-c|$ بدلًا من $<$ يعطي المجموعة المكمّلة $x < c-r$ أو $x > c+r$، وهي اتحاد شعاعين لا فترة واحدة، لأن دالة القيمة المطلقة محدّبة ولها حد أدنى واحد. فتكون تحت أي عتبة موجبة على فترة متصلة واحدة، لكنها فوقها على قطعتين منفصلتين. +استبدال «أصغر من» بعبارة «أصغر من أو يساوي» يُدخل الحدين في الحل. متممة شرط الداخل الصارم تشمل الحدين والخارج معًا، فتستخدم مسافة أكبر من الحد أو مساوية له. أما شرط «أكبر من» وحده فيستبعد الحدين أيضًا. ## Derivation -1. المسافة من $c$ إلى $x$ أقل من $r$. -2. تعريف القيمة المطلقة كحد ثنائي الجانب. -3. أضف $c$ إلى الأطراف الثلاثة جميعًا. +1. نعبّر عن البعد عن الهدف بقيمة مطلقة. +2. المسافة الأصغر من r تجعل الفرق ذا الإشارة واقعًا بين سالب r وموجب r دون الطرفين. +3. نضيف c إلى الأجزاء الثلاثة لنحصل على فترة المدخلات المقبولة. ## Real world -### تفاوتات التصنيع -يكون الجزء مقبولًا إذا كان قياسه ضمن مسافة $r$ من الهدف $c$. وهذه بالضبط متباينة قيمة مطلقة. +### التصنيع -### أشرطة الخطأ والثقة -يعرّف قياس «دقيق ضمن حدود $r$» فترة بهذه الطريقة تمامًا. +يحدد سماح القياس هدفًا وخطأ مسموحًا. نتحقق من دخول القيم الحدية في المواصفة أو استبعادها. -### عتبات الإشارة -يبلّغ نظام تحكم عن عطل عندما تنحرف قراءة ما بأكثر من $r$ عن نقطة ضبطها. +### مراقبة الإشارات -### نظام تحديد المواقع والسياج الجغرافي -يعبّر كون شيء «ضمن نطاق» موقع عن شرط قيمة مطلقة (مسافة) في بُعد واحد أو أكثر. +يمكن مقارنة مقدار انحراف إشارة عن مرجع بحد مسموح. + +### حدود الموضع + +على مسار مستقيم، يقيس الفرق المطلق البعد عن نقطة ثابتة. أما المسافة في بعدين فتحتاج إلى صيغة أخرى. diff --git a/content/lessons/algebra/absolute-value-inequalities/en.md b/content/lessons/algebra/absolute-value-inequalities/en.md index 30676bf0..ac2b1778 100644 --- a/content/lessons/algebra/absolute-value-inequalities/en.md +++ b/content/lessons/algebra/absolute-value-inequalities/en.md @@ -1,68 +1,66 @@ --- title: Absolute value inequalities -summary: >- - Find every point within a set distance of a target — the idea behind - manufacturing tolerances, fever alarms, and geofences. +summary: 'Find all inputs whose distance from a target is smaller than a chosen limit.' parameters: - c: center c - r: radius r - x: x (drag to find the boundary) + c: 'target c' + r: 'distance limit r' + x: 'test input x' variables: - - the center of the allowed interval - - the allowed distance from the center - - a test point + - 'target at the centre of the interval' + - 'strict distance limit' + - 'input being tested' --- ## Try it -1. Drag the point labelled x back and forth under the V-shaped curve. -2. Watch where the curve dips below the horizontal axis — that stretch is every x within the allowed distance of the target. -3. Raise the "radius r" slider and watch that dipped stretch widen on both sides at once. +1. Set c to 2 and r to 0.3. Compare x = 2 with x = 2.2. Both have a negative plotted output, so both satisfy the strict distance limit. +2. Set x to 2.3. The output is zero: this is the boundary, excluded by the strict inequality. +3. Increase r to 1. The interval between c minus r and c plus r widens, while its centre stays at 2. ## Real-life examples -1. **Bolt manufacturing tolerance.** A factory accepts a bolt only if its length lands within 0.3 mm (radius r) of a 2 mm target mark (center c). Anything further off gets rejected. -2. **Fever check.** A digital thermometer sounds an alarm when a reading strays more than 1 °C (radius r) from the healthy baseline at 0 (center c). -3. **Delivery robot geofence.** A warehouse robot must stay within 5 units (radius r) of its charging dock at position -4 (center c) on the floor map. +1. **An illustrative size tolerance.** A target of 2 mm and a strict error limit of 0.3 mm accept lengths greater than 1.7 and less than 2.3 mm. This example excludes the endpoints. +2. **Deviation from a reference.** With c = 0 and r = 1, accepted deviations lie strictly between -1 and 1. Zero is the reference deviation, not a body-temperature reading. +3. **Position on a track.** With c = -4 and r = 5, the allowed positions are greater than -9 and less than 1 on a one-dimensional track. ## Test yourself -1. Move the point x onto the exact edge of the dipped region, where the curve touches the axis. -2. Make the accepted range exactly 10 units wide, from edge to edge. -3. Move the point x to a spot exactly 3 units outside the accepted range. +1. Put x on either boundary, where the plotted output is zero. +2. Make the interval width 10. +3. Put x three units beyond either boundary, so the plotted output is 3. ## Intuition -A factory accepts a bolt only if its length lands within 0.3 mm of a 2 mm target mark; anything further off gets thrown out. The picture shows this test as a V-shaped curve, drawn from $|x-c|-r$, that dips down and touches bottom exactly at the target. Drag the point x sideways along the curve: everywhere it sits below the horizontal axis is a length the factory would accept. The two spots where the curve crosses that axis mark the edges of the accepted range. +Suppose a part should measure 2 mm, with an error smaller than 0.3 mm. A measurement of 2.2 is 0.2 away from the target, so it passes. A measurement of 1.6 is 0.4 away, so it fails. We care about the size of the difference, not its sign. -The slider labelled center c sets that target mark, and radius r sets how far off a part may still be. Raise r and the V drops lower, so the accepted stretch below the axis widens on both sides at once — a looser tolerance always lets more lengths through. Move c instead and the whole V slides sideways, target and accepted range together, without changing how wide that range is. +Absolute value gives that distance. Subtracting the permitted distance makes the plotted output negative for an accepted input, zero at a boundary, and positive outside. The V's horizontal position sets the target; lowering the V by increasing r widens the accepted interval. ## Formal -$|x - c| < r$ (for $r > 0$) means $x$ lies within $r$ of $c$: $c - r < x < c + r$. +For r positive, $|x-c|$ instead of $<$ gives the complementary set $x < c-r$ or $x > c+r$ — a union of two rays, not an interval — because the absolute value function is convex with a single minimum, so it is below any positive threshold on one connected interval but above it on two separate pieces. +Replacing the strict inequality with “less than or equal” includes the boundary. The complement of a strict inside condition includes both boundaries and the outside; it is a greater-than-or-equal distance condition. A strict greater-than condition alone excludes the boundaries too. ## Derivation -1. Distance from $c$ to $x$ is less than $r$. -2. Definition of absolute value as a two-sided bound. -3. Add $c$ to all three parts. +1. Express distance from the target as an absolute value. +2. A distance smaller than r places the signed difference strictly between negative r and positive r. +3. Add c to all three parts to obtain the interval of accepted inputs. ## Real world -### Manufacturing tolerances -A part is acceptable if its measurement is within $r$ of the target $c$ — precisely an absolute-value inequality. +### Manufacturing -### Error bars and confidence -A measurement "accurate to within $r$" defines an interval exactly this way. +A tolerance specifies a target and an allowed error. Check whether the specification includes the limiting values. -### Signal thresholds -A control system flags a fault when a reading strays more than $r$ from its setpoint. +### Signal monitoring -### GPS and geofencing -Being "within range" of a location is an absolute-value (distance) condition in one or more dimensions. +A threshold can compare a signal's deviation from a reference against a permitted magnitude. + +### Position limits + +On a straight track, an absolute difference measures distance from a fixed point. Two-dimensional distance requires a different formula. From 8e4d090d27091a8bc5927b78a25825e136a760f1 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:28:32 +0300 Subject: [PATCH 002/124] content: rewrite complex-numbers for first-time learners in both languages --- content/lessons/algebra/complex-numbers/ar.md | 53 +++++++++--------- content/lessons/algebra/complex-numbers/en.md | 54 +++++++++---------- 2 files changed, 52 insertions(+), 55 deletions(-) diff --git a/content/lessons/algebra/complex-numbers/ar.md b/content/lessons/algebra/complex-numbers/ar.md index 801472fe..99df8721 100644 --- a/content/lessons/algebra/complex-numbers/ar.md +++ b/content/lessons/algebra/complex-numbers/ar.md @@ -1,7 +1,6 @@ --- title: 'الأعداد المركّبة: الضرب دوران' -summary: >- - ضرب عددين لهما اتجاه يدوّر النقطة ويغيّر بعدها. هذا ما يستعمله الرادار والألعاب. +summary: 'مثّل العدد المركب بنقطة، وشاهد كيف يديرها الضرب ويغير بعدها عن الأصل.' parameters: a: العدد الأول، الجزء الحقيقي b: العدد الأول، الجزء التخيّلي @@ -12,54 +11,54 @@ variables: [] ## Try it -1. اسحب النقطة الأولى (بالخطوتين a وb) إلى أي مكان على المستوى وراقب تغيّر تسميتها. -2. اجعل النقطة الثانية «c = 0، d = 1»، وهي العدد $i$ الخالص، وراقب النقطة الأولى تدور 90° بالضبط حول المركز. -3. الآن اسحب d إلى ما بعد 1. تستمر النقطة في الدوران وتبتعد أيضًا عن المركز، لأن العدد الثاني الأكبر يكبّر النقطة ويديرها معًا. +1. اضبط a = 3 وb = 4، ليكون z = 3 + 4i. تقع نقطته ثلاث وحدات يمينًا وأربعًا إلى الأعلى. +2. اضبط c = 0 وd = 1، ليكون w = i. الناتج -4 + 3i؛ ربع دورة عكس عقارب الساعة مع بقاء البعد عن الأصل. +3. أبقِ c عند 0 واضبط d على 2. الناتج -8 + 6i. ما زال الدوران ربع دورة، لكن الطول تضاعف. زيادة d هنا لا تواصل زيادة الزاوية. ## Real-life examples -1. **إزاحة الطور في دارة تيار متردد.** تمر إشارة كهربائية قدرها 3+4i فولت (a=3, b=4) بملف حثّي خالص يضربها في i (c=0, d=1). يزيح ذلك طورها 90° بينما تبقى قوتها كما هي. -2. **تدوير شخصية في لعبة.** تقف سفينة فضائية على بعد خطوتين يمينًا وخطوة واحدة أعلى (a=2, b=1) على الشاشة. يدوّر ضرب موضعها في نحو 0.7+0.7i (c=0.7, d=0.7) السفينة 45° دون أن يغيّر حجمها. -3. **كسب صدى الرادار.** تكبر بقعة رادار على بعد خطوة واحدة (a=1, b=0) وتبتعد وتدور 45° حين تضربها إشارة عائدة قدرها 2+2i (c=2, d=2). +1. **الضرب ودوران ربع دورة.** ضرب 3 + 4i في i يعطي -4 + 3i. يعزل هذا المثال الدوران دون تغيير المقدار. +2. **دوران تقريبي بزاوية 45 درجة.** ضرب 2 + i في 0.7 + 0.7i يعطي 0.7 + 2.1i. تزيد الزاوية 45 درجة ويُضرب المقدار في نحو 0.990، فينقص قليلًا. +3. **الدوران والتكبير.** ضرب 1 في 2 + 2i يعطي 2 + 2i. زاويته 45 درجة ومقداره الجذر التربيعي للعدد 8. ## Test yourself -1. اختر a وb وc وd بحيث يقع الناتج تمامًا على المحور الرأسي (التخيّلي)، دون أي جزء حقيقي. -2. اجعل بُعد الناتج عن المركز 10 بالضبط، مهما قسّمته بين النقطتين. -3. جد عددًا ثانيًا يبعد وحدة واحدة بالضبط عن المركز. هذا العدد يدوّر النقاط فقط، ولا يغيّر حجمها أبدًا. +1. اجعل الجزء الحقيقي للناتج صفرًا ليقع على المحور التخيلي، وقد يقع عند الأصل. +2. اجعل بُعد الناتج عن الأصل قريبًا من 10. +3. اجعل مقدار العدد الثاني قريبًا من 1 ليعطي دورانًا دون تغيير الأطوال للمدخلات غير الصفرية. ## Intuition -تخيّل كنزًا يبعد 3 خطوات شرقًا و4 خطوات شمالًا عن شجرة قديمة. هذا الموضع نقطة واحدة على المستوى الذي تراه هنا، وهي النقطة البرتقالية، وتمثّل أيضًا العدد $z = a+bi$، حيث $a=3$ يعدّ الخطوات شرقًا و$b=4$ يعدّ الخطوات شمالًا. الرمز $i$ لا يقيس مسافة، بل يعني «استدر 90° أولًا»، فخطوات $bi$ تسير في ذلك الاتجاه المستدير بدل أن تسير جانبيًا. +يجمع العدد المركب جزءًا حقيقيًا وجزءًا تخيليًا. نمثل 3 + 4i بنقطة تقع ثلاث وحدات يمينًا وأربعًا إلى الأعلى. تخضع الوحدة الجديدة i لقاعدة أن مربعها يساوي -1. إنها عدد له قاعدة ضرب، وليست مسافة فيزيائية. -الآن اجعل النقطة الثانية $c=0, d=1$، أي العدد $i$ نفسه، وراقب النقطة البرتقالية تدور. ضربها فيه يُديرها 90° حول المركز دون أن يقرّبها أو يبعدها عنه. أي نقطة ثانية أخرى تُدير النقطة بزاويتها الخاصة وتُكبّرها أو تُصغّرها بمسافتها الخاصة عن المركز، فالضرب ليس إلا دورانًا مصحوبًا بتحجيم. +نضرب 3 + 4i في i. يعطينا التوزيع 3i زائد 4 مضروبة في مربع i، فيصبح الناتج -4 + 3i. تغير الإحداثيان من (3, 4) إلى (-4, 3)، وهذا دوران ربع دورة. يجمع الضرب في عدد مركب عام غير صفري بين الدوران وتغيير المقدار. ## Formal -المسافة عن نقطة الأصل، $|z| = \sqrt{a^2+b^2}$، تُسمّى المقياس، والزاوية عن المحور الحقيقي الموجب، $\theta = \operatorname{atan2}(b,a)$، تُسمّى الوسيطة. معًا يحدّدان $z$ بدقّة $a$ و$b$ نفسها. +للعددين $z=a+bi$ و$w=c+di$، يكون الناتج $zw=(ac-bd)+(ad+bc)i$، باستخدام $i^2=-1$. -ضرب عددين مركّبين، $zw$، يضرب مقياسيهما ويجمع وسيطتيهما: هندسيًا، دوّر $z$ بزاوية $w$ وكبّره بمسافة $w$ عن نقطة الأصل. +المقدار هو $|z|=\sqrt{a^2+b^2}$. وللعدد z غير الصفري، تكون السعة زاويته من المحور الحقيقي الموجب، مع اعتبار الزوايا التي تختلف بدورة كاملة متكافئة. يضرب الضرب المقادير ويجمع الزوايا. مقدار الصفر صفر، لكن زاويته غير محددة. ## Advanced -كل كثيرة حدود بمعاملات حقيقية أو مركّبة تقع جذورها كلها بين الأعداد المركّبة، وهذه نظرية الجبر الأساسية، ولهذا تكون الأعداد المركّبة، لا الحقيقية وحدها، الموطن الطبيعي للجبر. صيغة أويلر $e^{i\theta} = \cos\theta + i\sin\theta$ تجعل سلوك الدوران في الضرب واضحًا. +صيغة أويلر هي $e^{i\theta}=\cos\theta+i\sin\theta$. تمثل العدد المركب ذي المقدار الواحد بوصفه عامل دوران. وتنص المبرهنة الأساسية في الجبر على وجود جذر مركب لكل كثير حدود مركب غير ثابت، وإمكان تحليله كاملًا في الأعداد المركبة مع احتساب تكرار الجذور. ## Derivation -1. اكتب كل عدد بجزأيه الحقيقي والتخيّلي. -2. اضرب الحدّين ضربًا حدًّا بحدّ. -3. استبدل $i^2$ بـ$-1$ واجمع الأجزاء الحقيقية والتخيّلية. +1. نكتب كل عدد جزءًا حقيقيًا مضافًا إليه i مضروبة في الجزء التخيلي. +2. نضرب حدًا في حد باستخدام خاصية التوزيع. +3. نستبدل مربع i بالقيمة -1، ثم نجمع الحدود الحقيقية والتخيلية. ## Real world -### الهندسة الكهربائية -يتابع المهندسون الشدّة والجهد المتردّدين كأعداد مركّبة (الفازورات)، فتتجمّع المقاومة والسعة والحث بضرب مركّب عادي. +### دوران المستوى -### معالجة الإشارات -يكشف تحويل فورييه الترددات المختبئة في صوت أو صورة، ويعتمد بناؤه كليًا على أسس مركّبة. +ضرب أزواج الإحداثيات الممثلة بأعداد مركبة يديرها حول الأصل. يحافظ العامل ذو المقدار الواحد على الأطوال. -### أنظمة التحكم -يتحقّق المهندس من استقرار نظام تغذية راجعة بمقارنة موضع أعداد مركّبة معيّنة بدائرة الوحدة. +### الإشارات -### ميكانيكا الكم -تصف الأعداد المركّبة حالة نظام كمّي، وتعطي مربّعات مقاييسها احتمالات قابلة للقياس. +يمكن للتمثيل المركب تسجيل سعة موجة جيبية وطورها معًا. + +### الجبر + +تتيح الأعداد المركبة حل معادلات مثل مربع x زائد 1 يساوي صفرًا، خارج خط الأعداد الحقيقية. diff --git a/content/lessons/algebra/complex-numbers/en.md b/content/lessons/algebra/complex-numbers/en.md index f35b61c3..6cd5bce8 100644 --- a/content/lessons/algebra/complex-numbers/en.md +++ b/content/lessons/algebra/complex-numbers/en.md @@ -1,8 +1,6 @@ --- title: 'Complex numbers: multiplying as a spin' -summary: >- - See why multiplying two numbers that each carry a direction spins and - resizes a point — the trick behind radio signals, radar, and game graphics. +summary: 'Represent a complex number as a point and see how multiplication rotates and scales it.' parameters: a: first number, real part b: first number, imaginary part @@ -13,54 +11,54 @@ variables: [] ## Try it -1. Drag the first point (steps a and b) anywhere on the plane and watch its label update. -2. Set the second point to "c = 0, d = 1" — pure $i$ — and watch the first point spin exactly 90° around the center. -3. Now drag "d" past 1. The point keeps spinning and also moves farther from the center, because a bigger second number scales as well as rotates. +1. Set a = 3 and b = 4, giving z = 3 + 4i. Its point is three units right and four up. +2. Set c = 0 and d = 1, giving w = i. The product is -4 + 3i: a quarter turn counterclockwise, with the same distance from the origin. +3. Keep c at 0 and set d to 2. The product is -8 + 6i. The rotation is still a quarter turn, but the length has doubled; increasing d here does not keep increasing the angle. ## Real-life examples -1. **AC circuit phase shift.** An electrical signal at 3+4i volts (a=3, b=4) passes through a pure inductor, which multiplies it by i (c=0, d=1): the signal's phase shifts 90° while its strength stays the same. -2. **Rotating a game sprite.** A spaceship sits 2 steps right and 1 step up (a=2, b=1) on screen. Multiplying its position by about 0.7+0.7i (c=0.7, d=0.7) spins it 45° without changing its size. -3. **Radar echo gain.** A radar blip 1 step out (a=1, b=0) is amplified and phase-shifted by a return signal of 2+2i (c=2, d=2), landing it farther out and rotated 45°. +1. **Quarter-turn multiplication.** Multiplying 3 + 4i by i gives -4 + 3i. This isolates rotation without a change in magnitude. +2. **Approximate 45-degree rotation.** Multiplying 2 + i by 0.7 + 0.7i gives 0.7 + 2.1i. The angle increases by 45 degrees and the magnitude is multiplied by about 0.990, so it shrinks slightly. +3. **Rotation and enlargement.** Multiplying 1 by 2 + 2i gives 2 + 2i. The angle is 45 degrees and the magnitude is the square root of 8. ## Test yourself -1. Choose a, b, c and d so the product lands exactly on the vertical (imaginary) axis, with no real part at all. -2. Make the product's distance from the center exactly 10, however you split it between the two points. -3. Find a second number exactly 1 unit from the center — it will only rotate points, never resize them. +1. Make the product's real part zero so it lies on the imaginary axis, possibly at the origin. +2. Make the product's distance from the origin approximately 10. +3. Make the second number's magnitude approximately 1 to obtain a pure rotation for nonzero inputs. ## Intuition -Imagine a treasure marked 3 steps east and 4 steps north of an old tree. That spot is a single point on the plane you see here — the orange dot — and it doubles as the number $z = a+bi$, where $a=3$ counts steps east and $b=4$ counts steps north. The letter $i$ does not measure a distance; it means "turn 90° first," so $bi$ steps go in that turned direction instead of sideways. +A complex number combines a real part and an imaginary part. Write 3 + 4i as a point three units right and four units up. The new unit i obeys the rule that its square is -1. It is a number with a multiplication rule, not a physical distance. -Now set the second point to $c=0, d=1$ — the number $i$ itself — and watch the orange dot spin: multiplying by it turns the dot 90° around the center without moving it closer or farther away. Any other second point both spins the dot by its own angle and stretches or shrinks it by its own distance from the center — multiplication is a spin plus a resize, nothing more. +Multiply 3 + 4i by i. Distributing gives 3i + 4i squared, which becomes -4 + 3i. The coordinates have changed from (3, 4) to (-4, 3), a quarter-turn rotation. Multiplication by a general nonzero complex number combines a rotation with scaling. ## Formal -The distance from the origin, $|z| = \sqrt{a^2+b^2}$, is called the modulus, and the angle from the positive real axis, $\theta = \operatorname{atan2}(b,a)$, is the argument. Together they locate $z$ exactly as well as $a$ and $b$ do. +For $z=a+bi$ and $w=c+di$, the product is $zw=(ac-bd)+(ad+bc)i$, using $i^2=-1$. -Multiplying two complex numbers, $zw$, multiplies their moduli and adds their arguments: geometrically, rotate $z$ by $w$'s angle and scale it by $w$'s distance from the origin. +The modulus is $|z|=\sqrt{a^2+b^2}$. For nonzero z, its argument is its angle from the positive real axis, measured modulo a full turn. Multiplication multiplies moduli and adds arguments. Zero has modulus zero but no defined argument. ## Advanced -Every polynomial with real or complex coefficients has all of its roots as complex numbers, the fundamental theorem of algebra; this is why complex numbers, not just real ones, are the natural home for algebra. Euler's formula $e^{i\theta} = \cos\theta + i\sin\theta$ makes the rotation behaviour of multiplication transparent. +Euler's formula is $e^{i\theta}=\cos\theta+i\sin\theta$. It expresses a unit complex number as a rotation factor. The fundamental theorem of algebra states that every nonconstant complex polynomial has a complex root, and factors completely over the complex numbers with multiplicities counted. ## Derivation -1. Write each number in terms of its real and imaginary parts. -2. Multiply the two binomials term by term. -3. Replace $i^2$ with $-1$ and collect the real and imaginary parts. +1. Write both numbers as their real part plus i times their imaginary part. +2. Multiply term by term using the distributive law. +3. Replace i squared by -1, then collect the real and imaginary terms. ## Real world -### Electrical engineering -Alternating current and voltage are tracked as complex numbers (phasors), so resistance, capacitance and inductance combine by ordinary complex multiplication. +### Plane rotations -### Signal processing -The Fourier transform, which finds the frequencies hiding in a sound or image, is built entirely out of complex exponentials. +Multiplying coordinate pairs represented as complex numbers rotates them about the origin. A unit-modulus multiplier preserves lengths. -### Control systems -An engineer checks whether a feedback system is stable by looking at where certain complex numbers land relative to the unit circle. +### Signals -### Quantum mechanics -The state of a quantum system is described by complex numbers whose squared moduli give measurable probabilities. +Complex representations can keep track of a sinusoid's amplitude and phase together. + +### Algebra + +Complex numbers allow equations such as x squared plus 1 equals zero to have solutions beyond the real line. From 8513df380aca9ceb2071aa65f48ad6c859a8e947 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:28:32 +0300 Subject: [PATCH 003/124] content: rewrite determinant for first-time learners in both languages --- content/lessons/algebra/determinant/ar.md | 53 +++++++++++----------- content/lessons/algebra/determinant/en.md | 55 +++++++++++------------ 2 files changed, 52 insertions(+), 56 deletions(-) diff --git a/content/lessons/algebra/determinant/ar.md b/content/lessons/algebra/determinant/ar.md index a027ff3c..6db7ee8e 100644 --- a/content/lessons/algebra/determinant/ar.md +++ b/content/lessons/algebra/determinant/ar.md @@ -1,7 +1,6 @@ --- title: المحدّد -summary: >- - رقم واحد يخبرك هل يكبّر التحويل الشكل أم يصغّره أم يقلبه كالمرآة. +summary: 'استخدم المحدد لقياس تغير المساحة وانعكاس الاتجاه وفقدان أحد الأبعاد.' parameters: a: المصفوفة، الصف 1 والعمود 1 b: المصفوفة، الصف 1 والعمود 2 @@ -19,54 +18,54 @@ variables: ## Try it -1. اسحب a وb وc وd واحدًا تلو الآخر وراقب المربع الصغير في زاوية الشبكة يتحوّل إلى متوازي أضلاع. -2. راقب الرقم تحت الشبكة، وهو المحدّد، يكبر أو يصغر مع تغيّر مساحة متوازي الأضلاع. -3. ادفع إحدى القيم بعيدًا حتى ينقلب متوازي الأضلاع. لاحظ أن إشارة المحدّد تنقلب معه. +1. اضبط a = 2 وb = 0 وc = 0 وd = 1. مساحة مربع الوحدة بعد التحويل 2، وهي قيمة المحدد. +2. غيّر a إلى -2. تبقى المساحة 2، لكن المحدد يصبح -2 بسبب انعكاس الاتجاه. +3. اضبط a على 0 مع b = c = 0 وd = 1. ينضغط المربع إلى قطعة رأسية، ويصبح المحدد صفرًا. ## Real-life examples -1. **تكبير صورة.** تمديد صورة إلى ضعف عرضها مع إبقاء ارتفاعها كما هو (a=2, b=0, c=0, d=1) يضاعف مساحتها، فيقرأ المحدّد 2. -2. **إمالة نص إلى الخط المائل.** تحويل قص (a=1, b=0.5, c=0, d=1) يميل الحروف جانبيًا دون أن يغيّر مقدار الحبر الذي تغطيه، فيبقى المحدّد 1. -3. **عكس صورة كالمرآة.** قلب صورة من اليمين إلى اليسار (a=-1, b=0, c=0, d=1) يبقي كل مساحة بحجمها نفسه لكنه يعكس اتجاهها، فيصبح المحدّد -1. +1. **تمديد العرض.** عند a = 2 وd = 1 وb = c = 0، تتضاعف جميع المساحات ويُحفظ الاتجاه. +2. **القص الهندسي.** عند a = d = 1 وb = 0.5 وc = 0، يصبح المربع متوازي أضلاع بالمساحة نفسها. المحدد 1. +3. **الانعكاس الأفقي.** عند a = -1 وd = 1 وb = c = 0، تبقى المساحات كما هي وينعكس الاتجاه. المحدد -1. ## Test yourself -1. اجعل التحويل يضاعف كل مساحة على الشبكة دون أن يقلب شيئًا. -2. اجعل التحويل يضغط الشبكة كلها على خط واحد، بحيث لا تبقى أي مساحة. -3. اجعل التحويل يقلب الشبكة كالمرآة بينما تصغر كل مساحة إلى النصف بالضبط. +1. اجعل المحدد قريبًا من 2 لمضاعفة المساحات مع حفظ الاتجاه. +2. اجعل المحدد صفرًا ليضغط التحويل المستوى إلى خط، أو ربما نقطة. +3. اجعل المحدد قريبًا من -0.5 لعكس الاتجاه وتقليل المساحات إلى النصف. ## Intuition -مدّد صورة إلى ضعف عرضها مع إبقاء ارتفاعها كما هو، فتتضاعف مساحتها أيضًا. اسحب المنزلق a إلى 2 وأبقِ b وc وd كما هي. راقب المربع الصغير في زاوية الشبكة يتحوّل إلى مستطيل ضعف حجمه، ويقرأ الرقم تحت الشبكة، وهو المحدّد، القيمة 2 ليطابقه. +مساحة مربع عرضه وحدة وارتفاعه وحدة تساوي 1. إذا مددنا عرضه إلى 2 وأبقينا ارتفاعه 1، تصبح مساحته 2. يسجل المحدد معامل تغير المساحة في التحويل الخطي. -الآن ادفع a إلى ما دون الصفر، لتصبح مثلًا -1. ينقلب المربع الصغير كصورة في مرآة، وتنقلب إشارة المحدّد أيضًا من موجبة إلى سالبة، رغم أن حجمه يتغيّر قليلًا فقط. هذه الإشارة هي كل القصة. فالموجب يعني أن الشكل ما زال يواجه الاتجاه نفسه، والسالب يعني أنه انقلب من الداخل إلى الخارج. ويساوي هذا الرقم دائمًا $ad-bc$، مقروءًا مباشرة من منزلقات الشبكة الأربعة. +تسجل الإشارة معلومة أخرى. قد يحافظ الانعكاس على المساحة مع تبديل الترتيب مع عقارب الساعة وعكسها، فيكون المحدد سالبًا. أما المحدد الصفري فيعني أن مربع الوحدة فقد مساحته بعد التحويل. اندمجت مدخلات مختلفة في ناتج واحد، فلا يمكن استرجاع الأصل بصورة وحيدة. ## Formal -لمصفوفة $2\times2$ يكون المحدّد $\det(M) = ad - bc$. قيمته المطلقة $|\det(M)|$ هي المعامل الذي تُكبَّر به أي مساحة، وإشارته تخبرك هل حُفظ الاتجاه أم لا. +للمصفوفة ذات الصفين (a, b) و(c, d)، يكون $\det(M)=ad-bc$. معامل تغير المساحة هو $|\det(M)|$. يحفظ المحدد الموجب الاتجاه، ويعكسه السالب. -حين يكون $\det(M) = 0$ يقع عمودا المصفوفة على الخط نفسه، فتضغط المصفوفة المستوى كله على ذلك الخط. لا يمكن لأي تحويل عكسي أن يتراجع عن هذا، لأن المساحة، والمعلومة معها، ضاعت. +المحدد الصفري يجعل العمودين تابعين خطيًا. تكون صورة المستوى خطًا، أو نقطة واحدة إذا كانت المصفوفة صفرية. تكون المصفوفة قابلة للعكس إذا وفقط إذا كان محددها غير صفر. ## Advanced -في فضاء ذي $n$ بعدًا يساوي المحدّد الحجم الموقَّع لمتوازي السطوح الذي تمدّه أعمدة المصفوفة، ويكون $\det(M) \ne 0$ هو الشرط بالضبط لأن تكون $M$ قابلة للعكس. ويساوي المحدّد أيضًا حاصل ضرب القيم الذاتية، فيربط تمدّد المساحة بالتمدّد على طول الاتجاهات الذاتية. +لا يصف المحدد كل تغير في الشكل. فقد تمدد مصفوفة محددها 1 اتجاهًا وتضغط آخر، فتحفظ المساحة مع تغيير الأطوال. في الأبعاد الأعلى، تمثل القيمة المطلقة للمحدد معامل تغير الحجم الموافق. ## Derivation -1. وسّع محدّد $2\times2$ من العمودين. -2. قيمته المطلقة معامل تمدّد المساحة لأي منطقة. -3. حين يساوي صفرًا يكون العمودان متوازيين ولا عكس للتحويل. +1. نحسب ad ناقص bc من عناصر المصفوفة الأربعة. +2. نأخذ القيمة المطلقة للحصول على معامل المساحة غير السالب. +3. عند الصفر، تصبح مساحة صورة مربع الوحدة صفرًا، ولا يمكن عكس التحويل بصورة وحيدة. ## Real world -### الرسوميات الحاسوبية -يفحص محرّك التصيير إشارة محدّد المثلث ليقرّر هل يواجه الكاميرا أم يبتعد عنها. +### تغير المساحة -### حلّ الأنظمة الخطية -يملك نظام معادلات حلًّا وحيدًا بالضبط حين يكون محدّد مصفوفة معاملاته غير صفري. +يحوّل المحدد المساحات عند استخدام تحويل إحداثي خطي ثابت. -### الروبوتات -حين يقارب محدّد مصفوفة ياكوبي لذراع روبوت الصفر، يعني ذلك وضعًا شاذًا تفقد فيه الذراع درجة حرية. +### الأنظمة الخطية -### نماذج الكائنات الحية -حين يقارب محدّد نظام أنواع متفاعلة الصفر، يشير ذلك إلى أن المجموعات توشك أن تنهار إلى مسار واحد. +تعطي مصفوفة معاملات مربعة حلًا وحيدًا لكل طرف أيمن إذا وفقط إذا كان محددها غير صفر. + +### فحص التحويلات + +يكشف المحدد الصفري فقدان بُعد. أما المحدد الصغير وحده فلا يصف جميع جوانب الحساسية العددية؛ فمقياس القيم مهم أيضًا. diff --git a/content/lessons/algebra/determinant/en.md b/content/lessons/algebra/determinant/en.md index 3ee6662f..e000bcf6 100644 --- a/content/lessons/algebra/determinant/en.md +++ b/content/lessons/algebra/determinant/en.md @@ -1,9 +1,6 @@ --- title: The determinant -summary: >- - Know instantly whether a transformation shrinks, grows, or mirror-flips a - shape — the single number behind image scaling, 3-D rendering, and spotting - when a robot arm gets stuck. +summary: 'Use the determinant to measure area scaling, orientation reversal and loss of dimension.' parameters: a: matrix row 1, column 1 b: matrix row 1, column 2 @@ -21,54 +18,54 @@ variables: ## Try it -1. Drag a, b, c and d one at a time and watch the small square in the corner turn into a parallelogram. -2. Watch the number below the grid — the determinant — grow or shrink as the parallelogram's area changes. -3. Push a value far enough that the parallelogram flips over. Notice the determinant's sign flips too. +1. Set a = 2, b = 0, c = 0 and d = 1. The transformed unit square has area 2, matching the determinant. +2. Change a to -2. The area is still 2, but the determinant is -2 because orientation reverses. +3. Set a to 0, keeping b = c = 0 and d = 1. The square collapses to a vertical segment and the determinant is zero. ## Real-life examples -1. **Resizing a photo.** Stretching an image to twice its width while keeping its height the same (a=2, b=0, c=0, d=1) doubles its area — the determinant reads 2. -2. **Slanting text into italics.** A shear transform (a=1, b=0.5, c=0, d=1) tilts letters sideways without changing how much ink they cover — the determinant stays 1. -3. **Mirroring a photo.** Flipping an image left-to-right (a=-1, b=0, c=0, d=1) keeps every area the same size but reverses its orientation — the determinant turns to -1. +1. **Stretching width.** With a = 2, d = 1 and b = c = 0, every area doubles and orientation is preserved. +2. **Shearing.** With a = d = 1, b = 0.5 and c = 0, the square becomes a parallelogram of the same area. The determinant is 1. +3. **Reflecting horizontally.** With a = -1, d = 1 and b = c = 0, areas are unchanged and orientation reverses. The determinant is -1. ## Test yourself -1. Make the transformation double every area on the grid without flipping anything. -2. Make the transformation collapse the whole grid onto a single line, with zero area left. -3. Make the transformation flip the grid like a mirror while shrinking every area to exactly half. +1. Make the determinant approximately 2, doubling areas while preserving orientation. +2. Make the determinant zero, collapsing the plane to a line or possibly a point. +3. Make the determinant approximately -0.5, reversing orientation and halving areas. ## Intuition -Stretch a photo to twice its width but keep its height the same, and the area doubles too. Drag the slider a to 2 while leaving b, c and d alone: watch the small square in the corner of the grid turn into a rectangle twice its size, and the number below the grid — the determinant — read 2 to match. +A square one unit wide and one unit tall has area 1. Stretch its width to 2 while keeping its height at 1, and its area becomes 2. The determinant records that area multiplier for a linear transformation. -Now push a past zero to a negative number, say -1: the little square flips over like a mirror image, and the determinant's sign flips too, from positive to negative, even though its size barely changes. That sign is the whole story — positive means the shape still faces the same way, negative means it has been turned inside out. This number always equals $ad-bc$, read straight off the grid's four sliders. +The sign records a different feature. A reflection can keep the area unchanged while reversing clockwise and counterclockwise order. Its determinant is negative. A zero determinant means the unit square has no area after transformation: different inputs have been collapsed together, so the original cannot be uniquely recovered. ## Formal -For a $2\times2$ matrix, the determinant is $\det(M) = ad - bc$. Its absolute value $|\det(M)|$ is the factor by which the matrix scales any area; its sign tells you whether orientation is preserved. +For the matrix with rows (a, b) and (c, d), $\det(M)=ad-bc$. The area scale factor is $|\det(M)|$. A positive determinant preserves orientation, and a negative one reverses it. -When $\det(M) = 0$, the two columns point along the same line, so the matrix squashes the whole plane onto that line. No inverse transformation can undo that, because area, and information, has been lost. +A zero determinant makes the columns linearly dependent. The image of the plane is a line, or a single point if the matrix is zero. The matrix is invertible exactly when its determinant is nonzero. ## Advanced -In $n$ dimensions the determinant is the signed volume of the parallelepiped spanned by the matrix's columns, and $\det(M) \ne 0$ is exactly the condition for $M$ to be invertible. It also equals the product of the eigenvalues, linking area scaling to stretching along the eigen-directions. +A determinant does not describe every change in shape. A matrix with determinant 1 can stretch one direction and compress another, preserving area while changing lengths. In higher dimensions, the absolute determinant is the corresponding volume scale factor. ## Derivation -1. Expand the $2\times2$ determinant from the two columns. -2. Its absolute value is the area-scale factor for any region. -3. When it is zero the columns are parallel and the map has no inverse. +1. Calculate ad minus bc from the four entries. +2. Take the absolute value to obtain the nonnegative area multiplier. +3. At zero, the transformed unit square has zero area and the transformation cannot be inverted uniquely. ## Real world -### Computer graphics -A rendering engine checks the sign of a triangle's determinant to decide whether it faces the camera or away from it. +### Area changes -### Solving linear systems -A system of equations has a unique solution exactly when its coefficient matrix has a nonzero determinant. +The determinant converts areas under a constant linear coordinate transformation. -### Robotics -A near-zero determinant of a robot's Jacobian marks a singular pose where the arm loses a degree of freedom. +### Linear systems -### Population models -A near-zero determinant in a system of interacting species signals that the populations are about to collapse onto a single trajectory. +A square coefficient matrix gives a unique solution for every right-hand side exactly when its determinant is nonzero. + +### Checking transformations + +A zero determinant identifies a loss of dimension. A small determinant alone does not describe every aspect of numerical sensitivity; scaling matters too. From fd3e710a71688e91e6f87d7e8c3078cd850ba4e7 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:28:32 +0300 Subject: [PATCH 004/124] content: rewrite eigenvectors for first-time learners in both languages --- content/lessons/algebra/eigenvectors/ar.md | 54 ++++++++++----------- content/lessons/algebra/eigenvectors/en.md | 55 ++++++++++------------ 2 files changed, 52 insertions(+), 57 deletions(-) diff --git a/content/lessons/algebra/eigenvectors/ar.md b/content/lessons/algebra/eigenvectors/ar.md index 3f05faab..0e2028b7 100644 --- a/content/lessons/algebra/eigenvectors/ar.md +++ b/content/lessons/algebra/eigenvectors/ar.md @@ -1,8 +1,6 @@ --- title: 'المتجهات الذاتية والقيم الذاتية' -summary: >- - اتجاهات قليلة خاصة لا يفعل فيها التحويل سوى المدّ، بلا أي دوران. بها يتنبأ المهندسون - بالاهتزازات وتُرتَّب صفحات الويب. +summary: 'أوجد المتجهات غير الصفرية التي تضربها المصفوفة في عدد على خطها نفسه، واقرأ معاملات الضرب المقابلة.' parameters: a: المصفوفة، الصف 1 والعمود 1 b: المصفوفة، الصف 1 والعمود 2 @@ -17,54 +15,54 @@ variables: ## Try it -1. اسحب رأس السهم (vx وvy) حول الشبكة وراقب اتجاهه ينحني مع تأثير المصفوفة فيه. -2. لاحظ الخطّين المتقطّعين. ضع السهم على أحدهما بالضبط وراقبه يبقى على الخط نفسه، ولا يتغيّر سوى طوله. -3. اقرأ رقمي القيمة الذاتية بجانب الخطّين المتقطّعين. يُظهران بالضبط مقدار تمدّد أسهم كل خط. +1. اضبط a = 2 وb = 1 وc = 1 وd = 2. عند vx = vy = 1، يصبح المدخل (1, 1) هو (3, 3). يبقى خطه ثابتًا ويتضاعف طوله ثلاث مرات. +2. اضبط vx = 1 وvy = -1. الناتج (1, -1) دون تغيير. هذا متجه ذاتي آخر، معامل ضربه 1. +3. اضبط a = 0 وb = -1 وc = 1 وd = 0. لا يملك دوران ربع دورة متجهًا ذاتيًا حقيقيًا، فتختفي خطوط الاتجاهات الذاتية الحقيقية من العرض. ## Real-life examples -1. **كتلتان مربوطتان بنوابض.** لكتلتين مربوطتين بنابض بينهما ونابض لكل منهما بالحائط (المصفوفة a=2, b=1, c=1, d=2) نمطا اهتزاز نظيفان، هما التأرجح معًا بتمدد 3 أمثال، أو التأرجح بعكس بعضهما بتمدد مثل واحد فقط. -2. **نمو باتجاه واحد.** تغذّي مجموعة سكانية مجموعة ثانية دون أن تعود إليها أبدًا (a=3, b=1, c=0, d=1)، فتنمو المجموعتان بشكل نظيف على اتجاهين بمعدلي 3 و1. -3. **دوران قمر صناعي خالص.** يدوّر نظام دفع القمر الصناعي 90° فقط (a=0, b=-1, c=1, d=0). ليس لهذا التحويل أي اتجاه ذاتي حقيقي، ولا يبقى شيء على خطه لأن كل اتجاه يدور. +1. **اتجاهان محفوظان.** المصفوفة ذات الصفين (2, 1) و(1, 2) تضرب (1, 1) في 3، و(1, -1) في 1. هذه معاملات للتحويل، وليست ترددات اهتزاز. +2. **مصفوفة مثلثية.** للمصفوفة ذات الصفين (3, 1) و(0, 1) قيمتان ذاتيتان هما 3 و1. يقابلهما المتجهان (1, 0) و(1, -2). +3. **دوران ربع دورة.** المصفوفة ذات الصفين (0, -1) و(1, 0) تنقل كل متجه حقيقي غير صفري خارج خطه الأصلي. قيمتاها الذاتيتان مركبتان. ## Test yourself -1. جد مصفوفة وسهمًا (غير السهم الصفري) يبقى على خطه بعد التحويل. -2. اجعل المصفوفة دورانًا خالصًا، بحيث لا يبقى أي اتجاه حقيقي، إلا السهم الصفري، على خطه. -3. اجعل إحدى القيمتين الذاتيتين صفرًا بالضبط، بحيث تضغط المصفوفة اتجاهًا كاملًا حتى يختفي. +1. اختر متجه مدخل طوله أكبر من 1، وتقع صورته على خطه نفسه ضمن سماح الاختبار. +2. اجعل مربع الفرق بين a وd، مضافًا إليه 4bc، سالبًا حتى لا توجد قيم ذاتية حقيقية. دوران ربع دورة أحد الأمثلة. +3. اجعل المحدد صفرًا للحصول على قيمة ذاتية صفرية واحدة على الأقل. ## Intuition -تخيّل كتلتين مربوطتين بنوابض، كل واحدة بالأخرى وبالحائط على جانبها. ادفعهما بطريقة عشوائية فتهتزّان بمزيج متشابك من الحركات. لكن دفعتين نظيفتين مختلفتان: إمّا أن تدفع الكتلتين بالمقدار نفسه في الاتجاه نفسه، أو تدفعهما بالمقدار نفسه في اتجاهين متعاكسين، وحينها تستمر كل كتلة في الحركة نفسها، وكل ما يتغير هو مقدار الكبر أو الصغر. على الشبكة هنا، هاتان الدفعتان النظيفتان هما الخطّان المتقطّعان، والسهم هو الدفعة التي تختبرها. اسحب رأسه، الذي يحدده vx وvy، وراقب هل يبقى على خط متقطّع أم ينحرف عنه. +تغير المصفوفة عادة طول السهم واتجاهه. لكن بعض الأسهم لها خاصية مميزة؛ تقع الصورة على الخط نفسه الذي يقع عليه الأصل. يسمى السهم غير الصفري الذي تحقق صورته مضاعفًا عدديًا له متجهًا ذاتيًا. -اسحب السهم بعيدًا عن خط متقطّع فتُميله المصفوفة جانبيًا وهي تؤثّر فيه. فاتجاه المتجه يتغيّر عادة. أنزل السهم بالضبط على خط متقطّع بدلًا من ذلك، فلا تفعل المصفوفة سوى تمديده أو تقليصه على الخط نفسه، دون أن تحنيه أبدًا. والرقمان الظاهران باسم القيمتين الذاتيتين، رقم لكل خط، يخبرانك بمقدار ذلك التمدّد. والقيمة الذاتية السالبة تعني أن السهم ينقلب ليشير إلى الخلف على خطه نفسه بدلًا من التمدّد إلى الأمام. +يسمى معامل الضرب القيمة الذاتية. القيمة 3 تجعل الطول ثلاثة أمثاله، و1 تترك السهم كما هو، و-1 تعكسه دون تغيير طوله. أما الصفر فيضغطه إلى الأصل. نستبعد المتجه الصفري نفسه من التعريف، لأن كل مصفوفة ترسله إلى الصفر، فلا يحدد اتجاهًا مميزًا. ## Formal -المتجه غير الصفري $\mathbf{v}$ متجه ذاتي للمصفوفة $M$ بقيمة ذاتية $\lambda$ حين يتحقّق $M\mathbf{v} = \lambda\mathbf{v}$: أي أن تأثير المصفوفة يعادل ببساطة ضربه في العدد $\lambda$. +يكون المتجه غير الصفري $\mathbf{v}$ متجهًا ذاتيًا للمصفوفة M بقيمة ذاتية $\lambda$ إذا حقق $M\mathbf{v}=\lambda\mathbf{v}$. تعكس القيمة السالبة السهم على خطه، وتضغطه القيمة صفر إلى الأصل. -إعادة الترتيب تعطي $(M - \lambda I)\mathbf{v} = 0$، ولا يكون لهذا حلّ غير صفري إلا حين لا تكون المصفوفة $M - \lambda I$ قابلة للعكس، أي حين $\det(M - \lambda I) = 0$. +بإعادة الترتيب نحصل على $(M-\lambda I)\mathbf{v}=0$، حيث I مصفوفة الوحدة. يوجد حل غير صفري إذا وفقط إذا تحققت $\det(M-\lambda I)=0$. نحل هذه المعادلة للقيم الذاتية، ثم نجد المتجهات غير الصفرية المقابلة. ## Advanced -المصفوفة التي تدوّر المستوى، كدوران بزاوية 90°، ليس لها متجهات ذاتية حقيقية على الإطلاق: فكل اتجاه يدور، فتكون جذور المعادلة المميّزة أعدادًا مركّبة. وحيث توجد متجهات ذاتية حقيقية، يحوّل التعبير عن $M$ في أساسها الذاتي قوى المصفوفة $M^k$ إلى مجرّد رفع كل $\lambda$ إلى الأس $k$، وهذا أساس تطبيقات لا تُحصى. +قد تملك المصفوفة الحقيقية اتجاهين ذاتيين مستقلين، أو اتجاهًا واحدًا، أو لا تملك أيًا منها، أو تملك عددًا غير منتهٍ. تجعل مصفوفة الوحدة كل متجه غير صفري ذاتيًا، رغم أن الرسم يعرض خطوطًا ممثلة فقط. لا يمكن استخدام أساس ذاتي إلا عند وجود عدد كافٍ من المتجهات الذاتية المستقلة؛ وجود قيم حقيقية وحده لا يكفي. ## Derivation -1. اكتب معنى "تمدّد فقط دون دوران" على صورة معادلة. -2. انقل كل شيء إلى جهة واحدة لتحصل على نظام متجانس. -3. لهذا النظام حلّ غير صفري فقط حيث يتلاشى هذا المحدّد. +1. نكتب أن تطبيق المصفوفة يعطي مضاعفًا عدديًا للمتجه الأصلي غير الصفري. +2. ننقل المضاعف إلى اليسار باستخدام مصفوفة الوحدة. +3. نشترط أن تكون مصفوفة المعاملات منفردة، حتى يسمح النظام المتجانس بحل غير صفري. ## Real world -### تحليل الاهتزازات -تمثّل المتجهات الذاتية لمصفوفة صلابة جسر أو مبنى أنماط اهتزازه الطبيعية، وتعطي القيم الذاتية الترددات الرنينية. +### تكرار التحويلات -### ترتيب نتائج البحث -تعطي مصفوفة روابط الويب درجة PageRank الأصلية من جوجل كمتجهها الذاتي بقيمة ذاتية تساوي 1. +على متجه ذاتي، يؤدي تكرار المصفوفة نفسها إلى رفع القيمة الذاتية إلى قوى متتابعة. -### ميكانيكا الكم -تعطي القيم الذاتية للمؤثّر النتائج الممكنة لقياس الكمّية الفيزيائية التي يمثّلها. +### فصل مكونات نموذج -### علم الوراثة السكانية -يحدّد المتجه الذاتي لمصفوفة الانتقال بين الأجيال مزيج الأنماط الوراثية على المدى الطويل تحت التزاوج المتكرر. +عندما يوجد أساس ذاتي، يفصل تغيير الإحداثيات إليه التحويل الخطي إلى عمليات ضرب مستقلة. + +### نماذج الاهتزاز + +يمكن حساب الأنماط الطبيعية بمسائل قيم ذاتية تشمل الصلابة والكتلة معًا. تعتمد العلاقة بين القيم الذاتية والتردد على النموذج الفعلي. diff --git a/content/lessons/algebra/eigenvectors/en.md b/content/lessons/algebra/eigenvectors/en.md index 1abd08ce..290f7fdb 100644 --- a/content/lessons/algebra/eigenvectors/en.md +++ b/content/lessons/algebra/eigenvectors/en.md @@ -1,9 +1,6 @@ --- title: Eigenvectors and eigenvalues -summary: >- - Discover the few special directions a transformation only stretches, never - rotates — the shortcut engineers use to predict vibrations, rank web pages, - and simplify repeated transformations. +summary: 'Find nonzero vectors that a matrix scales along their own line, and read the corresponding scale factors.' parameters: a: matrix row 1, column 1 b: matrix row 1, column 2 @@ -18,54 +15,54 @@ variables: ## Try it -1. Drag the arrow's tip (vx and vy) around the grid and watch its direction bend as the matrix acts on it. -2. Notice the two dashed lines. Land the arrow exactly on one and watch it stay on that same line, only longer or shorter. -3. Read the two eigenvalue numbers next to the dashed lines — they show exactly how much each line's arrows stretch. +1. Set a = 2, b = 1, c = 1 and d = 2. With vx = vy = 1, the input (1, 1) becomes (3, 3): its line is unchanged and its length triples. +2. Set vx = 1 and vy = -1. The output is (1, -1), unchanged. This is another eigenvector, with scale factor 1. +3. Set a = 0, b = -1, c = 1 and d = 0. A quarter-turn rotation has no real eigenvector; the display removes the real eigen-direction guides. ## Real-life examples -1. **Two blocks on springs.** Blocks linked by springs to each other and to the walls (matrix a=2, b=1, c=1, d=2) have two clean vibration patterns: swinging together, stretched 3 times as far, or swinging apart, stretched only once as far. -2. **A one-way growth process.** A population where one group feeds into a second but never the reverse (a=3, b=1, c=0, d=1) still grows cleanly along two directions, at rates 3 and 1. -3. **A satellite's pure spin.** A thruster system that only rotates a satellite by 90° (a=0, b=-1, c=1, d=0) has no real eigen-directions at all — nothing stays on its own line, because every direction turns. +1. **Two invariant directions.** The matrix with rows (2, 1) and (1, 2) scales (1, 1) by 3 and (1, -1) by 1. These numbers are scale factors of this map, not vibration frequencies. +2. **A triangular matrix.** With rows (3, 1) and (0, 1), the eigenvalues are 3 and 1. Directions (1, 0) and (1, -2) provide corresponding eigenvectors. +3. **Quarter-turn rotation.** With rows (0, -1) and (1, 0), every nonzero real vector moves off its original line. The eigenvalues are complex. ## Test yourself -1. Find a matrix and an arrow (not the zero arrow) that stays on its own line after the transformation. -2. Make the matrix a pure rotation, so that no real direction — except the zero arrow — stays on its own line. -3. Make one eigenvalue exactly zero, so the matrix squashes one whole direction completely flat. +1. Choose an input vector of length greater than 1 whose image lies along the same line, within the checker tolerance. +2. Make (a minus d) squared plus 4bc negative so there are no real eigenvalues. A quarter-turn rotation is one example. +3. Make the determinant zero, giving at least one zero eigenvalue. ## Intuition -Picture two blocks connected by springs — to each other and to the walls on either side. Push them in a random way and they wobble in a tangled mix of motions. But two special pushes are clean: nudge both blocks the same amount in the same direction, or nudge them the same amount in opposite directions, and each block keeps doing exactly that motion, just growing or shrinking in size. On the grid here, those two clean pushes are the dashed lines, and the arrow is the push you are testing — drag its tip, set by vx and vy, and watch whether it stays on a dashed line or swings off it. +A matrix usually changes both the length and direction of an arrow. Some arrows are special: the result lies along the same line as the original. A nonzero arrow with this property is an eigenvector, provided the result is a scalar multiple of it. -Drag the arrow off a dashed line and the matrix twists it sideways as it acts — a vector's direction usually changes. Land the arrow exactly on a dashed line instead, and the matrix only stretches or shrinks it along that same line, never bending it: the two numbers shown as the eigenvalues, one per line, say by how much. A negative eigenvalue means the arrow flips to point backward along its own line instead of stretching forward. +The scalar is the eigenvalue. A value of 3 triples the arrow; 1 leaves it unchanged; -1 reverses it without changing its length. A value of zero collapses it to the origin. The zero vector itself is excluded from the definition because every matrix sends it to zero, so it identifies no special direction. ## Formal -A nonzero vector $\mathbf{v}$ is an eigenvector of $M$ with eigenvalue $\lambda$ when $M\mathbf{v} = \lambda\mathbf{v}$: applying the matrix has the same effect as simply multiplying by the number $\lambda$. +A nonzero vector $\mathbf{v}$ is an eigenvector of M with eigenvalue $\lambda$ if $M\mathbf{v}=\lambda\mathbf{v}$. Negative eigenvalues reverse the arrow along its line; zero collapses it. -Rearranging gives $(M - \lambda I)\mathbf{v} = 0$, which has a nonzero solution only when the matrix $M - \lambda I$ is not invertible, that is, when $\det(M - \lambda I) = 0$. +Rearranging gives $(M-\lambda I)\mathbf{v}=0$, where I is the identity matrix. A nonzero solution exists exactly when $\det(M-\lambda I)=0$. Solve this equation for eigenvalues, then find the corresponding nonzero vectors. ## Advanced -A matrix that rotates the plane, like a 90° rotation, has no real eigenvectors at all: every direction turns, so the characteristic equation's roots are complex. Where real eigenvectors do exist, expressing $M$ in that eigenbasis turns matrix powers $M^k$ into simply raising each $\lambda$ to the power $k$, the basis of countless applications. +A real matrix may have two independent real eigen-directions, one, none, or infinitely many. The identity makes every nonzero vector an eigenvector, although the diagram shows only representative guides. Expressing all vectors in an eigenbasis is possible only when there are enough independent eigenvectors; merely having real eigenvalues is not sufficient. ## Derivation -1. Write down what "only stretched, not rotated" means as an equation. -2. Move everything to one side to get a homogeneous system. -3. That system has a nonzero solution only where this determinant vanishes. +1. State that applying the matrix gives a scalar multiple of the original nonzero vector. +2. Move the scalar multiple to the left using the identity matrix. +3. Require a singular coefficient matrix so the homogeneous system can have a nonzero solution. ## Real world -### Vibration analysis -A bridge or building's natural modes of vibration are the eigenvectors of its stiffness matrix; the eigenvalues give the resonant frequencies. +### Repeated transformations -### Search ranking -Google's original PageRank score is the eigenvector of the web's link matrix with eigenvalue 1. +Along an eigenvector, applying the same matrix repeatedly raises the eigenvalue to successive powers. -### Quantum mechanics -A measurable quantity's possible outcomes are the eigenvalues of the operator that represents it. +### Decoupling a model -### Population genetics -The long-run mix of genotypes under repeated mating is the eigenvector of the generation-to-generation transition matrix. +When an eigenbasis exists, changing coordinates to that basis separates a linear transformation into independent scaling operations. + +### Vibration models + +Natural-mode calculations can use eigenvalue problems involving both stiffness and mass. The connection between eigenvalues and frequency depends on the actual model. From 7c3afd95eb8fab33932e78bd17b596e6470cda9c Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:28:32 +0300 Subject: [PATCH 005/124] content: rewrite exponents-and-powers for first-time learners in both languages --- .../algebra/exponents-and-powers/ar.md | 63 +++++++++--------- .../algebra/exponents-and-powers/en.md | 65 +++++++++---------- 2 files changed, 64 insertions(+), 64 deletions(-) diff --git a/content/lessons/algebra/exponents-and-powers/ar.md b/content/lessons/algebra/exponents-and-powers/ar.md index 3cf13dc0..31bd3681 100644 --- a/content/lessons/algebra/exponents-and-powers/ar.md +++ b/content/lessons/algebra/exponents-and-powers/ar.md @@ -1,65 +1,66 @@ --- title: دوال القوة والأسس الكسرية -summary: >- - مقبض واحد يحوّل المنحنى من خط مستقيم إلى قطع مكافئ أو جذر أو منحنى يتضاءل. +summary: 'قارن بين التربيع والجذر والمقلوب بتغيير الأس لمدخل موجب.' parameters: - 'n': الأس n - x: x + n: 'الأس n' + x: 'المدخل الموجب x' variables: - - الأس، وقد يكون سالبًا أو كسريًا - - 'الأساس، مقيّد هنا بالقيم الموجبة' + - 'الأس؛ قد يكون موجبًا أو صفرًا أو سالبًا أو كسريًا' + - 'الأساس الموجب الذي نرفعه إلى الأس' --- ## Try it -1. حرّك n من 2 نزولًا نحو 0 وراقب المنحنى يستقيم ثم يتسطح. -2. ادفع n إلى ما دون الصفر وراقب شكل المنحنى كله ينقلب. -3. اسحب x يمينًا ويسارًا واقرأ ارتفاع المنحنى عند كل نقطة. +1. اضبط x على 2 وقارن n = 1 و2 و3. النواتج 2 و4 و8. يحدد الأس عدد عوامل 2 التي نضربها. +2. أبقِ x عند 2 واضبط n على 0 ثم -1. الناتجان 1 و0.5. الأس السالب يعطي المقلوب، ولا يجعل الناتج سالبًا. +3. اضبط x على 4 وn على 0.5. الناتج 2، لأن هذا الأس يعني الجذر التربيعي. ## Real-life examples -1. **تبليط أرضية.** مضاعفة طول ضلع بلاطة مربعة (x=2) عند الأس n=2 تجعل مساحتها 4 أضعاف، من 1 إلى 4 أمتار مربعة. -2. **تعبئة صندوق.** مضاعفة طول ضلع مكعب (x=2) عند الأس n=3 تجعل حجمه 8 أضعاف، من 1 إلى 8 أمتار مكعبة. -3. **اقتسام فاتورة.** عند الأس n=-1، تنصّف مضاعفة عدد الأشخاص الذين يقتسمون فاتورة بيتزا ثابتة (x=2) ما يدفعه كل شخص. +1. **تكبير المساحة.** عند n = 2 وx = 2، يكون المعامل 4. مضاعفة طولي ضلعي مربع تجعل مساحته أربعة أمثالها. +2. **تكبير الحجم.** عند n = 3 وx = 2، يكون المعامل 8. مضاعفة أبعاد مكعب الثلاثة تجعل حجمه ثمانية أمثاله. +3. **تقاسم مقدار ثابت.** عند n = -1 وx = 2، يكون المعامل 0.5. مضاعفة عدد الحصص المتساوية تجعل كل حصة نصف حجمها السابق. ## Test yourself -1. اجعل x يساوي 2، ثم جد الأس الذي يجعل المنحنى يصل إلى 8 بالضبط هناك. هذا هو النمو نفسه الذي يظهره حجم مكعب حين يتضاعف ضلعه. -2. اضبط الأس على -1، ثم جد x الذي يهبط عنده المنحنى إلى 0.25 بالضبط. هذا يشبه حاجتك إلى 4 أشخاص لتصبح حصة كل واحد ربع الفاتورة. -3. جد الأس الوحيد الذي يجعل المنحنى مسطحًا تمامًا عند 1، أيًّا كانت قيمة x. +1. اضبط x على 2 واختر n ليكون الناتج نحو 8. +2. اضبط n على -1 واختر x ليبتعد الناتج عن 0.25 بأقل من 0.02. +3. أوجد الأس الذي يعطي 1 لكل مدخل موجب. ## Intuition -ضاعف طول ضلع بلاطة مربعة، من متر واحد إلى مترين، فلا تتضاعف مساحتها فقط بل تصبح 4 أضعاف، من متر مربع واحد إلى 4. هذا هو المنحنى الذي تراه هنا عند الأس n = 2، مرسومًا عبر النقطة التي يقرأ عندها x = 2 القيمة 4 على المحور الرأسي. حرّك n نزولًا إلى 1 فيستقيم المنحنى إلى خط قطري بسيط، يكون فيه الناتج مساويًا للمدخل دائمًا. فمضاعفة x الآن تضاعف الناتج فقط، كالطول نفسه لا كالمساحة. +عندما يكون الأس عددًا صحيحًا موجبًا، تعني القوة ضرب عوامل متكررة. اثنان أس ثلاثة يعني 2 مضروبة في 2 مضروبة في 2، والناتج 8. أبقِ المدخل عند 2 وغيّر الأس لتعرف أثر عدد العوامل في النتيجة. -استمر بتحريك n نزولًا إلى 0.5 فيتحول المنحنى إلى جذر تربيعي، شديد الانحدار قرب الصفر ثم يتسطح تدريجيًا مع تزايد x. وعند n = 0 يصبح المنحنى مسطحًا تمامًا عند الارتفاع 1، أيًّا كانت قيمة x، لأن أي عدد مرفوع للأس صفر يساوي 1. ادفع n بدلًا من ذلك إلى قيمة سالبة، لتكن -1، فينقلب طابع المنحنى تمامًا. يرتفع بشدة كلما اقترب x من الصفر، ويهبط نحو الصفر كلما كبر x، وهو الشكل نفسه لفاتورة تُقسَّم على عدد متزايد من الأشخاص، حيث تتقلص حصة كل واحد باستمرار. +تمتد الفكرة إلى أسس أخرى. الأس صفر لأي عدد موجب يعطي 1. والأس -1 يعطي المقلوب، لذلك اثنان أس -1 يساوي النصف. والأس نصف يعطي الجذر التربيعي، ولذلك أربعة أس نصف تساوي 2. + +يبقى x موجبًا في هذا الدرس. يتيح ذلك تغيير الأس باستمرار دون الخروج من الأعداد الحقيقية. يمر الرسم دائمًا بالنقطة (1, 1)، لأن أي قوة للواحد تساوي 1. يغير الأس شكل المنحنى حول هذه النقطة المشتركة. ## Formal -من أجل $x > 0$، تُعرَّف $x^n$ لكل عدد حقيقي $n$ عبر $x^n = e^{n \ln x}$. لذا فالأسس الكسرية والسالبة مشروعة تمامًا مثل الأسس الصحيحة. +للعدد x الموجب وأي n حقيقي، نعرّف $x^n=e^{n\ln x}$. وبوجه خاص، $x^0=1$ و$x^{-n}=1/x^n$. الأس السالب لا يعني أن الناتج سالب. -$x^{p/q} = \sqrt[q]{x^p}$ (لعددين صحيحين موجبين $p, q$)، و$x^{-n} = 1/x^n$. +للعدد الصحيح الموجب q، يمثل $x^{1/q}$ الجذر الموجب من الرتبة q للعدد x. وبصورة أعم، تكون $x^{p/q}=(x^{1/q})^p$ عندما يكون p صحيحًا وq صحيحًا موجبًا، مع x موجب كما في هذا الدرس. ## Advanced -تقييد المجال بـ $x > 0$ هو ما يجعل $x^n = e^{n\ln x}$ معرّفة جيدًا لكل عدد حقيقي $n$. أما من أجل $x$ سالبة فالأسس غير الصحيحة تخرج عمومًا من نطاق الأعداد الحقيقية، مثل $(-1)^{1/2} = i$. ولهذا يبقي هذا الدرس المجال موجبًا. +تقبل بعض المدخلات السالبة قوى كسرية معينة داخل الأعداد الحقيقية، مثل الجذر التكعيبي لـ-8. ولا تقبل قوى أخرى، مثل الجذر التربيعي له. إبقاء x موجبًا يتجنب اختلافات المجال هذه. في دالة القوة يتغير الأساس x ويبقى الأس ثابتًا، بينما في الدالة الأسية يتغير الأس ويبقى الأساس ثابتًا. ## Derivation -1. قانون الأسس الأساسي، وهو صحيح من أجل $a, b$ صحيحين. -2. توسّع إلى الأعداد النسبية، فتُعرَّف $x^{1/q}$ بأنها الجذر من الرتبة $q$. -3. توسّع إلى كل عدد حقيقي $n$ باستخدام الدالة الأسية، بما يتوافق مع الحالة النسبية. +1. ضرب قوتين للأساس الموجب نفسه يجمع الأسين. في الأسس الصحيحة يمكن فهم ذلك بعدّ العوامل. +2. نعرّف مقلوب رتبة الجذر بوصفه أسًا، حتى تعيدنا عملية الرفع إلى تلك الرتبة إلى x. +3. يمد التعريف باستخدام الدالة الأسية واللوغاريتم القاعدة إلى كل أس حقيقي، مع اتفاقه مع الحالات السابقة. ## Real world -### قوانين القياس -تتغير المساحة السطحية كمربع الطول، ويتغير الحجم كمكعب الطول. وكلاهما دالتا قوة للمتغير نفسه. +### الأشكال المتشابهة + +عندما نضرب جميع الأطوال في معامل، تتغير المساحة بمربعه والحجم بمكعبه. + +### التقاسم المتساوي -### قوانين التربيع العكسي -تتناقص الجاذبية وشدة الضوء بمقدار $x^{-2}$، وهي دالة قوة ذات أس سالب. +حجم الحصة المتساوية من مجموع ثابت يتناسب مع مقلوب عدد الحصص. -### القياس النسبي في علم الأحياء -يتناسب معدل الأيض تقريبًا مع (كتلة الجسم)$^{3/4}$، أي أس كسري. +### استرجاع الطول -### عوامل الأمان الهندسية -يمكن أن يتناسب الإجهاد في العارضة مع أس كسري من أبعادها، وهذا يحدّد مقدار ما يصغر أو يكبر به التصميم بأمان. +الجذر التربيعي لمساحة مربع يعطينا طول ضلعه. يعكس الأس نصف عملية التربيع للقيم الموجبة. diff --git a/content/lessons/algebra/exponents-and-powers/en.md b/content/lessons/algebra/exponents-and-powers/en.md index 23003b58..fcef93a4 100644 --- a/content/lessons/algebra/exponents-and-powers/en.md +++ b/content/lessons/algebra/exponents-and-powers/en.md @@ -1,67 +1,66 @@ --- title: Power functions and fractional exponents -summary: >- - See how a single dial reshapes a curve into a line, a parabola, a - square-root, or a shrinking curve — the pattern behind area, volume, and - "inverse" relationships like sharing a bill. +summary: 'Compare squaring, square roots and reciprocals by changing the exponent of a positive input.' parameters: - 'n': exponent n - x: x + n: 'exponent n' + x: 'positive input x' variables: - - the exponent — can be negative or fractional - - 'the base, restricted here to positive values' + - 'exponent; may be positive, zero, negative or fractional' + - 'positive base being raised to the exponent' --- ## Try it -1. Slide n from 2 down toward 0 and watch the curve straighten, then flatten. -2. Push n past 0 into negative numbers and watch the curve's whole shape flip. -3. Drag x left and right and read the curve's height at each point. +1. Set x to 2 and compare n = 1, 2 and 3. The outputs are 2, 4 and 8. The exponent determines how many factors of 2 are multiplied. +2. Keep x at 2 and set n to 0, then -1. The outputs are 1 and 0.5. A negative exponent takes a reciprocal rather than making the result negative. +3. Set x to 4 and n to 0.5. The output is 2 because this exponent means square root. ## Real-life examples -1. **Tiling a floor.** Doubling a square tile's side length (x=2) at exponent n=2 quadruples its area, from 1 to 4 square metres. -2. **Packing a box.** Doubling a cube's side length (x=2) at exponent n=3 multiplies its volume by 8, from 1 to 8 cubic metres. -3. **Splitting a bill.** At exponent n=-1, doubling the number of people sharing a fixed pizza bill (x=2) halves what each person pays, down to 0.5 of the original share. +1. **Scaling an area.** With n = 2 and x = 2, the factor is 4. Doubling both side lengths of a square multiplies its area by four. +2. **Scaling a volume.** With n = 3 and x = 2, the factor is 8. Doubling all three dimensions of a cube multiplies its volume by eight. +3. **Sharing a fixed amount.** With n = -1 and x = 2, the factor is 0.5. Twice as many equal shares make each share half as large. ## Test yourself -1. Set x to 2, then find the exponent that makes the curve reach exactly 8 there — the same growth a cube's volume shows when its side doubles. -2. With the exponent set to -1, find the x where the curve drops to exactly 0.25 — like needing 4 people to quarter a shared bill. -3. Find the one exponent that makes the curve perfectly flat, equal to 1, no matter where x sits. +1. Set x to 2 and choose n to make the output about 8. +2. Set n to -1 and choose x to make the output within 0.02 of 0.25. +3. Find the exponent that gives 1 for every positive input. ## Intuition -Double the side length of a square tile, from 1 metre to 2, and its area does not just double — it quadruples, from 1 square metre to 4. That is the curve you see here at exponent n = 2, plotted through the point where x = 2 reads 4 on the vertical axis. Slide n down to 1 and the curve straightens into a plain diagonal line, where the output always equals the input — doubling x now only doubles the result, like length itself instead of area. +For a positive whole-number exponent, a power means repeated multiplication. Two cubed is 2 times 2 times 2, giving 8. Keep the input at 2 and change the exponent to see how the number of factors changes the result. -Keep sliding n down to 0.5 and the curve becomes a square root: steep near zero, then flattening out as x grows. At n = 0 the curve turns dead flat at height 1, no matter what x is, because anything raised to the power zero equals 1. Push n negative instead, say to -1, and the curve flips character completely: it shoots up as x shrinks toward zero and settles toward zero as x grows — the same shape as a bill split among more and more people, where each share keeps shrinking. +Other exponents extend the same pattern. The zero power of a positive number is 1. Exponent -1 gives its reciprocal, so 2 to the power -1 is one half. Exponent one half gives the square root, so 4 to that power is 2. + +Here x is always positive. This lets the exponent change continuously without leaving the real numbers. Notice that the graph always passes through (1, 1), because every power of 1 is 1. Changing the exponent changes the shape around that shared point. ## Formal -For $x > 0$, $x^n$ is defined for every real $n$ via $x^n = e^{n \ln x}$, so fractional and negative exponents are as legitimate as integer ones. +For positive x and any real n, define $x^n=e^{n\ln x}$. In particular, $x^0=1$ and $x^{-n}=1/x^n$. Negative exponents do not imply negative outputs. -$x^{p/q} = \sqrt[q]{x^p}$ (for positive integers $p, q$), and $x^{-n} = 1/x^n$. +For a positive integer q, $x^{1/q}$ is the positive q-th root of x. More generally, $x^{p/q}=(x^{1/q})^p$ for integer p and positive integer q, with x positive as throughout this lesson. ## Advanced -Restricting to $x > 0$ is what makes $x^n = e^{n\ln x}$ well defined for every real $n$; for negative $x$, non-integer powers generally leave the real numbers (e.g. $(-1)^{1/2} = i$), which is why this lesson keeps the domain positive. +Some negative inputs admit particular fractional powers as real numbers, such as the cube root of -8. Others do not, such as its square root. Keeping x positive avoids these domain differences. A power function varies the base x with a fixed exponent, whereas an exponential function varies the exponent with a fixed base. ## Derivation -1. The defining law of exponents, true for integer $a, b$. -2. Extend to rationals: $x^{1/q}$ is defined as the $q$-th root. -3. Extend to every real $n$ using the exponential, agreeing with the rational case. +1. Multiplying powers with the same positive base adds their exponents. For whole exponents, this follows by counting factors. +2. Define the reciprocal of a root's degree as its exponent so that raising it back to that degree recovers x. +3. The exponential-and-logarithm definition extends the rule to every real exponent and agrees with the earlier cases. ## Real world -### Scaling laws -Surface area scales as length squared, volume as length cubed — both power functions of the same variable. +### Similar shapes + +When all lengths are multiplied by a factor, area changes by its square and volume by its cube. + +### Equal sharing -### Inverse-square laws -Gravity and light intensity fall off as $x^{-2}$, a negative-exponent power function. +The size of an equal share of a fixed total is proportional to the reciprocal of the number of shares. -### Allometry in biology -Metabolic rate scales roughly as (body mass)$^{3/4}$ — a fractional exponent. +### Recovering a length -### Engineering safety factors -Stress in a beam can scale with a fractional power of its dimensions, guiding how much a design can shrink or grow. +Taking the square root of a square's area recovers its side length. The exponent one half reverses squaring on positive values. From 408ba738c76806f17fb58862ce7d7b8449e5e361 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:28:32 +0300 Subject: [PATCH 006/124] content: rewrite linear-equations for first-time learners in both languages --- .../lessons/algebra/linear-equations/ar.md | 70 +++++++++--------- .../lessons/algebra/linear-equations/en.md | 72 +++++++++---------- 2 files changed, 71 insertions(+), 71 deletions(-) diff --git a/content/lessons/algebra/linear-equations/ar.md b/content/lessons/algebra/linear-equations/ar.md index 47772054..13035628 100644 --- a/content/lessons/algebra/linear-equations/ar.md +++ b/content/lessons/algebra/linear-equations/ar.md @@ -1,70 +1,70 @@ --- title: 'المعادلات الخطية: وازن الكفتين' -summary: >- - ابحث عن الرقم الوحيد الذي يوازن كفتي المعادلة. به تعرف متى تتساوى تكلفتان ومتى يربح - المشروع. +summary: 'أوجد المدخل الذي يجعل مقدارين متساويين، وافهم لماذا يقطع رسم الفرق بينهما محور الصفر.' parameters: - m: الميل m - b: نقطة التقاطع مع المحور y، b - k: القيمة المستهدفة k - x: x (اسحب النقطة حتى يصير الفرق صفرًا) + m: 'معدل التغير m' + b: 'المقدار الثابت b' + k: 'المقدار المطلوب k' + x: 'المدخل x' variables: - - ميل الخط - - نقطة تقاطع الخط مع المحور y - - القيمة المستهدفة في الطرف الأيمن من المعادلة - - المجهول — النقطة التي يعبر عندها الخط المرسوم الصفر + - 'معدل التغير لكل وحدة من المدخل' + - 'المقدار الثابت قبل طرح المطلوب' + - 'المقدار المطلوب في الطرف الأيمن' + - 'المدخل المجهول؛ يصبح ارتفاع الرسم صفرًا عند الحل' --- ## Try it -1. تجلس النقطة البرتقالية على الخط الأزرق. اسحبها يمينًا ويسارًا عليه. -2. راقب الرقم بجانبها، $f(x)$، يتقلص مع السحب. حين يصل إلى الصفر تمامًا تكون النقطة على المحور الأفقي، وهذا هو الحل. -3. الآن حرّك منزلق «نقطة التقاطع b» أو «القيمة المستهدفة k» بدلًا من النقطة. لاحظ كيف ينزلق الخط كله، ومعه نقطة التقاطع، لأعلى أو لأسفل. +1. اضبط m على 1.5 وb على 2 وk على 8. عند x = 0، يكون الناتج المرسوم -6؛ فالطرف الأيسر أقل من المطلوب بمقدار 6. +2. اضبط x على 4. يصبح الناتج صفرًا، لأن 1.5 مضروبة في 4 ثم مضافًا إليها 2 تساوي 8. +3. أبقِ m وb ثابتين وارفع k إلى 9. ينخفض الخط وحدة واحدة، ونحتاج إلى x أكبر للوصول إلى الصفر. ## Real-life examples -1. **شراء دفاتر بميزانية محددة.** يكلف الدفتر الواحد 1.5 ريال (الميل m = 1.5)، ويضيف المتجر رسم توصيل قدره 2 ريال (نقطة التقاطع b = 2). بميزانية 8 ريالات (القيمة المستهدفة k = 8) تشتري 4 دفاتر بالضبط. -2. **ركوب سيارة أجرة.** تتقاضى السيارة 0.5 ريال عن كل كيلومتر (m = 0.5) مع رسم انطلاق ثابت قدره 3 ريالات (b = 3). بمبلغ 6 ريالات في جيبك (k = 6) تقطع 6 كيلومترات. -3. **الادخار من دَين.** تدخر ريالين كل أسبوع (m = 2) لكنك تبدأ مدينًا بـ 3 ريالات (b = -3). للوصول إلى 5 ريالات في مدخراتك (k = 5) تحتاج 4 أسابيع. +1. **شراء دفاتر.** إذا كان سعر الدفتر 1.50 ورسوم التوصيل الثابتة 2، فإن المبلغ 8 يكفي لأربعة دفاتر. اضبط x على 4 للتحقق من التساوي. +2. **أجرة افتراضية.** إذا كانت الأجرة 0.50 لكل كيلومتر مع رسوم ابتدائية 3، فإن المجموع 6 يقابل مسافة 6 كيلومترات. +3. **الادخار من رصيد سالب.** ابدأ برصيد -3 وأضف 2 كل أسبوع. بعد 4 أسابيع يصبح الرصيد 5. ## Test yourself -1. اختر قيم m وb وk بحيث تكون x = -5 هي الحل بالضبط، فتجلس النقطة على المحور هناك تمامًا. -2. اجعل كل قيمة لـ x تحقق المعادلة في آن واحد، بحيث يستلقي الخط كله على المحور الأفقي. (فكّر في القيمة التي يجب أن يكون عليها الميل.) -3. اجعل المعادلة مستحيلة الحل، بحيث لا توازنها أي قيمة لـ x. (فكّر في خط أفقي لا يلمس الصفر أبدًا.) +1. اضبط x على -5 واختر m وb وk ليكون الناتج المرسوم قريبًا من الصفر. +2. اجعل m صفرًا وb مساوية لـk، ليحقق كل مدخل المعادلة. +3. اجعل m صفرًا والفرق بين b وk أكبر من 1 بالقيمة المطلقة، حتى لا يكون للمعادلة حل. ## Intuition -معك 20 ريالًا تريد إنفاقها على دفاتر. كل دفتر بـ 3 ريالات، والمتجر يضيف رسم توصيل ثابتًا قدره 2 ريال مهما كان عدد الدفاتر. كم دفترًا تستطيع شراءه؟ حرّك النقطة البرتقالية على الخط الأزرق وراقب الرقم بجانبها، $f(x)$، يتقلص نحو الصفر. هذا الرقم يخبرك كم يبعد طرفا المعادلة عن التساوي. وحين تقطع النقطة المحور الأفقي يتساوى الطرفان تمامًا، والجواب 6 دفاتر. +لنفترض أن سعر الدفتر 1.50 ورسوم التوصيل 2 مهما كان عدد الدفاتر. إذا كانت الميزانية 8، يتبقى 6 للدفاتر بعد طرح رسوم التوصيل. نقسم 6 على 1.50 فنحصل على 4 دفاتر. أوجدنا المجهول بعكس الجمع الثابت أولًا، ثم عكس الضرب. -منزلق «الميل m» هو ثمن الدفتر الواحد، أي مقدار ما يرتفع الخط كلما زادت $x$ بمقدار واحد. ومنزلق «نقطة التقاطع b» هو رسم التوصيل الثابت، أما «القيمة المستهدفة k» فهي المبلغ الذي معك بالكامل. ارفع b أو k فينزلق الخط الأزرق كله لأعلى أو لأسفل، وتنزلق نقطة التقاطع معه جانبيًا. ارفع m بدلًا من ذلك فيميل الخط، فكلما زاد الميل وصلت النقطة إلى الصفر بسحبة أقصر بكثير، لأن كل دفتر إضافي أصبح أغلى. +تسجل المعادلة هذا الحساب باستخدام x لعدد الدفاتر. ارتفاع الرسم يمثل الطرف الأيسر ناقص المبلغ المطلوب، وليس التكلفة الكلية نفسها. الارتفاع السالب يعني أن التكلفة أقل من المطلوب، والموجب يعني أنها أكبر. وعند الصفر يتساوى المقداران. + +تغيير x يعني تجربة مدخل آخر، أما تغيير m أو b أو k فيغير المسألة. إذا كان m صفرًا، فلن يؤثر المدخل في الناتج. عندها إما أن يساوي المبلغ الثابت المطلوب لكل المدخلات، أو ألا يوجد مدخل يصلح الفرق بينهما. ## Formal -عندما $m \ne 0$، تكون $mx + b = k$ لها حل وحيد هو $x = (k - b)/m$. +عند $m\ne0$، يكون للمعادلة $mx+b=k$ حل وحيد هو $x=(k-b)/m$. نطرح b من الطرفين، ثم نقسم على m. -منحنى $y = mx + b - k$ خط مستقيم ميله $m$ ونقطة تقاطعه مع المحور $y$ هي $b - k$. وصفره الوحيد هو الحل. +الدالة المرسومة هي $f(x)=mx+b-k$. أصفارها هي حلول المعادلة. عند m = 0 توجد حلول غير منتهية إذا تساوى b وk، ولا يوجد حل إذا اختلفا. ## Advanced -عندما $m = 0$ يكون "الخط" أفقيًا. إذا كان $b = k$ فإن كل قيم $x$ تحقق المعادلة (عدد لا نهائي من الحلول)، وإذا كان $b \ne k$ فلا تحققها أي قيمة. هذه هي الحالة التي تميّز المعادلة الحقيقية من الدرجة الأولى عن حالة منحطّة، وهي تتكرر في الجبر الخطي كالفرق بين نظام متوافق وآخر غير متوافق. +قد يكون الحل صحيحًا جبريًا وغير مناسب للتطبيق. عدد الدفاتر يجب أن يكون صحيحًا وغير سالب، بينما تسمح المعادلة الرياضية بحلول حقيقية. وقد يوجد حل خارج نافذة العرض حتى لو لم يقطع الجزء الظاهر من الخط محور الصفر. ## Derivation -1. ابدأ من المعادلة كما هي معطاة. -2. انقل كل الحدود إلى طرف واحد، وهذا بالضبط المنحنى المرسوم. -3. اقسم على $m$ (صحيح ما دام $m \ne 0$). +1. نكتب المساواة بين المبلغ المحسوب والمبلغ المطلوب. +2. نطرح المبلغ المطلوب من الطرفين. يصبح الطرف الأيسر هو الدالة التي يعرضها الرسم. +3. نعيد الترتيب ونقسم على m غير الصفري. نعالج m = 0 بصورة منفصلة بدل القسمة على الصفر. ## Real world -### نقطة التعادل -التكلفة والإيراد كلاهما دالة خطية في عدد الوحدات المباعة. ويلتقي الخطان عند نقطة التعادل. +### مقارنة خطط الأسعار + +إذا اختلفت الرسوم الثابتة ومعدل الاستخدام بين خطتين، فإن مساواة تكلفتيهما تعطي معادلة خطية ضمن هذه الافتراضات. ### تحويل الوحدات -ترتبط درجتا فهرنهايت وسيليزيوس بمعادلة خطية، $F = \tfrac95 C + 32$. -### خطط التسعير -يتقاطع خطا هاتف برسوم أساسية وأسعار دقيقة مختلفة عند مستوى استخدام تتساوى عنده التكلفتان. +يمكن عكس تحويل يضرب في ثابت ثم يضيف ثابتًا آخر، بالطرح أولًا ثم القسمة. + +### الحركة -### الحركة بسرعة ثابتة -يتغيّر الموضع خطيًا مع الزمن، وتحتاج معرفة لحظة التقاء مركبتين إلى حل معادلة خطية. +عند سرعة متجهة ثابتة، يتغير الموضع خطيًا مع الزمن. حل المعادلة لموضع مطلوب يحدد وقت الوصول إليه إذا كان الزمن الناتج مناسبًا للموقف. diff --git a/content/lessons/algebra/linear-equations/en.md b/content/lessons/algebra/linear-equations/en.md index cb2810db..5b4ec0c6 100644 --- a/content/lessons/algebra/linear-equations/en.md +++ b/content/lessons/algebra/linear-equations/en.md @@ -1,70 +1,70 @@ --- title: 'Linear equations: where the line crosses zero' -summary: >- - Find the one missing number that makes both sides of an equation balance — - the skill behind budgets, taxi fares, and knowing when two costs become equal. +summary: 'Find the input that makes two amounts equal, and understand why its graph crosses zero.' parameters: - m: slope m - b: intercept b - k: target value k - x: x (drag until the curve hits zero) + m: 'rate m' + b: 'fixed amount b' + k: 'target amount k' + x: 'input x' variables: - - slope of the line - - y-intercept - - target value on the right-hand side - - the unknown — where the plotted line crosses zero + - 'rate of change per input unit' + - 'fixed amount before subtracting the target' + - 'target on the right side of the equation' + - 'unknown input; the graph reaches zero at a solution' --- ## Try it -1. Look at the blue line and the orange point sitting on it. Drag the point left and right along "x". -2. Watch the number beside it, $f(x)$, shrink as you drag. When it reaches exactly zero, the point sits on the horizontal axis — that is the solution. -3. Now move the "intercept b" or "target k" slider instead. Notice how the whole line, and its crossing point, slides up or down with it. +1. Set m to 1.5, b to 2 and k to 8. At x = 0 the plotted output is -6: the left side is 6 below the target. +2. Set x to 4. The output is zero because 1.5 times 4 plus 2 equals 8. +3. Keep m and b fixed and raise k to 9. The line moves down by 1. You now need a larger x to reach zero. ## Real-life examples -1. **Buying notebooks on a budget.** Notebooks cost 1.50 dollars each (slope m = 1.5) and the store adds a 2-dollar delivery fee (intercept b = 2). With an 8-dollar budget (target k = 8), you can buy exactly 4 notebooks. -2. **Taking a taxi.** The taxi charges 0.50 dollars per kilometre (m = 0.5) plus a 3-dollar flat pickup fee (b = 3). With 6 dollars in your pocket (k = 6), you can ride 6 kilometres. -3. **Saving up from debt.** You save 2 dollars every week (m = 2) but start 3 dollars in debt (b = −3). Reaching 5 dollars in savings (k = 5) takes 4 weeks. +1. **Buying notebooks.** At 1.50 per notebook plus a fixed fee of 2, a total of 8 buys 4 notebooks. Set x to 4 to verify the equality. +2. **An illustrative fare.** At 0.50 per kilometre plus a starting fee of 3, a total of 6 corresponds to 6 kilometres. +3. **Saving from a negative balance.** Start at -3 and add 2 each week. After 4 weeks, the balance is 5. ## Test yourself -1. Find slider values for m, b and k so that x = −5 is the exact solution — the point should sit right on the axis there. -2. Make every value of x solve the equation at once, so the whole line lies flat on the horizontal axis. (Think about what the slope must be.) -3. Make the equation impossible to solve, so that no value of x ever balances it. (Think about a flat line that never touches zero.) +1. Set x to -5 and choose m, b and k so the plotted output is approximately zero. +2. Set m to zero and b equal to k, so every input solves the equation. +3. Set m to zero and make the difference between b and k greater than 1 in magnitude, so no input solves it. ## Intuition -Say you want to spend exactly 20 dollars on notebooks. Each one costs 3 dollars, and the store charges a fixed 2-dollar delivery fee no matter how many you order. How many notebooks can you buy? Move the orange point along the blue line and watch the number beside it, $f(x)$, shrink toward zero — that number is how far the two sides of the equation are from balancing. Where the point crosses the horizontal axis, the two sides balance exactly: the answer is 6 notebooks. +Suppose notebooks cost 1.50 each and delivery costs 2 regardless of quantity. A total budget of 8 leaves 6 for the notebooks. Dividing 6 by 1.50 gives 4 notebooks. We found the unknown by undoing the fixed addition and then the multiplication. -The slider labelled slope m is the price of one notebook: how much the line rises as $x$ grows by one. The slider labelled intercept b is the fixed delivery fee, and target k is the total amount you have to spend. Raise b or k and the whole blue line shifts up or down, sliding the crossing point sideways with it. Raise m instead and the line tilts: a steeper line reaches zero after a much shorter drag, because each extra notebook now costs more. +The equation records that calculation using x for the number of notebooks. The plotted height is the left side minus the target, not the total cost itself. A negative height means the total is below the target, and a positive height means it is above. At zero, the two amounts are equal. + +Changing x tries another input. Changing m, b or k changes the problem. If m is zero, the input no longer affects the result. Then either the fixed amount already equals the target for every input, or no input can fix the mismatch. ## Formal -For $m \ne 0$, $mx + b = k$ has the unique solution $x = (k - b)/m$. +For $m\ne0$, the equation $mx+b=k$ has the unique solution $x=(k-b)/m$. Subtract b from both sides, then divide by m. -The graph of $y = mx + b - k$ is a straight line with slope $m$ and $y$-intercept $b - k$; its unique zero is the solution. +The plotted function is $f(x)=mx+b-k$. Its zeros are the solutions of the equation. At m = 0, there are infinitely many solutions if b equals k and no solutions otherwise. ## Advanced -When $m = 0$ the "line" is horizontal: if $b = k$ every $x$ satisfies the equation (infinitely many solutions), and if $b \ne k$ no $x$ does. This is the case that distinguishes a genuinely first-degree equation from a degenerate one, and it recurs throughout linear algebra as the difference between a consistent and an inconsistent system. +An algebraic solution need not be usable in an application. Notebook counts must be nonnegative whole numbers, while a mathematical linear equation allows real solutions. A solution outside the displayed interval can also exist even when the visible line does not cross zero. ## Derivation -1. Start from the equation as given. -2. Move everything to one side — this is exactly the plotted curve. -3. Divide by $m$ (valid whenever $m \ne 0$). +1. Write the equality between the calculated amount and the target. +2. Subtract the target from both sides. The left side is now the function shown on the graph. +3. Rearrange and divide by nonzero m. Treat m = 0 separately rather than dividing by zero. ## Real world -### Break-even points -Cost and revenue are both linear in units sold; the break-even point is where the two lines meet. +### Comparing plans + +If two pricing plans use different fixed fees and rates, setting their total costs equal gives a linear equation under those assumptions. + +### Converting units -### Unit conversion -Fahrenheit and Celsius are related by a linear equation, $F = \tfrac95 C + 32$. +A conversion that multiplies and then adds a constant can be reversed by subtracting and then dividing. -### Pricing plans -Two phone plans with different base fees and per-minute rates cross at the usage level where they cost the same. +### Motion -### Motion at constant speed -Position versus time is linear; finding when two vehicles meet is solving a linear equation. +For constant velocity, position changes linearly with time. Solving for a target position tells when it is reached, if the resulting time fits the situation. From 0a8e809a7b0f17c3f7b94bb642b48c310a62f0ad Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:28:32 +0300 Subject: [PATCH 007/124] content: rewrite logarithms for first-time learners in both languages --- content/lessons/algebra/logarithms/ar.md | 64 +++++++++++------------ content/lessons/algebra/logarithms/en.md | 65 ++++++++++++------------ 2 files changed, 64 insertions(+), 65 deletions(-) diff --git a/content/lessons/algebra/logarithms/ar.md b/content/lessons/algebra/logarithms/ar.md index 5f523ab2..6b25b02c 100644 --- a/content/lessons/algebra/logarithms/ar.md +++ b/content/lessons/algebra/logarithms/ar.md @@ -1,14 +1,12 @@ --- title: 'اللوغاريتم: معكوس القوى' -summary: >- - كم مرة تضرب في عشرة حتى تبلغ المليون؟ هذا هو اللوغاريتم، وهو مقياس الزلازل والحموضة - وبتّات الحاسوب. +summary: 'أوجد الأس الذي نرفع إليه أساسًا معينًا للحصول على عدد موجب مطلوب.' parameters: - b: الأساس b - x: قيمة x + b: 'الأساس b؛ أكبر من 1 هنا' + x: 'المدخل الموجب x' variables: - - أساس اللوغاريتم، وهو أساس الدالة الأسية المرتبطة به - - 'العدد الذي تحسب لوغاريتمه، ويجب أن يكون موجبًا' + - 'الأساس المستخدم في اللوغاريتم والدالة الأسية المقابلة' + - 'العدد الموجب الذي نريد معرفة الأس المؤدي إليه' charts: - title: 'النصف الآخر من الزوج: b^x' xLabel: x @@ -19,54 +17,56 @@ charts: ## Try it -1. اسحب x وراقب ارتفاع الخط الأزرق. هذا الارتفاع هو لوغاريتم x. -2. ارفع منزلق «الأساس b» وراقب الخط الأزرق يتسطح. يحتاج عندها x أكبر بكثير ليبلغ الارتفاع نفسه. -3. قارن الخط الأزرق بالمنحنى المتقطّع أدناه، $b^x$. المنحنيان صورتان متقابلتان في المرآة. +1. اضبط b على 2 وx على 8. ارتفاع الرسم 3، لأن اثنين أس ثلاثة يساوي ثمانية. +2. أبقِ b عند 2 واضبط x على 0.5. الناتج -1، لأن اثنين أس -1 يساوي النصف. +3. اضبط x على 1 وغيّر b. يبقى الناتج صفرًا. يعرض الرسم الإضافي الدالة الأسية المقابلة؛ نافذتا الرسم مختلفتان، لذا قارن القيم بدل الحكم من الشكل الظاهر فقط. ## Real-life examples -1. **تضاعف البكتيريا.** مستعمرة تتضاعف كل ساعة (الأساس b=2). بعد أن تكبر 8 أضعاف (x=8) يبلغ ارتفاع المنحنى 3 بالضبط، أي مرت ثلاث ساعات تضاعف. -2. **انتشار إشاعة تتضاعف ثلاث مرات.** جمهور إشاعة يتضاعف 3 مرات كل يوم (الأساس b=3). حين يصل إلى 9 أضعاف حجمه الأصلي (x=9) يبلغ ارتفاع المنحنى 2 بالضبط، أي مر يومان. -3. **ادخار بفائدة مركّبة.** مدخرات تنمو بمعدل 1.5 مرة كل عام (الأساس b=1.5). الوصول إلى 10 أضعاف المبلغ الأصلي (x=10) يستغرق أقل من 6 سنوات بقليل. +1. **ثلاث عمليات تضاعف.** عند b = 2 وx = 8، تكون النتيجة 3. نحتاج إلى ثلاث عمليات تضاعف لنصل إلى ثمانية أمثال البداية. +2. **التثليث مرتين.** عند b = 3 وx = 9، تكون النتيجة 2. الضرب في ثلاثة مرتين يعطي تسعة. +3. **الضرب المتكرر في 1.5.** عند b = 1.5 وx = 10، تكون النتيجة نحو 5.68. يصل نموذج نمو مستمر إلى عشرة أمثال البداية عند هذا الزمن؛ أما الخطوات الصحيحة المنفصلة فتتجاوز عشرة أول مرة بعد ست خطوات. ## Test yourself -1. جد أساسًا غير 2 يبلغ عنده ارتفاع المنحنى 3 بالضبط. هناك أكثر من إجابة صحيحة. -2. حرّك x حتى يبلغ ارتفاع المنحنى -1 بالضبط. -3. اجعل الأساس 3، ثم جد x الذي يبلغ عنده ارتفاع المنحنى 2 بالضبط، وهو موضع التثليث مرتين. +1. اختر أساسًا يختلف عن 2 بأكثر من 0.1، واجعل x تبتعد عن مكعبه بأقل من 0.1. +2. اختر قيمًا تجعل اللوغاريتم يبتعد عن -1 بأقل من 0.02. +3. اضبط b على 3 وأوجد مدخلًا يعطي ناتجًا قريبًا من 2. ## Intuition -مستعمرة بكتيريا تتضاعف كل ساعة. بعد 3 ساعات تكبر 8 أضعاف. فالعدد 2 مضروبًا في نفسه ثلاث مرات يساوي 8. المنحنى على الشاشة يجيب عن السؤال المعاكس: بما أن المستعمرة الآن 8 أضعاف حجمها، اسحب x إلى 8 واقرأ ارتفاع المنحنى، فيقع عند 3، وهو عدد ساعات التضاعف التي مرّت. قارنه بالمنحنى المتقطّع أسفله، $b^x$. فالمنحنيان صورتان متقابلتان في المرآة، لأن كلًّا منهما يعكس ما يفعله الآخر تمامًا. +اثنان أس ثلاثة يساوي ثمانية. تبدأ عملية الرفع للأس من الأساس والأس، ثم تحسب النتيجة. يعكس اللوغاريتم السؤال: إذا كان الأساس 2 والنتيجة 8، فما الأس؟ الإجابة 3. -ارفع الأساس b فيتسطح المنحنى، إذ يحتاج الوصول إلى الارتفاع نفسه إلى x أكبر بكثير. فالأساس الأكبر يبلغ أي مضاعف معيّن أسرع، والتثليث يوصلك أبعد من التضعيف في كل خطوة. وأيًّا كان الأساس، يقطع المنحنى دائمًا الصفر عند x = 1، لأن رفع أي أساس للأس صفر يعطي 1 دائمًا. +قد تكون الإجابة سالبة رغم أن المدخل يجب أن يكون موجبًا. للحصول على النصف بالأساس 2، نحتاج إلى الأس -1. وللحصول على 1 نحتاج دائمًا إلى الأس صفر. وقد تحتاج القيم بين هذه الأمثلة إلى أسس كسرية. + +يبقى الأساس في هذا المنزلق أكبر من 1. إذا ثبت المدخل عند قيمة أكبر من 1، تقل قيمة الأس المطلوب عندما نزيد الأساس. خطوات الضرب الأكبر تصل إلى الهدف نفسه بعدد أقل من الخطوات. أما المدخلات بين الصفر والواحد، فنفكر في الأس السالب بدل افتراض أن جميع النواتج تنقص. ## Formal -تُعرَّف $y = \log_b x$ من أجل $x > 0$ بأنها القيمة الوحيدة لـ$y$ التي تحقق $b^y = x$ (حيث $b > 0$، $b \ne 1$). وهي الدالة العكسية لـ$b^x$. +تعني العبارة $y=\log_b x$ أن $b^y=x$، حيث x موجب وb موجب ومختلف عن 1. يعطينا اللوغاريتم الأس الوحيد y الذي يحقق ذلك. -$\log_b(xy) = \log_b x + \log_b y$ و $\log_b(x^p) = p\log_b x$. +للعددين x وz الموجبين، تكون $\log_b(xz)=\log_b x+\log_b z$. ولأي p حقيقي وx موجب، تكون $\log_b(x^p)=p\log_b x$. تأتي هاتان القاعدتان من ضرب القوى ورفع قوة إلى قوة أخرى. ## Advanced -بما أن $\log_b x = \ln x / \ln b$، فكل لوغاريتم هو إعادة تحجيم للوغاريتم الطبيعي. لهذا يكفي أن تنفّذ الآلات الحاسبة لوغاريتمًا واحدًا فقط وتشتق منه الباقي، ولهذا يحمل $d(\log_b x)/dx = 1/(x\ln b)$ عاملًا إضافيًا مقارنة باللوغاريتم الطبيعي. +هوية تغيير الأساس هي $\log_b x=\ln x/\ln b$. تتيح للآلة الحاسبة استخدام اللوغاريتم الطبيعي لحساب أساس آخر. نستبعد الأساس 1 لأن لوغاريتمه الطبيعي صفر، ولأن جميع قواه تعطي القيمة نفسها. ## Derivation -1. بالتعريف، $y$ هو الأس الذي يحوّل $b$ إلى $x$. -2. جمع الأسس يقابل ضرب النواتج. -3. أخذ اللوغاريتم يحوّل الضرب إلى جمع. +1. نسمي الأس y الذي يجعل رفع b إليه مساويًا لـx. +2. نجمع أسين من هذا النوع. تبين قاعدة القوى أن نضرب الناتجين المقابلين. +3. تطبيق اللوغاريتم يعيد حاصل الضرب إلى مجموع الأسين. ## Real world -### الأس الهيدروجيني ومقياس ريختر -يستخدم كل منهما لوغاريتمًا بالأساس 10 ليضغط مدى واسعًا من القيم في نطاق يسهل التعامل معه. +### خطوات النمو + +يمكن للوغاريتم إيجاد عدد خطوات الضرب المتكرر اللازمة للوصول إلى نسبة مطلوبة. + +### المعلومات -### الديسيبل -تدرك الأذن شدة الصوت بشكل لوغاريتمي تقريبًا، لذا يُقاس الجهر الصوتي على مقياس لوغاريتمي. +عند وجود N بدائل متساوية الاحتمال، يقيس لوغاريتم N للأساس 2 المعلومات بالبت. أما الترميز الثنائي ثابت الطول فيحتاج إلى عدد صحيح من البتات، فنقرب إلى الأعلى عند الحاجة. -### نظرية المعلومات -عدد البتّات اللازمة لترميز $N$ رسالة متساوية الاحتمال هو $\log_2 N$. +### مقارنة المقاييس -### إيجاد الزمن في نماذج النمو -تستنتج زمن التضاعف أو عمر النصف من لوغاريتم معادلة أسية. +تمثل المحاور اللوغاريتمية النسب المتساوية بمسافات متساوية. تحقق دائمًا من الأساس ومعنى الكمية المرسومة. diff --git a/content/lessons/algebra/logarithms/en.md b/content/lessons/algebra/logarithms/en.md index 15cc654a..d06214e2 100644 --- a/content/lessons/algebra/logarithms/en.md +++ b/content/lessons/algebra/logarithms/en.md @@ -1,15 +1,12 @@ --- title: Logarithms as the inverse of powers -summary: >- - Find out how many times you would need to multiply by a fixed factor to - reach a number — the scale behind pH, earthquake magnitude, and digital - bits. +summary: 'Find the exponent needed to turn a chosen base into a given positive number.' parameters: - b: base b - x: x + b: 'base b (greater than 1 here)' + x: 'positive input x' variables: - - the base of the logarithm (and of the paired exponential) - - 'the input to the logarithm, must be positive' + - 'base used for both the logarithm and the paired exponential' + - 'positive number whose exponent we want to find' charts: - title: 'The other half of the pair: b^x' xLabel: x @@ -20,54 +17,56 @@ charts: ## Try it -1. Drag x and watch the curve's height — that height is the log of x. -2. Raise the "base b" slider and watch the curve flatten, needing a much bigger x to reach the same height. -3. Compare with the dashed curve below, $b^x$ — notice the two curves mirror each other. +1. Set b to 2 and x to 8. The graph's height is 3 because 2 cubed equals 8. +2. Keep b at 2 and set x to 0.5. The output is -1 because 2 to the power -1 is one half. +3. Set x to 1 and change b. The output remains zero. The additional chart shows the paired exponential; the two plots use different windows, so compare their values rather than their apparent shapes. ## Real-life examples -1. **Bacteria doubling.** A colony doubles every hour (base b=2). After growing 8-fold (x=8), the curve reads exactly 3 — three doubling hours have passed. -2. **A rumor tripling.** A rumor's audience triples every day (base b=3). Once it reaches 9 times its start size (x=9), the curve reads 2 — two days have passed. -3. **Compound savings.** Savings grow by a factor of 1.5 each year (base b=1.5). Reaching 10 times the original amount (x=10) takes just under 6 years. +1. **Three doublings.** At b = 2 and x = 8, the result is 3. An eightfold increase takes three doubling steps. +2. **Two triplings.** At b = 3 and x = 9, the result is 2. Multiplying by three twice gives nine. +3. **Repeated multiplication by 1.5.** At b = 1.5 and x = 10, the result is about 5.68. A continuous growth model reaches a tenfold factor at that time; with whole discrete steps, it first exceeds ten after six steps. ## Test yourself -1. Find a base other than 2 where the curve still reads exactly 3 somewhere — more than one answer works. -2. Make the curve read exactly -1. -3. Set the base to 3, then find the x where the curve reads exactly 2 — the point where two triplings land. +1. Choose a base more than 0.1 away from 2 and set x within 0.1 of its cube. +2. Choose settings that give a logarithm within 0.02 of -1. +3. Set b to 3 and find an input giving an output approximately 2. ## Intuition -A bacteria colony doubles in size every hour. After 3 hours it has grown 8-fold — 2 doubled three times is 8. The curve on this screen answers the reverse question: given that the colony is now 8 times bigger, drag x to 8 and read the height of the curve — it lands on 3, the number of doubling hours that must have passed. Compare it with the dashed curve below, $b^x$: the two curves are mirror images of each other, because one undoes exactly what the other does. +Two cubed equals eight. The power calculation starts with the base and exponent and finds the result. A logarithm reverses the question: knowing the base is 2 and the result is 8, what was the exponent? It was 3. -Raise the base b and the curve flattens: reaching the same height now needs a far bigger x, because a bigger base reaches any given multiple faster — tripling gets you further per step than doubling does. Whatever the base, the curve always crosses zero at x = 1, since raising any base to the power 0 always gives 1. +A negative answer is possible even though the input must be positive. A result of one half requires exponent -1 for base 2. An input of 1 always requires exponent zero. Values between these examples can require fractional exponents. + +The base slider here stays above 1. For a fixed input greater than 1, increasing the base reduces the required exponent: larger multiplication steps reach the same target in fewer steps. For inputs between zero and one, consider the negative exponent explicitly rather than assuming every output decreases. ## Formal -$y = \log_b x$ is defined for $x > 0$ as the unique $y$ with $b^y = x$ ($b > 0$, $b \ne 1$); it is the inverse function of $b^x$. +The statement $y=\log_b x$ means $b^y=x$, where x is positive, b is positive and b differs from 1. The logarithm returns the unique exponent y. -$\log_b(xy) = \log_b x + \log_b y$ and $\log_b(x^p) = p\log_b x$. +For positive x and z, $\log_b(xz)=\log_b x+\log_b z$. For real p and positive x, $\log_b(x^p)=p\log_b x$. These laws come from multiplying powers and raising powers to another power. ## Advanced -Because $\log_b x = \ln x / \ln b$, every logarithm is a rescaling of the natural log; this is why calculators need only implement one logarithm and derive the rest, and why $d(\log_b x)/dx = 1/(x\ln b)$ carries an extra factor compared to the natural log. +The change-of-base identity is $\log_b x=\ln x/\ln b$. It lets a calculator evaluate another base using natural logarithms. Base 1 is excluded because its natural logarithm is zero, and because every power of 1 has the same value. ## Derivation -1. Definition: $y$ is the exponent that turns $b$ into $x$. -2. Exponent addition corresponds to multiplying the outputs. -3. Taking logs turns multiplication into addition. +1. Name the exponent y that makes b raised to y equal x. +2. Add two such exponents. The power rule shows that the corresponding outputs multiply. +3. Applying the logarithm converts that product back into the sum of the two exponents. ## Real world -### pH and the Richter scale -Both are base-10 logarithms of a quantity that spans many orders of magnitude, compressed into a manageable range. +### Growth steps + +A logarithm can solve for the number of repeated multiplication steps needed to reach a target ratio. + +### Information -### Decibels -Sound intensity is perceived roughly logarithmically, so loudness is measured in a log scale. +For N equally likely alternatives, log base 2 of N measures the information in bits. A fixed-length binary code needs a whole number of bits, rounded up if necessary. -### Information theory -The number of bits needed to encode $N$ equally likely messages is $\log_2 N$. +### Comparing scales -### Solving for time in growth models -Doubling time or half-life comes from taking a logarithm of an exponential equation. +Logarithmic axes represent equal ratios by equal distances. Always check the base and the meaning of the plotted quantity. From 211d1fa66e43f30b968d7e4840b227d49e3bcfd7 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:28:32 +0300 Subject: [PATCH 008/124] content: rewrite matrices-as-transformations for first-time learners in both languages --- .../algebra/matrices-as-transformations/ar.md | 54 +++++++++--------- .../algebra/matrices-as-transformations/en.md | 55 +++++++++---------- 2 files changed, 52 insertions(+), 57 deletions(-) diff --git a/content/lessons/algebra/matrices-as-transformations/ar.md b/content/lessons/algebra/matrices-as-transformations/ar.md index 84dbaeba..e8fa9bd2 100644 --- a/content/lessons/algebra/matrices-as-transformations/ar.md +++ b/content/lessons/algebra/matrices-as-transformations/ar.md @@ -1,8 +1,6 @@ --- title: 'المصفوفات: آلة تحرّك المستوى كله' -summary: >- - جدول أرقام صغير يحرّك كل نقاط الصورة دفعة واحدة. هكذا تُدار الأيقونات وتُكبَّر الصور - وتتحرك رسوم الأبعاد الثلاثة. +summary: 'افهم المصفوفة ذات الصفين والعمودين بتتبع موضعي سهمي الوحدة بعد التحويل.' parameters: a: المصفوفة، الصف 1 والعمود 1 b: المصفوفة، الصف 1 والعمود 2 @@ -19,54 +17,54 @@ variables: ## Try it -1. اسحب a وb وc وd واحدًا تلو الآخر وراقب الشبكة تتمدّد أو تميل أو تدور. -2. راقب السهم البرتقالي (vx وvy) يتحرك مع الشبكة. يتبع هذا السهم دائمًا القاعدة نفسها التي تتبعها كل نقطة أخرى. -3. جرّب a=0 وb=-1 وc=1 وd=0، وشاهد الشبكة كلها تدور ربع دورة بالضبط. +1. اضبط a = 1 وb = 0 وc = 0 وd = 1. يتطابق كل سهم مدخل مع صورته بعد التحويل. +2. غيّر a إلى 2. يصبح سهم الوحدة الأفقي (2, 0)، ويبقى الرأسي (0, 1). تتضاعف جميع الإحداثيات الأفقية. +3. اضبط a = 0 وb = -1 وc = 1 وd = 0. يدور كل متجه ربع دورة عكس عقارب الساعة. ## Real-life examples -1. **تمديد صورة.** حين تضاعف عرض صورة وتُبقي ارتفاعها كما هو (a=2, b=0, c=0, d=1)، تمتد كل نقطة جانبيًا، وتبقى الخطوط الرأسية رأسية كما هي. -2. **تدوير أيقونة.** حين تدوّر أيقونة ربع دورة (a=0, b=-1, c=1, d=0)، تنتقل النقطة (1,0) إلى الأعلى مباشرة، وتنتقل (0,1) إلى اليسار. -3. **إمالة نص إلى الخط المائل.** حين تطبّق تحويل قص على نص (a=1, b=0.5, c=0, d=1)، تميل كل نقطة جانبيًا بمقدار يكبر مع الارتفاع، فتتحوّل الحروف المستقيمة إلى حروف مائلة. +1. **تمديد العرض.** المصفوفة ذات a = 2 وd = 1 وb = c = 0 تضاعف الإحداثيات الأفقية وتترك الرأسية كما هي. +2. **تدوير شكل.** المصفوفة ذات a = d = 0 وb = -1 وc = 1 تنقل (1, 0) إلى الأعلى و(0, 1) إلى اليسار. +3. **إمالة شكل.** عند a = d = 1 وb = 0.5 وc = 0، تتحرك كل نقطة أفقيًا بمقدار نصف ارتفاعها. تميل بذلك الحواف الرأسية. ## Test yourself -1. اجعل محدّد التحويل -1 بالضبط، فيقلب المستوى كالمرآة دون أن يغيّر أي مساحة. -2. اجعل السهم الأساسي الأول، أي موضع النقطة (1,0) بعد التحويل، يبعد 3 وحدات بالضبط عن المركز. -3. جد متجهًا ومصفوفة بحيث يقف المتجه على بعد 10 وحدات بالضبط من المركز بعد التحويل. +1. اجعل المحدد قريبًا من -1. يحافظ ذلك على مقادير المساحات ويعكس الاتجاه، لكنه لا يشترط انعكاسًا مرآتيًا خالصًا. +2. اجعل طول سهم الوحدة الأول بعد التحويل، وهو (a, c)، قريبًا من 3. +3. اختر مصفوفة ومتجه مدخل ليكون طول المتجه المحول قريبًا من 10. استخدم قراءات الإحداثيات إذا خرج رأسه عن النافذة. ## Intuition -دوّر أيقونة هاتف ربع دورة حين تميل الشاشة، فتتحرك كل بكسل من تلك الأيقونة إلى موضع جديد دفعة واحدة، وفق القاعدة نفسها. تلك القاعدة هي مصفوفة، والشبكة التي تراها هنا تُظهر تأثيرها في المستوى كله. تبقى خطوطها مستقيمة ومتباعدة بانتظام، لكنها تتمدّد أو تميل أو تدور حين تسحب a وb وc وd. +نبدأ بسهم وحدة إلى اليمين وآخر إلى الأعلى. تحدد المصفوفة ذات الصفين والعمودين نهايتيهما الجديدتين. يخبرنا العمود الأول، (a, c)، إلى أين يذهب السهم الأيمن. ويخبرنا الثاني، (b, d)، إلى أين يذهب السهم العلوي. -كل ما تفعله المصفوفة يقرّره سهمان فقط، هما أين تحطّ النقطة (1, 0) وأين تحطّ النقطة (0, 1). وهذان الموضعان هما عمودا المصفوفة بالضبط. اسحب العمود a وc فتحرّك السهم الأول، واسحب العمود b وd فتحرّك السهم الثاني. وكل نقطة أخرى في المستوى، بما فيها السهم البرتقالي الذي يحدده vx وvy، تتحرك بالتوليفة نفسها من هذين السهمين. +يستخدم المتجه (2, 3) نسختين من سهم الوحدة الأول وثلاثًا من الثاني. تستخدم صورته نسختين من العمود الأول وثلاثًا من الثاني. تتبع الشبكة والسهم المختار القاعدة نفسها؛ السهم المتقطع هو المدخل، والمتصل المسمى Mv هو صورته. ## Formal -لأي متجه $\mathbf{v} = (v_x, v_y)$ تكون صورته بعد المصفوفة $M\mathbf{v} = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\begin{pmatrix} v_x \\ v_y \end{pmatrix} = \begin{pmatrix} a v_x + b v_y \\ c v_x + d v_y \end{pmatrix}$. +لمتجه المدخل $\mathbf{v}=(v_x,v_y)$، يكون الناتج $M\mathbf{v}=(av_x+bv_y,cv_x+dv_y)$. يجمع كل إحداثي ناتج مركبتي المدخل باستخدام صف من المصفوفة. -يصحّ هذا لأن $\mathbf{v}$ نفسه توليفة من الاتجاهين الأساسيين، فتكون صورته التوليفة نفسها من صورتيهما، أي عمودي المصفوفة. +هذا التحويل خطي؛ يحافظ على جمع المتجهات وضربها في أعداد. وبوجه خاص، يترك نقطة الأصل ثابتة. لا يمكن تمثيل إزاحة المستوى كله بهذه القاعدة ذات الصفين والعمودين وحدها. ## Advanced -بما أن $M\mathbf{v}$ خطّي في $\mathbf{v}$، فكل مصفوفة يحدّدها تمامًا موضع متجهين فقط بعد التحويل. جرّب القيم المقترحة للدوران والقصّ والتحجيم: الدوران بزاوية 90° هو $\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}$، وتركيب مصفوفتين، أي تطبيق إحداهما بعد الأخرى، هو بالضبط ضرب المصفوفات. +يتحدد التحويل الخطي في بعدين بصورتي أي متجهي أساس مستقلين خطيًا، وليس أي زوج عشوائي. تطبيق تحويلين خطيين بالتتابع يقابل ضرب مصفوفتَيهما، وتعمل المصفوفة الواقعة إلى اليمين أولًا. ## Derivation -1. العمودان هما موضعا المتجهين الأساسيين بعد التحويل. -2. أي متجه توليفة من هذين المتجهين الأساسيين. -3. فصورته إذن التوليفة نفسها من العمودين. +1. نقرأ صورتي متجهي الوحدة من العمودين. +2. نكتب المدخل مجموعًا لمتجهي الوحدة بعد ضرب كل منهما في معامل. +3. نستخدم الخطية للحصول على المجموع نفسه، مع استبدال متجهي الوحدة بعمودي المصفوفة. ## Real world -### الرسوميات الحاسوبية -تدوّر شكلًا على الشاشة أو تحجّمه أو تحرّفه بضرب مصفوفة واحدة في كل نقطة من نقاطه. +### الرسوم -### الروبوتات -يدوّر كل مفصل في ذراع الروبوت إطار إحداثيات. اضرب المصفوفات معًا لتحصل على موضع اليد بالنسبة للقاعدة. +يمكن للمصفوفة تدوير إحداثيات شكل حول الأصل أو تمديدها أو إمالتها. تحتاج الإزاحة إلى مقدار إضافي أو تمثيل أكبر. -### ضغط الصور -تطبّق تقنيات مثل JPEG مصفوفة تحويل ثابتة على كتل من البكسلات، ثم تحذف أقل الاتجاهات أهمية. +### الإحداثيات -### الاقتصاد -تحوّل مصفوفة المدخلات والمخرجات متجه الموارد الخام إلى متجه من السلع النهائية. +تحول المصفوفات مركبات المتجه بين أسس إحداثية مناسبة. + +### العمليات المتتابعة + +يجمع ضرب مصفوفات التحويل عدة تغييرات خطية متتالية في قاعدة واحدة. diff --git a/content/lessons/algebra/matrices-as-transformations/en.md b/content/lessons/algebra/matrices-as-transformations/en.md index b3917a1a..34b6bec6 100644 --- a/content/lessons/algebra/matrices-as-transformations/en.md +++ b/content/lessons/algebra/matrices-as-transformations/en.md @@ -1,9 +1,6 @@ --- title: Matrices as transformations -summary: >- - See a grid of numbers as a machine that moves every point on the plane at - once — the idea behind rotating icons, resizing photos, and animating 3-D - graphics. +summary: 'Understand a two-by-two matrix by following where it sends two unit arrows.' parameters: a: matrix row 1, column 1 b: matrix row 1, column 2 @@ -20,54 +17,54 @@ variables: ## Try it -1. Drag a, b, c and d one at a time and watch the grid stretch, tilt, or spin. -2. Watch the orange arrow (vx, vy) move along with the grid — it always follows the same rule as every other point. -3. Try a=0, b=-1, c=1, d=0 and see the whole grid spin exactly a quarter turn. +1. Set a = 1, b = 0, c = 0 and d = 1. Every input arrow overlaps its transformed arrow. +2. Change a to 2. The horizontal unit arrow becomes (2, 0), while the vertical unit arrow stays (0, 1). Every horizontal coordinate doubles. +3. Set a = 0, b = -1, c = 1 and d = 0. The transformation rotates every vector a quarter turn counterclockwise. ## Real-life examples -1. **Stretching a photo.** Doubling an image's width while keeping its height the same (a=2, b=0, c=0, d=1) stretches every point sideways, leaving vertical lines vertical. -2. **Rotating an icon.** Spinning an icon a quarter turn (a=0, b=-1, c=1, d=0) sends the point (1,0) straight up and (0,1) to the left. -3. **Slanting text into italics.** A shear (a=1, b=0.5, c=0, d=1) tilts every point sideways by an amount that grows with height, turning upright letters into italics. +1. **Stretching width.** The matrix with a = 2, d = 1 and b = c = 0 doubles horizontal coordinates while keeping vertical coordinates unchanged. +2. **Rotating a shape.** The matrix with a = d = 0, b = -1 and c = 1 sends (1, 0) upwards and (0, 1) leftwards. +3. **Shearing a shape.** With a = d = 1, b = 0.5 and c = 0, each point shifts horizontally by half its height. This slants vertical edges. ## Test yourself -1. Make the transformation's determinant exactly -1: it should flip the plane like a mirror without changing any area. -2. Make the first basis arrow — where (1,0) lands — end up exactly 3 units from the center. -3. Find a vector and a matrix so that the vector lands exactly 10 units from the center after the transformation. +1. Make the determinant approximately -1. This preserves area magnitudes and reverses orientation, but need not be a pure reflection. +2. Make the first transformed unit arrow, (a, c), have length approximately 3. +3. Choose a matrix and input vector whose transformed length is approximately 10. Use the coordinate readouts if the tip is outside the window. ## Intuition -Rotate a phone icon a quarter turn when you tilt your screen, and every pixel of that icon moves to a new spot at once, all by the same rule. That rule is a matrix, and the grid you see here shows it acting on the whole plane: its lines stay straight and evenly spaced, but they stretch, tilt, or spin as you drag a, b, c and d. +Begin with an arrow one unit right and another one unit up. A two-by-two matrix specifies their new endpoints. Its first column, (a, c), tells where the rightward arrow goes. Its second column, (b, d), tells where the upward arrow goes. -Everything the matrix does is decided by just two arrows: where the point (1, 0) lands, and where the point (0, 1) lands. Those two landing spots are exactly the matrix's columns — drag column a, c and you move the first arrow; drag column b, d and you move the second. Every other point in the plane, including the orange vector defined by vx and vy, moves by the same combination of those two arrows. +A vector such as (2, 3) uses two copies of the first unit arrow and three of the second. Its transformed vector uses two copies of the first column and three of the second. The grid and the selected arrow follow this same rule; the dashed arrow is the input and the solid arrow labelled Mv is its image. ## Formal -For any vector $\mathbf{v} = (v_x, v_y)$, the image under the matrix is $M\mathbf{v} = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\begin{pmatrix} v_x \\ v_y \end{pmatrix} = \begin{pmatrix} a v_x + b v_y \\ c v_x + d v_y \end{pmatrix}$. +For an input vector $\mathbf{v}=(v_x,v_y)$, the output is $M\mathbf{v}=(av_x+bv_y,cv_x+dv_y)$. Each output coordinate combines the input components using one matrix row. -This works because $\mathbf{v}$ is itself a combination of the two basis directions, so its image is the same combination of their two images, the matrix's columns. +This map is linear: it preserves vector addition and scalar multiplication. In particular, it keeps the origin fixed. A translation of the whole plane cannot be represented by this two-by-two rule alone. ## Advanced -Because $M\mathbf{v}$ is linear in $\mathbf{v}$, every matrix is fully determined by where it sends just two vectors. Try the values suggested for rotation, shear and scaling: a rotation by 90° is $\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}$, and composing two matrices, applying one after the other, is exactly matrix multiplication. +A linear map in two dimensions is determined by its action on any two linearly independent basis vectors, not by any arbitrary pair. Applying two linear maps in sequence corresponds to matrix multiplication, with the rightmost matrix acting first. ## Derivation -1. The two columns are where the two basis vectors land. -2. Any vector is a combination of those two basis vectors. -3. So its image is the same combination of the two columns. +1. Read the images of the two unit vectors from the columns. +2. Express the input as a sum of scaled unit vectors. +3. Apply linearity to obtain the same sum of scaled columns. ## Real world -### Computer graphics -Rotating, scaling and skewing a shape on screen is one matrix multiplication applied to every one of its points. +### Graphics -### Robotics -A robot arm's joints each rotate a coordinate frame; multiplying the matrices together gives the hand's position from the base. +A matrix can rotate, stretch or shear coordinates of a shape around the origin. Translation needs an additional offset or a larger representation. -### Image compression -Techniques like JPEG apply a fixed transformation matrix to blocks of pixels before discarding the least important directions. +### Coordinates -### Economics -An input-output matrix transforms a vector of raw resources into a vector of finished goods. +Matrices convert vector components between suitable coordinate bases. + +### Repeated operations + +Multiplying transformation matrices combines successive linear changes into one rule. From f296d8e08aefe40265595df2131b60e89a339011 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:28:32 +0300 Subject: [PATCH 009/124] content: rewrite percent-and-compound-growth for first-time learners in both languages --- .../algebra/percent-and-compound-growth/ar.md | 66 +++++++++---------- .../algebra/percent-and-compound-growth/en.md | 66 +++++++++---------- 2 files changed, 64 insertions(+), 68 deletions(-) diff --git a/content/lessons/algebra/percent-and-compound-growth/ar.md b/content/lessons/algebra/percent-and-compound-growth/ar.md index ea039c27..664a59f4 100644 --- a/content/lessons/algebra/percent-and-compound-growth/ar.md +++ b/content/lessons/algebra/percent-and-compound-growth/ar.md @@ -1,68 +1,66 @@ --- title: 'النسبة المئوية والنمو المركّب' -summary: >- - النسبة نفسها، إن تكررت، تتدحرج ككرة الثلج أسرع مما تتوقع. هذه قوة المدخرات والديون - والتضخم. +summary: 'طبق النسبة نفسها على المبلغ المحدّث كل فترة، وقارن النمو بالتناقص.' parameters: - P: المبلغ الابتدائي P - rate: المعدل لكل فترة (%) - x: عدد الفترات + P: 'المقدار الابتدائي P' + rate: 'نسبة التغير لكل فترة (%)' + x: 'عدد الفترات المنقضية x' variables: - - المبلغ الابتدائي - - النسبة المئوية التي تتغيّر بها القيمة كل فترة - - عدد الفترات المنقضية + - 'مقدار البداية بالوحدة المختارة' + - 'النسبة المئوية المطبقة على المقدار الأحدث كل فترة' + - 'عدد الفترات المنقضية' --- ## Try it -1. اسحب x للأمام سنة واحدة في كل مرة وراقب المماس يزداد انحدارًا. -2. ارفع «المعدل» فوق الصفر وراقب المنحنى ينحني للأعلى بسرعة متزايدة. -3. ادفع «المعدل» إلى قيمة سالبة وراقب المنحنى يتسطح نحو الصفر بدلًا من ذلك، دون أن يصله تمامًا. +1. اضبط P على 4 وrate على 8. قارن x = 0 و1 و2؛ المقادير 4 و4.32 و4.6656. تُحسب كل زيادة من المقدار الأحدث. +2. اضبط x على 8. المقدار نحو 7.40، وما زال أقل من ضعف البداية. +3. اضبط P على 10 وrate على -15. عند x = 1 يكون المقدار 8.5، وعند x = 2 يكون 7.225. نسبة النقص ثابتة، لكن المقدار المفقود يقل. ## Real-life examples -1. **حساب توفير.** 4000 ريال تنمو بفائدة 8% سنويًا (P=4, rate=8): بعد 8 سنوات يتجاوز الرصيد ضعف قيمته الأصلية. -2. **دين بطاقة ائتمان.** 2000 ريال من الدين ينمو بمعدل قاسٍ قدره 20% سنويًا إن تُرك دون سداد (P=2, rate=20): بعد 5 سنوات يقترب من ثلاثة أمثاله. -3. **إهلاك سيارة.** سيارة بقيمة 10000 ريال تفقد 15% من قيمتها كل عام (P=10, rate=-15): بعد 5 سنوات تصبح قيمتها أقل من النصف. +1. **نمو افتراضي.** البدء من 4 والنمو بنسبة 8% كل فترة يعطيان نحو 7.40 بعد 8 فترات. إذا كانت الوحدة ألفًا، فذلك نحو 7404، وليس الضعف 8000. +2. **نمو أسرع.** البدء من 2 والنمو بنسبة 20% كل فترة يعطيان نحو 4.98 بعد 5 فترات، أي نحو 2.49 مرة المقدار الأصلي. +3. **نقص قيمة افتراضي.** البدء من 10 وفقدان 15% كل فترة يتركان نحو 4.44 بعد 5 فترات. هذه أمثلة بمعدلات ثابتة، وليست تنبؤات بقيمة أصل معين. ## Test yourself -1. مع 4000 ريال تنمو بمعدل 8% سنويًا، جد كم سنة يلزم لتجاوز 8000 ريال، أي مضاعفة المبلغ. -2. اجعل المبلغ الابتدائي 10 والمعدل -20%، ثم جد كم سنة يلزم ليهبط المبلغ دون 1، أي خسارة 90%. -3. جد معدلًا أقل من 15% وعدد سنوات كافيًا بحيث يتجاوز المبلغ ضعف قيمته الأصلية. +1. اضبط P على 4 وrate على 8، ثم أوجد زمنًا يصبح عنده المقدار قريبًا من 8. +2. اضبط P على 10 وrate على -20، ثم اجعل المقدار أقل من 1. +3. اختر معدلًا أكبر من 1% وأقل من 15%، وعدد فترات يكفي لتجاوز ضعف البداية. ## Intuition -ضع 4000 ريال في حساب توفير بفائدة 8% سنويًا، وبعد سنة واحدة يصبح معك 4320 ريالًا، أي 8% من 4000. لكن فائدة السنة التالية لا تُحسب من المبلغ الأصلي 4000، بل من المبلغ الجديد الأكبر 4320، فتربح 345.60 ريالًا، أكثر قليلًا من المرة السابقة. اسحب x للأمام سنة واحدة في كل مرة وراقب المماس الصغير على المنحنى يزداد انحدارًا مع كل خطوة. هذا الازدياد هو بالضبط هذا التراكم، أي نمو يتغذى على مجموع نما بالفعل. +ابدأ من 100 وأضف 10% كل فترة. الزيادة الأولى 10، فيصبح المبلغ 110. والزيادة الثانية 11، فيصبح 121. تبقى النسبة نفسها، لكنها تُحسب من مبلغ جديد كل مرة. هذا هو النمو المركب. -اجعل الآن المعدل سالبًا فيتحول المنحنى إلى اضمحلال: سيارة بقيمة 10000 ريال تفقد 15% من قيمتها كل عام تصبح قيمتها 8500 ريال بعد سنة واحدة، ثم تفقد 15% من هذا المبلغ الأصغر في السنة التالية، فتستمر الكمية المفقودة كل عام بالتناقص أيضًا. ينخفض المنحنى بسرعة في البداية ثم يتسطح، ولا يصل إلى الصفر تمامًا أبدًا، وهو الشكل نفسه الذي يتبعه الاضمحلال الإشعاعي. +للنقصان بنسبة 10%، نضرب في 0.9 بدلًا من ذلك. البداية 100 تصبح 90 ثم 81. الخسارة الثانية 9 وليست 10 لأنها حُسبت من مبلغ أصغر. يصل الرسم بين قيم الفترات بسلاسة؛ الفترات الكسرية امتداد للنموذج، ولا تمثل بالضرورة مواعيد دفع أو تحديث فعلية. ## Formal -بعد $x$ فترة، $A(x) = P(1 + \text{rate}/100)^x$. عامل النمو لكل فترة ثابت، وهو $(1+\text{rate}/100)$، لا مقدار الزيادة. +بعد x من الفترات الكاملة، يكون $A(x)=P(1+\text{rate}/100)^x$. نكرر عامل الضرب نفسه. إذا كان مقدار البداية موجبًا والمعدل أكبر من -100%، يبقى العامل موجبًا وتبقى النتيجة موجبة. -من أجل معدلات صغيرة وعدد كبير من فترات التراكم، يقترب هذا من النمو الأسي المتصل $Pe^{kx}$ حيث $k \approx \text{rate}/100$. +لـx الحقيقي، يساوي التعبير نفسه $Pe^{kx}$ بدقة عندما يكون $k=\ln(1+\text{rate}/100)$. للمعدلات الصغيرة، يكون k قريبًا من المعدل مقسومًا على 100، لكن هذا التقريب قد لا يظل دقيقًا خلال زمن طويل. ## Advanced -التراكم $m$ مرة في السنة بمعدل سنوي اسمي $\rho$ يعطي $(1 + \rho/m)^{m}$ في السنة. ومع $m \to \infty$ يميل هذا إلى $e^{\rho}$ بموجب التعريف المعياري لـ $e$ كنهاية، وهذا بالضبط الجسر بين النمو المركب هنا والدالة الأسية المتصلة في دروس التفاضل والتكامل. +تقسيم معدل سنوي اسمي على فترات تراكم أكثر تكرارًا يؤدي إلى نموذج حدي آخر. عند مقارنة الجداول، حافظ على توافق المعدل لكل فترة مع عدد الفترات. التغير المئوي الثابت وحده لا يشمل الإضافات أو السحوبات أو الرسوم أو تغير المعدلات أو محدودية الموارد. ## Derivation -1. فترة واحدة تُضرب في عامل النمو. -2. كل فترة تُضرب مرة أخرى في العامل نفسه، لا تضيف المقدار نفسه. -3. بعد $x$ فترة يكون العامل قد طُبِّق $x$ مرة. +1. نضيف النسبة المختارة من المقدار الابتدائي، أو نضربه مباشرة في عامل الفترة. +2. نطبق العامل نفسه على المقدار الجديد لحساب الفترة الثانية. +3. تكرار الضرب x مرة يعطي صيغة القوة للفترات الكاملة. ## Real world -### المدخرات والديون -الفائدة المركبة هي بالضبط هذه الصيغة، سواء لصالحك في المدخرات أو ضدك في ديون بطاقات الائتمان. +### تغير الأسعار المتكرر -### التضخم -ارتفاع الأسعار بنسبة ثابتة سنويًا يتراكم، فتتآكل القوة الشرائية أسرع مما يوحي به التقدير الخطي البسيط. +تستخدم التغيرات المئوية المتساوية المتتابعة السعر المحدّث كل مرة. لا يكون التغير النهائي عادة مجرد مجموع النسب. -### نمو السكان والانتشار الفيروسي -مجتمع ينمو بنسبة ثابتة كل جيل يتبع قانون التراكم نفسه الذي تتبعه الأموال. +### نماذج السكان -### الإهلاك -سيارة تفقد نسبة ثابتة من قيمتها كل عام مثال على الاضمحلال المركب، بمعدل سالب. +تعطي نسبة ثابتة لكل جيل هذا المنحنى فقط ما دام افتراض المعدل الثابت مناسبًا. + +### نماذج انخفاض القيمة + +إنقاص نسبة ثابتة من القيمة المتبقية كل فترة يعطي تناقصًا مركبًا. أسعار البيع الفعلية قد لا تتبع هذا النموذج بدقة. diff --git a/content/lessons/algebra/percent-and-compound-growth/en.md b/content/lessons/algebra/percent-and-compound-growth/en.md index 18ce7c60..12d6fb38 100644 --- a/content/lessons/algebra/percent-and-compound-growth/en.md +++ b/content/lessons/algebra/percent-and-compound-growth/en.md @@ -1,68 +1,66 @@ --- title: Percent change and compound growth -summary: >- - Learn why the same percentage, applied again and again, snowballs faster - than simple math suggests — the force behind savings, debt, and inflation. +summary: 'Apply the same percentage to the updated amount each period and compare growth with decay.' parameters: - P: starting amount P - rate: rate per period (%) - x: number of periods + P: 'starting amount P' + rate: 'percentage change per period (%)' + x: 'elapsed periods x' variables: - - starting amount - - percent change applied each period - - number of periods elapsed + - 'starting amount in the chosen units' + - 'percentage change applied to the latest amount each period' + - 'number of elapsed periods' --- ## Try it -1. Drag x forward one year at a time and watch the tangent line get steeper. -2. Raise "rate" above zero and watch the curve bend upward faster and faster. -3. Push "rate" negative and watch the curve flatten toward zero instead, without ever quite reaching it. +1. Set P to 4 and rate to 8. Compare x = 0, 1 and 2: the amounts are 4, 4.32 and 4.6656. Each increase is calculated from the latest amount. +2. Set x to 8. The amount is about 7.40, still less than twice the starting value. +3. Set P to 10 and rate to -15. At x = 1 the amount is 8.5; at x = 2 it is 7.225. The percentage loss is fixed, but the amount lost decreases. ## Real-life examples -1. **Savings account.** 4,000 dollars growing at 8% interest per year (P=4, rate=8): after 8 years the balance has more than doubled. -2. **Credit card debt.** 2,000 dollars in debt growing at a brutal 20% per year if left unpaid (P=2, rate=20): after 5 years it has nearly tripled. -3. **Car depreciation.** A 10,000-dollar car losing 15% of its value every year (P=10, rate=-15): after 5 years it is worth less than half. +1. **Illustrative growth.** Starting at 4 and growing 8% each period gives about 7.40 after 8 periods. If the units are thousands, that represents about 7404, not a doubled 8000. +2. **Faster growth.** Starting at 2 and growing 20% each period gives about 4.98 after 5 periods, approximately 2.49 times the start. +3. **Illustrative depreciation.** Starting at 10 and losing 15% each period leaves about 4.44 after 5 periods. These are fixed-rate examples, not predictions for a particular asset. ## Test yourself -1. With 4,000 dollars growing at 8% per year, find how many years it takes to pass 8,000 dollars — doubling your money. -2. Set the starting amount to 10 and the rate to -20%, then find how many years it takes to fall under 1 — a 90% loss. -3. Find a growth rate under 15% and enough years so the amount more than doubles. +1. Set P to 4 and rate to 8, then find a time when the amount is approximately 8. +2. Set P to 10 and rate to -20, then make the amount less than 1. +3. Choose a rate greater than 1% and less than 15%, with enough periods to more than double the amount. ## Intuition -Put 4,000 dollars in a savings account earning 8% a year, and after one year you have 4,320 dollars — 8% of 4,000. The next year's 8%, though, is not measured against that original 4,000; it is measured against the new, larger 4,320, so you earn 345.60 dollars, a little more than before. Drag x forward one year at a time and watch the little tangent line on the curve get steeper each step — that steepening is this snowball: growth feeding on an already-grown total. +Start with 100 and add 10% each period. The first addition is 10, giving 110. The second is 11, giving 121. The percentage stays the same, but it applies to a new amount each time. This is compound growth. -Now set the rate negative and the curve turns into decay: a car worth 10,000 dollars losing 15% of its value every year is worth 8,500 dollars after one year, then loses 15% of that smaller number next — so the amount lost each year keeps shrinking too. The curve falls fast at first, then flattens, and it never quite reaches zero, the same shape radioactive decay follows. +For a 10% decrease, multiply by 0.9 instead. Starting from 100 gives 90 and then 81. The second loss is 9 rather than 10 because it is calculated from a smaller amount. The graph connects period values smoothly; fractional periods represent an extension of the model, not necessarily the timing of actual payments or updates. ## Formal -After $x$ periods, $A(x) = P(1 + \text{rate}/100)^x$; the growth factor per period is constant, $(1+\text{rate}/100)$, not the increment. +After x whole periods, $A(x)=P(1+\text{rate}/100)^x$. The same factor is applied repeatedly. With a positive starting amount and rate greater than -100%, the factor is positive and the result remains positive. -For small rates and many compounding periods this approaches continuous exponential growth $Pe^{kx}$ with $k \approx \text{rate}/100$. +For real x, the same expression equals $Pe^{kx}$ exactly when $k=\ln(1+\text{rate}/100)$. For small rates, k is approximately rate divided by 100; that approximation need not stay accurate over a long time. ## Advanced -Compounding $m$ times a year at nominal annual rate $\rho$ gives $(1 + \rho/m)^{m}$ per year; as $m \to \infty$ this tends to $e^{\rho}$ by the standard limit definition of $e$, which is exactly the bridge between compound growth here and the continuous exponential in the calculus lessons. +A nominal annual rate split into increasingly frequent compounding intervals gives a separate limiting model. Keep the rate per interval and number of intervals consistent when comparing schedules. Fixed percentage change alone does not account for deposits, withdrawals, fees, changing rates or resource limits. ## Derivation -1. One period multiplies by the growth factor. -2. Each period multiplies again by the same factor — not adding the same amount. -3. After $x$ periods the factor has been applied $x$ times. +1. Add the chosen percentage of the starting amount, or equivalently multiply by the per-period factor. +2. Apply the same factor to the new amount for the second period. +3. Repeating the multiplication x times gives the power formula for whole periods. ## Real world -### Savings and debt -Compound interest is exactly this formula, for good (savings) or ill (credit card debt). +### Repeated price changes -### Inflation -Prices rising a fixed percent per year compound, so purchasing power erodes faster than a straight-line estimate suggests. +Successive equal percentage changes use the updated price each time. The final change is not generally the sum of the percentages. -### Population and viral growth -A population growing a fixed percent per generation follows the same compounding law as money. +### Population models -### Depreciation -A car losing a fixed percent of its value each year is compound decay — rate negative. +A fixed percentage per generation produces this curve only while the fixed-rate assumption remains suitable. + +### Depreciation models + +Reducing the remaining value by a fixed percentage each period gives compound decay. Real resale values need not follow it exactly. From dea9549cec12a596a6ba5f628913b4e0d068fd5c Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:28:32 +0300 Subject: [PATCH 010/124] content: rewrite powers-of-complex-numbers for first-time learners in both languages --- .../algebra/powers-of-complex-numbers/ar.md | 54 +++++++++--------- .../algebra/powers-of-complex-numbers/en.md | 55 +++++++++---------- 2 files changed, 52 insertions(+), 57 deletions(-) diff --git a/content/lessons/algebra/powers-of-complex-numbers/ar.md b/content/lessons/algebra/powers-of-complex-numbers/ar.md index 9dd7a660..adc8654f 100644 --- a/content/lessons/algebra/powers-of-complex-numbers/ar.md +++ b/content/lessons/algebra/powers-of-complex-numbers/ar.md @@ -1,8 +1,6 @@ --- title: 'قوى الأعداد المركّبة' -summary: >- - اضرب نقطة في نفسها مرة بعد مرة، فتلولب مبتعدة أو مقتربة أو تدور على محيط ثابت. من - هنا تولد الأشكال الكسيرية. +summary: 'تابع الضرب المركب المتكرر من خلال الزاوية والبعد عن الأصل عند كل قوة.' parameters: a: العدد، الجزء الحقيقي b: العدد، الجزء التخيّلي @@ -12,54 +10,54 @@ variables: [] ## Try it -1. ارفع n وراقب أثر النقاط يتحلزن، نقطة واحدة لكل قوة. -2. اسحب نقطة البداية إلى خارج دائرة الوحدة (المرسومة متقطّعة) وراقب التحلزن يطير إلى الخارج. -3. أعدها إلى داخل الدائرة بدلًا من ذلك وراقب التحلزن يضيق نحو المركز. +1. اضبط a = 0 وb = 1. ارفع n من 1 إلى 4. القوى هي i ثم -1 ثم -i ثم 1، فتكتمل دورة واحدة. +2. اضبط a = 1.1 وb = 0.3. يتجاوز المقدار 1، ولذلك تبتعد القوى عن الأصل تدريجيًا كلما زاد n. +3. اضبط a = 0.5 وb = 0.2. المقدار أقل من 1، فتقترب القوى من الأصل. اقرأ الإحداثيات حين تتقارب النقاط ويصعب تمييزها. ## Real-life examples -1. **مدار دائري تمامًا.** نقطة تبعد وحدة واحدة بالضبط عن المركز (a=0.6, b=0.8) ترسم دائرة كاملة مع تكرار زاويتها. بعد n=4 خطوات تكون قد دارت ربع دورة كاملة، دون أن تكبر أو تصغر. -2. **حدود شكل كسيري يتمدّد.** نقطة خارج دائرة الوحدة بقليل (a=1.1, b=0.3) تتحلزن إلى الخارج كلما رفعت القوة. بعد n=8 خطوات تكون قد ابتعدت كثيرًا عن المركز، وهو اختبار الهروب المستخدم لرسم مجموعة ماندلبروت. -3. **وتر غيتار مخمَّد.** نقطة داخل دائرة الوحدة بقليل (a=0.5, b=0.2) تتحلزن إلى الداخل، فتفقد قليلًا من المسافة كل خطوة. بعد n=10 خطوات تكون قد اقتربت كثيرًا من المركز، كاهتزاز وتر مقروع يخفت صوته مع استمرار تذبذبه. +1. **مقدار يساوي واحدًا.** للعدد z = 0.6 + 0.8i، تبقى كل قوة على دائرة الوحدة. الزاوية نحو 53.13 درجة لكل ضربة، فتقع القوة الرابعة عند نحو 212.52 درجة، وليست ربع دورة. +2. **مقدار متزايد.** للعدد z = 1.1 + 0.3i، يكون المقدار نحو 1.14. عند n = 8 يصبح مقدار الناتج نحو 2.86. +3. **مقدار متناقص.** للعدد z = 0.5 + 0.2i، يكون المقدار نحو 0.539. عند n = 10 يصبح نحو 0.00205. ## Test yourself -1. ضع النقطة بالضبط على دائرة الوحدة، على بعد وحدة واحدة من المركز، بحيث لا تكبر ولا تصغر مهما رفعتها لأي قوة. -2. اجعل القوة عند أقصاها واختر نقطة بداية خارج دائرة الوحدة بحيث تبتعد النتيجة أكثر من 100 وحدة عن المركز. -3. اختر نقطة بداية داخل دائرة الوحدة وقوة كافية بحيث تصغر النتيجة إلى أقل من 0.01 وحدة من المركز. +1. ضع z بحيث يبتعد مقداره عن 1 بأقل من 0.02. المقدار الواحد بدقة يُبقي جميع القوى على الدائرة. +2. اضبط n على 12 واختر z ليصبح مقدار الناتج أكبر من 100. +3. اختر z وn ليصبح مقدار الناتج أقل من 0.01. ## Intuition -تخيّل شرارة ألعاب نارية تدور بالزاوية نفسها في كل لحظة، وتبتعد قليلًا عن المركز مع كل دورة، فترسم حلزونًا يطير إلى الخارج. وشرارة تقترب قليلًا من المركز مع كل دورة بدلًا من ذلك ترسم حلزونًا يضيق نحو المركز. أثر النقاط على الشاشة يُظهر هذا بالضبط. ارفع نقطة البداية لقوى أعلى فأعلى باستخدام منزلق n، وكل نقطة جديدة هي سابقتها مدوَّرة بالزاوية نفسها مرة أخرى ومكبَّرة بالمعامل نفسه مرة أخرى. +تعني القوة الثالثة للعدد z ضربه في نفسه ثلاث مرات. تضيف كل عملية ضرب الزاوية نفسها، وتضرب البعد عن الأصل في العامل نفسه. يعرض المسار النتائج المتتابعة بدءًا من 1. -اسحب نقطة البداية لتقع بالضبط على دائرة الوحدة، أي وحدة واحدة عن المركز، فيختفي التحلزن. فكل قوة تدور فقط على الدائرة نفسها، لتحطّ على نقاط متباعدة بانتظام بدل أن تنجرف إلى الداخل أو الخارج. ادفع النقطة إلى خارج الدائرة فتطير كل قوة أعلى أبعد، واسحبها إلى الداخل بدلًا من ذلك فتقترب كل قوة أعلى من المركز أكثر، حتى تختفي في النهاية. +المقدار الأكبر من 1 يجعل المسافات تزيد. والمقدار بين الصفر والواحد يجعلها تنقص نحو الصفر، بينما يُبقيها المقدار 1 ثابتة. لا يلزم أن ترسم النقاط حلزونًا؛ فالعدد الحقيقي الموجب يغير المسافة فقط، ويدور i بين أربع نقاط على الدائرة. القوى المتناقصة غير الصفرية تقترب من الصفر دون بلوغه تمامًا بعد عدد محدود من الخطوات. ## Formal -بكتابة $z$ بصيغته القطبية $z = r(\cos\theta + i\sin\theta)$، تعطي صيغة دي موافر $z^n = r^n(\cos(n\theta) + i\sin(n\theta))$: رفع العدد للأس $n$ يرفع المقياس للأس $n$ ويضرب الوسيطة في $n$. +نكتب العدد غير الصفري بالصورة $z=r(\cos\theta+i\sin\theta)$، حيث r موجب. للعدد الصحيح n، تعطي صيغة دي موافر $z^n=r^n(\cos(n\theta)+i\sin(n\theta))$. -فالسلوك على المدى الطويل يعتمد فقط على $r = |z|$: $r>1$ يتحلزن إلى الخارج دون حدّ، و$r<1$ يتحلزن إلى الداخل نحو الصفر، و$r=1$ يبقى للأبد على دائرة الوحدة. +للقوى الموجبة المعروضة هنا، يكون المقدار $|z|^n$. يزيد دون حد إذا تجاوز |z| الواحد، ويقترب من الصفر إذا كان أقل من الواحد، ويبقى 1 إذا ساواه. نعتبر الزوايا المختلفة بدورة كاملة متكافئة، ولذلك قد تلتف قراءة الزاوية بدل زيادتها باستمرار. ## Advanced -الحلول الـ$n$ للمعادلة $z^n = 1$ متباعدة بانتظام على دائرة الوحدة بزوايا $2\pi k/n$ لـ$k=0,1,\dots,n-1$، وتولّد الزمرة المنتهية لجذور الوحدة من الرتبة $n$، وهي البنية الجبرية وراء تحويل فورييه السريع. +للعدد الصحيح الموجب n، توجد n جذور للوحدة متساوية التباعد على دائرة الوحدة. لا تعود القوى المتكررة لعدد على الدائرة إلى 1 بدقة إلا إذا كانت زاويته جزءًا نسبيًا من دورة كاملة. وإلا لا تتكرر القوى بدقة، رغم ثبات زاوية الخطوة. ## Derivation -1. اكتب العدد بصيغته القطبية، المقياس والزاوية. -2. ارفع الصيغة القطبية للأس $n$ حدًّا حدًّا. -3. اجمع مستخدمًا أن الدوران بزاوية $\theta$ مكرّرًا $n$ مرة هو دوران بزاوية $n\theta$. +1. نكتب z باستخدام مقداره وزاويته. +2. يرفع الضرب المتكرر المقدار إلى القوة n. +3. نجمع الزاوية n مرة، فنحصل على n مضروبة في ثيتا، ثم نمثل النقطة الناتجة بجيب التمام والجيب. ## Real world -### تحويل فورييه السريع -تضرب خوارزمية FFT الإشارات في جذور الوحدة لتفكّك تحويل فورييه إلى أجزاء أصغر بكثير. +### الدوران المتكرر -### الأشكال الكسيرية -نبني مجموعتي ماندلبروت وجوليا بتربيع عدد مركّب مرارًا، وإضافة ثابت إليه، ومراقبة هل يتحلزن الناتج نحو ما لا نهاية. +يعطي عامل مركب ثابت مقداره واحد خطوات زاوية متساوية دون تغيير الطول. -### المرشّحات الرقمية -اقرأ استجابة المرشّح الترددية بتقييم كثيرة حدود عند نقاط على دائرة الوحدة، حيث لا تكبر قوى $z$ ولا تصغر. +### الاهتزازات المنفصلة -### التشفير -بعض خوارزميات الضرب السريع والتشفير المبني على الشبكات تستخدم جذور الوحدة لتسريع حساب كثيرات الحدود. +يجمع عامل مركب مقداره أقل من 1 بين تغير طور متكرر وتناقص المقدار في نموذج مبسط لإشارة منفصلة. + +### حسابات فورييه + +توفر جذور الوحدة نقاطًا متساوية التباعد على دائرة الوحدة تستخدم في تحويل فورييه المنفصل. تكرار القوى وحده يختلف عن تكرار قاعدة تضيف ثابتًا أيضًا. diff --git a/content/lessons/algebra/powers-of-complex-numbers/en.md b/content/lessons/algebra/powers-of-complex-numbers/en.md index 1d739ba9..bce11c61 100644 --- a/content/lessons/algebra/powers-of-complex-numbers/en.md +++ b/content/lessons/algebra/powers-of-complex-numbers/en.md @@ -1,9 +1,6 @@ --- title: Powers of complex numbers -summary: >- - Watch repeated multiplication spiral a point outward, inward, or around a - perfect circle — the pattern behind fractal art, sound-filter design, and - the fast Fourier transform. +summary: 'Follow repeated complex multiplication by tracking the angle and distance at each power.' parameters: a: number, real part b: number, imaginary part @@ -13,54 +10,54 @@ variables: [] ## Try it -1. Raise n and watch the trail of dots spiral, one dot per power. -2. Drag the starting point outside the unit circle (the dashed ring) and watch the spiral fly outward. -3. Drag it back inside the ring instead and watch the spiral tighten toward the center. +1. Set a = 0 and b = 1. Increase n from 1 to 4. The powers are i, -1, -i and 1, completing a full turn. +2. Set a = 1.1 and b = 0.3. The modulus exceeds 1, so increasing n moves the powers progressively farther from the origin. +3. Set a = 0.5 and b = 0.2. The modulus is below 1, so the powers approach the origin. Read the coordinates when points become too close to distinguish. ## Real-life examples -1. **A perfectly circular orbit.** A point exactly 1 unit from the center (a=0.6, b=0.8) traces a perfect circle as its angle repeats; after n=4 steps it has turned a quarter of the way around, neither growing nor shrinking. -2. **A zooming fractal boundary.** A point just outside the unit circle (a=1.1, b=0.3) spirals outward as you raise the power — after n=8 steps it has already flown far from the center, the kind of escape test used to draw the Mandelbrot set. -3. **A damped guitar string.** A point just inside the unit circle (a=0.5, b=0.2) spirals inward, losing a little distance every step — after n=10 steps it has shrunk close to the center, like a plucked string's vibration dying out while it keeps oscillating. +1. **Unit modulus.** For z = 0.6 + 0.8i, every power stays on the unit circle. The angle is about 53.13 degrees per multiplication, so the fourth power is at about 212.52 degrees, not a quarter turn. +2. **Increasing magnitude.** For z = 1.1 + 0.3i, the modulus is about 1.14. At n = 8 the result has modulus about 2.86. +3. **Decreasing magnitude.** For z = 0.5 + 0.2i, the modulus is about 0.539. At n = 10 it is about 0.00205. ## Test yourself -1. Place the point exactly on the unit circle, one unit from the center, so raising it to any power never grows or shrinks it. -2. Set the power to its maximum and choose a starting point outside the unit circle so the result ends up more than 100 units from the center. -3. Choose a starting point inside the unit circle and a high enough power that the result shrinks to less than 0.01 units from the center. +1. Place z within 0.02 in modulus of the unit circle. An exactly unit modulus keeps every power on the circle. +2. Set n to 12 and choose z so the result's modulus exceeds 100. +3. Choose z and n so the result's modulus is less than 0.01. ## Intuition -Picture a firework spark that turns the same angle every instant, drifting a little farther from the center each time — it traces a spiral flying outward. A spark that instead drifts a little closer in with every turn traces a spiral tightening toward the center. The trail of dots on screen shows exactly this: raise the starting point to higher and higher powers with the n slider, and each new dot is the last one turned by the same angle again and scaled by the same factor again. +The power z cubed means multiply z by itself three times. Each multiplication adds the same angle and multiplies the distance from the origin by the same factor. The trail shows the successive results, beginning from 1. -Drag the starting point exactly onto the unit circle — one unit from the center — and the spiral vanishes: every power just walks around that same circle, landing on evenly spaced dots instead of drifting in or out. Push the point outside the circle and every higher power flies farther away; pull it inside instead and every higher power creeps closer to the center, eventually vanishing. +A modulus greater than 1 makes the distances grow. A modulus between zero and one makes them shrink towards zero, and a modulus of 1 keeps them unchanged. The points need not form a spiral: a positive real number changes only the distance, while i cycles through four points on the circle. Nonzero shrinking powers approach zero without becoming exactly zero at a finite step. ## Formal -Writing $z$ in polar form as $z = r(\cos\theta + i\sin\theta)$, de Moivre's formula gives $z^n = r^n(\cos(n\theta) + i\sin(n\theta))$: raising to the $n$th power raises the modulus to the $n$th power and multiplies the argument by $n$. +Write a nonzero number as $z=r(\cos\theta+i\sin\theta)$, with r positive. For an integer n, de Moivre's formula gives $z^n=r^n(\cos(n\theta)+i\sin(n\theta))$. -So the long-run behaviour depends only on $r = |z|$: $r>1$ spirals outward without bound, $r<1$ spirals inward to zero, and $r=1$ stays forever on the unit circle. +For the positive powers shown here, the modulus is $|z|^n$. It grows without bound when |z| exceeds 1, tends to zero when |z| is below 1, and stays 1 when |z| equals 1. Angles are understood modulo a full turn; displayed angles may wrap rather than increase continuously. ## Advanced -The $n$ solutions of $z^n = 1$ are equally spaced around the unit circle at angles $2\pi k/n$ for $k=0,1,\dots,n-1$; they generate the finite group of $n$th roots of unity, the algebraic structure behind the fast Fourier transform. +For a positive integer n, the n roots of unity are equally spaced around the unit circle. Repeated powers of a unit complex number return exactly to 1 only when its angle is a rational multiple of a full turn. Otherwise the powers do not repeat exactly, even though their step angle is constant. ## Derivation -1. Write the number in polar form, modulus and angle. -2. Raise the polar form to the $n$th power term by term. -3. Combine using the fact that repeated rotation by $\theta$, $n$ times, is rotation by $n\theta$. +1. Express z using its modulus and angle. +2. Repeated multiplication raises the modulus to the nth power. +3. Add the angle n times to obtain n times theta, then express the resulting point using cosine and sine. ## Real world -### Fast Fourier transform -The FFT algorithm multiplies signals by roots of unity to break a Fourier transform into much smaller pieces. +### Repeated rotations -### Fractals -The Mandelbrot and Julia sets are built by repeatedly squaring a complex number and adding a constant, watching whether the result spirals to infinity. +A fixed unit complex multiplier produces equal angular steps without changing length. -### Digital filters -A filter's frequency response is read off by evaluating a polynomial at points on the unit circle, exactly where powers of $z$ neither grow nor shrink. +### Discrete oscillations -### Cryptography -Some fast multiplication and lattice-based cryptographic schemes use roots of unity to speed up polynomial arithmetic. +A complex multiplier of modulus below 1 combines a repeated phase change with decay in a simplified discrete signal model. + +### Fourier calculations + +Roots of unity provide evenly spaced unit-circle points used in discrete Fourier transforms. Iterating powers alone is different from iterating a rule that also adds a constant. From 90f70489c4c6aafeaa30fadd3b3fc7fbc37c09c2 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:28:32 +0300 Subject: [PATCH 011/124] content: rewrite quadratic-roots for first-time learners in both languages --- content/lessons/algebra/quadratic-roots/ar.md | 70 +++++++++--------- content/lessons/algebra/quadratic-roots/en.md | 71 +++++++++---------- 2 files changed, 70 insertions(+), 71 deletions(-) diff --git a/content/lessons/algebra/quadratic-roots/ar.md b/content/lessons/algebra/quadratic-roots/ar.md index 03d8eb07..a0bba767 100644 --- a/content/lessons/algebra/quadratic-roots/ar.md +++ b/content/lessons/algebra/quadratic-roots/ar.md @@ -1,69 +1,69 @@ --- title: 'المعادلة التربيعية: سؤال المميِّز' -summary: >- - قبل أن تحل شيئًا، رقم واحد اسمه المميِّز يخبرك: هل تبلغ الكرة الارتفاع المطلوب أصلًا - أم لا؟ +summary: 'أوجد المدخلات التي تجعل الدالة التربيعية صفرًا، وميّز بين وجود جذرين أو جذر واحد أو عدم وجود جذور حقيقية.' parameters: - a: a (التقعر) - b: b - c: c - x: x (اسحب على طول المنحنى) + a: 'معامل الحد التربيعي a' + b: 'معامل الحد الخطي b' + c: 'الحد الثابت c' + x: 'المدخل المختار x' variables: - - معاملات المعادلة التربيعية - - المميز، يحدد عدد الجذور الحقيقية - - النقطة التي تسحبها على طول القطع المكافئ + - 'معاملات الحد التربيعي والخطي والثابت' + - 'المميّز؛ يحدد عدد الجذور الحقيقية عندما لا يكون a صفرًا' + - 'المدخل المختار على الرسم' --- ## Try it -1. اسحب النقطة على طول المنحنى وراقبها تعبر المحور الأفقي. كل عبور جذر. -2. قلّل c نحو 0، أو ارفع المنحنى باستخدام b، وراقب نقطتي التقاطع تقتربان من بعضهما. -3. تابع رفع المنحنى وراقبه يرتفع عن المحور تمامًا، فلا يبقى أي تقاطع. +1. اضبط a على 1 وb على 0 وc على -4. يلتقي الرسم بالمحور الأفقي عند x = -2 وx = 2. +2. أبقِ a وb ثابتين وارفع c إلى 0. يلتقي الجذران عند الرأس، حيث x = 0. +3. ارفع c إلى 4. أصغر ناتج الآن 4، فلا يصل الرسم إلى الصفر. تغيير c يزيح الرسم رأسيًا، أما تغيير b فلا يرفعه ببساطة. ## Real-life examples -1. **وقتا هبوط كرة.** ارتفاع كرة عبر الزمن يتبع h = -t² + 4t (a=-1, b=4, c=0). تبدأ الكرة على الأرض عند t=0 وتهبط مرة أخرى عند t=4 ثوانٍ. -2. **تكلفة لا تصل إلى التعادل أبدًا.** نموذج تكلفة إنتاج x² + 5 (a=1, b=0, c=5) لا يلامس الصفر عند أي مستوى إنتاج. لا يستطيع المشروع تحقيق التعادل مهما أنتج. -3. **طبق قمر صناعي يلامس الأرض بالكاد.** طبق على شكل (x-3)² (a=1, b=-6, c=9) يلامس الأرض عند نقطة واحدة بالضبط، x=3، ولا يلامسها في أي مكان آخر. +1. **منحنى ارتفاع افتراضي.** عند a = -1 وb = 4 وc = 0، يكون الناتج صفرًا عند x = 0 وx = 4. يمكن أن يمثلا بداية قوس مثالي ونهايته مع اختيار مقياس زمني مناسب. +2. **ناتج موجب دائمًا.** عند a = 1 وb = 0 وc = 5، يعطي كل مدخل حقيقي ناتجًا لا يقل عن 5. لا يوجد جذر حقيقي. لكن التكلفة الموجبة وحدها لا تخبرنا عن الربح دون معرفة الإيراد. +3. **جذر مكرر واحد.** عند a = 1 وb = -6 وc = 9، تكون القاعدة مربع الفرق بين x و3. تلامس الصفر عند x = 3 فقط. ## Test yourself -1. جد a وb وc، مع إبقاء المنحنى منحنيًا فعلًا (a ليست صفرًا)، بحيث تعطي الصيغة صفرًا بالضبط حين تعوّض x = 5. -2. اجعل المميز صفرًا بالضبط، بحيث يلامس المنحنى المحور عند نقطة واحدة فقط. -3. اجعل القطع المكافئ يفتح إلى الأسفل بلا أي جذر حقيقي، بحيث لا يلامس المحور أبدًا. +1. اجعل الناتج عند x = 5 يبتعد عن الصفر بأقل من 0.3، مع قيمة مطلقة لـa أكبر من 0.3. +2. اجعل المميّز صفرًا. أبقِ a غير صفري للحصول على الدالة التربيعية المقصودة ذات الجذر المكرر. +3. اختر a أصغر من -0.05 ومميّزًا أصغر من -0.5، لتحصل على قطع مكافئ مفتوح إلى الأسفل دون جذور حقيقية. ## Intuition -ارمِ كرة إلى الأعلى، فيرسم ارتفاعها عبر الزمن منحنى يبدأ من الصفر ثم يرتفع ثم يعود إلى الصفر مرة أخرى. وتلك العودة إلى الأرض جذر ثانٍ للمعادلة نفسها التي وصفت الانطلاق. اسحب النقطة على طول المنحنى الأزرق هنا. أينما عبرت المحور الأفقي يوجد جذر، أي لحظة يكون فيها الارتفاع صفرًا بالضبط. بالقيم الابتدائية سترى تقاطعين من هذا النوع. +الجذر هو مدخل يجعل الناتج صفرًا. في قاعدة مربع x ناقص 4، يصلح كل من 2 و-2 لأن تربيع كل منهما يعطي 4. على الرسم، يمثل هذان المدخلان نقطتي التقاء المنحنى بالمحور الأفقي. -قلّل الآن c نحو 0، أو ارفع المنحنى باستخدام b، وراقب التقاطعين يقتربان من بعضهما. ارفع المنحنى حتى يلامس المحور بالكاد عند قمته، أي جذر واحد مكرر، الحالة الحرجة التي تلامس فيها الكرة الأرض بالكاد ولا تتجاوزها. تابع الرفع فلن يعود المنحنى إلى الصفر أبدًا. الكرة، في هذه المعادلة، لا تهبط إطلاقًا، فلا جذور حقيقية لها، بل جذور مركبة فقط. +نضيف الآن 4 إلى كل ناتج، فتصبح القاعدة مربع x، ولا يعطي الصفر إلا المدخل صفر. نضيف 4 أخرى، فتصبح القاعدة مربع x زائد 4، ولا تصل إلى الصفر لأي مدخل حقيقي. رأينا بذلك جذرين حقيقيين، ثم جذرًا مكررًا، ثم غياب الجذور الحقيقية. + +يمكننا تمييز هذه الحالات من المعاملات باستخدام المميّز. إنه المقدار داخل الجذر التربيعي في قانون الحل. إذا كان موجبًا، نحصل على اختيارين مختلفين. وإذا كان صفرًا، يتطابقان. وإذا كان سالبًا، فلا يوجد له جذر تربيعي حقيقي. ## Formal -الجذران هما $x = \dfrac{-b \pm \sqrt{\Delta}}{2a}$ حيث $\Delta = b^2 - 4ac$. +عندما لا يكون a صفرًا، تكون جذور $ax^2+bx+c=0$ هي $x=(-b\pm\sqrt{\Delta})/(2a)$، حيث $\Delta=b^2-4ac$. -$\Delta > 0$ تعطي جذرين حقيقيين مختلفين، و$\Delta = 0$ تعطي جذرًا واحدًا مكررًا (يلامس فيه الرأس المحور)، و$\Delta < 0$ لا تعطي أي جذر حقيقي. +المميّز الموجب يعطي جذرين حقيقيين مختلفين، والصفر يعطي جذرًا حقيقيًا مكررًا عند الرأس. أما السالب فلا يعطي جذورًا حقيقية. إذا كان a صفرًا، نحل المعادلة الخطية أو الثابتة المتبقية بدل استخدام هذا القانون. ## Advanced -عندما $\Delta < 0$ يكون الجذران مترافقين مركبين $\dfrac{-b \pm i\sqrt{-\Delta}}{2a}$. وهما لا يزالان يحققان التحليل نفسه $a(x-r_1)(x-r_2)$، لكن خارج المحور الحقيقي، وهذا هو السبب في أن القطع المكافئ قد لا يلامس محور $x$ ومع ذلك "يكون" للمعادلة جذران. +عندما يكون المميّز سالبًا، يتيح استخدام الأعداد المركبة إيجاد جذرين مترافقين. يظل الرسم الحقيقي غير ملتقٍ بالمحور الأفقي. وقد يقع الجذر خارج نافذة العرض أو خارج المجال المناسب للتطبيق. ## Derivation -1. اقسم الطرفين على $a$. -2. أكمل المربع في الطرف الأيسر. -3. خذ الجذر التربيعي لكلا الطرفين وحل لإيجاد $x$. +1. نفترض أن a غير صفر، ونقسم الطرفين عليه، ثم ننقل الحد الثابت إلى اليمين. +2. نضيف المقدار نفسه إلى الطرفين لإكمال المربع. يصبح اليسار مربعًا، ويظهر المميّز في اليمين. +3. نأخذ اختياري الجذر التربيعي ونعزل x. يكون القانون الناتج صالحًا في الأعداد الحقيقية عندما لا يكون المميّز سالبًا. ## Real world -### زمن هبوط المقذوف -يتغيّر الارتفاع تربيعيًا مع الزمن تحت تأثير الجاذبية. ويخبرك المميز إن كانت الكرة المقذوفة تصل أصلًا إلى ارتفاع معين. +### بلوغ قيمة مطلوبة + +نطرح ارتفاعًا مطلوبًا من نموذج ارتفاع تربيعي مثالي. تحدد الجذور أوقات بلوغ الهدف، مع الالتزام بالفترة الزمنية المناسبة للنموذج. + +### انعدام الربح -### التعادل مع تكاليف ثابتة ومتغيرة -الربح الذي يتضمن حدًا تربيعيًا في الإيراد (حيث يؤثر السعر على الكمية المباعة) يحتاج إلى قانون المعادلة التربيعية لإيجاد نقاط الربح الصفري. +إذا كان نموذج الربح تربيعيًا، فإن جذوره الحقيقية مرشحة لكميات التعادل. نتحقق بعد ذلك من إمكان إنتاج هذه الكميات. -### البصريات وتصميم الهوائيات -خصائص التركيز في المرايا والأطباق القطعية المكافئة تنبع من الهندسة التربيعية نفسها. +### التقاطعات الهندسية -### تفاوتات التصميم الهندسي -قيد تصميم بلا حل حقيقي ($\Delta < 0$) يخبر المهندسين ببساطة أن الهدف غير قابل للتحقيق بالمعاملات الحالية. +قد يؤدي تقاطع مستقيم مع منحنى تربيعي إلى معادلة تربيعية. يميز المميّز بين تقاطعين أو تماس أو عدم وجود تقاطع حقيقي. diff --git a/content/lessons/algebra/quadratic-roots/en.md b/content/lessons/algebra/quadratic-roots/en.md index a3a9257c..b4254ce1 100644 --- a/content/lessons/algebra/quadratic-roots/en.md +++ b/content/lessons/algebra/quadratic-roots/en.md @@ -1,70 +1,69 @@ --- title: Quadratic roots and the discriminant -summary: >- - Know instantly, before solving anything, whether a thrown ball ever reaches - a target height, a business ever breaks even, or a design goal is simply - out of reach. +summary: 'Find where a quadratic equals zero and tell whether it has two, one or no real roots.' parameters: - a: a (curvature) - b: b - c: c - x: x (drag along the curve) + a: 'quadratic coefficient a' + b: 'linear coefficient b' + c: 'constant c' + x: 'selected input x' variables: - - coefficients of the quadratic - - the discriminant — decides the number of real roots - - point being dragged along the parabola + - 'coefficients of the squared, linear and constant terms' + - 'discriminant; determines the number of real roots when a is nonzero' + - 'selected input on the graph' --- ## Try it -1. Drag the point across the curve and watch it cross the horizontal axis — each crossing is a root. -2. Shrink c toward 0, or raise the curve with b, and watch the two crossings slide together. -3. Push the curve up further still and watch it lift off the axis completely — no more crossings at all. +1. Set a to 1, b to 0 and c to -4. The graph meets the horizontal axis at x = -2 and x = 2. +2. Keep a and b fixed and raise c to 0. The two roots meet at the vertex, x = 0. +3. Raise c to 4. The lowest output is now 4, so the graph never reaches zero. Changing c shifts vertically; changing b does not simply lift the curve. ## Real-life examples -1. **A ball's two landing times.** A ball's height over time follows h = -t² + 4t (a=-1, b=4, c=0): it starts on the ground at t=0 and lands again at t=4 seconds. -2. **A cost that never breaks even.** A production cost model x² + 5 (a=1, b=0, c=5) never touches zero at any output level — the business can never break even, no matter how much it makes. -3. **A satellite dish that just touches the ground.** A dish shaped like (x-3)² (a=1, b=-6, c=9) touches the ground at exactly one point, x=3, and nowhere else. +1. **An illustrative height curve.** With a = -1, b = 4 and c = 0, the output is zero at x = 0 and x = 4. These could represent the start and end of an idealized arc on a suitably scaled time axis. +2. **A strictly positive output.** With a = 1, b = 0 and c = 5, every real input gives at least 5. There is no real root. A positive cost alone says nothing about profit without a revenue model. +3. **One repeated root.** With a = 1, b = -6 and c = 9, the rule is the square of x minus 3. It touches zero only at x = 3. ## Test yourself -1. Find a, b and c, keeping the curve genuinely curved (a not zero), so that plugging x = 5 into the expression gives exactly zero. -2. Make the discriminant exactly zero, so the curve just touches the axis at a single point. -3. Make the parabola open downward with no real roots at all, so it never touches the axis. +1. Make the output at x = 5 within 0.3 of zero, with the absolute value of a greater than 0.3. +2. Make the discriminant zero. Keep a nonzero to obtain the intended quadratic with a repeated root. +3. Choose a below -0.05 and a discriminant below -0.5, giving a downward-opening parabola with no real roots. ## Intuition -Throw a ball straight up and its height over time traces a curve that starts at zero, rises, then falls back to zero again — that return to the ground is a second root of the same equation as the launch. Drag the point across the blue curve here: wherever it crosses the horizontal axis is a root, a time when the height is exactly zero. With the starting numbers you should see two such crossings. +A root is an input that makes the output zero. For x squared minus 4, both 2 and -2 work because each squares to 4. On the graph, these inputs are the points where the curve meets the horizontal axis. -Now shrink c toward 0, or raise the curve with b, and watch the two crossings slide toward each other. Push the curve up until it just kisses the axis at its very peak — one repeated root, the knife-edge case where the ball just barely grazes the ground and no more. Push it further still and the curve never comes back down to zero at all: the ball, in this equation, never lands — no real roots, only complex ones. +Now add 4 to every output. The rule becomes x squared, and only zero gives zero. Add another 4 and the rule becomes x squared plus 4, which cannot reach zero for a real input. This sequence shows two real roots, one repeated root, and no real roots. + +The discriminant lets us distinguish these cases from the coefficients. It is the quantity inside the square root in the quadratic formula. A positive value gives two square-root choices, zero makes them coincide, and a negative value has no real square root. ## Formal -The roots are $x = \dfrac{-b \pm \sqrt{\Delta}}{2a}$ with $\Delta = b^2 - 4ac$. +For a nonzero a, the roots of $ax^2+bx+c=0$ are $x=(-b\pm\sqrt{\Delta})/(2a)$, where $\Delta=b^2-4ac$. -$\Delta > 0$ gives two distinct real roots, $\Delta = 0$ gives one repeated root (the vertex touches the axis), and $\Delta < 0$ gives no real roots. +A positive discriminant gives two distinct real roots. Zero gives one repeated real root at the vertex. A negative discriminant gives no real roots. If a is zero, use the remaining linear or constant equation instead of this formula. ## Advanced -When $\Delta < 0$ the two roots are complex conjugates $\dfrac{-b \pm i\sqrt{-\Delta}}{2a}$; they still satisfy the same factorisation $a(x-r_1)(x-r_2)$, just off the real axis, which is why the parabola can miss the $x$-axis and yet the equation still "has" two roots. +When the discriminant is negative, allowing complex numbers gives a conjugate pair of roots. The real graph still does not meet the horizontal axis. A root may also be outside the graph window or outside the usable domain of an application. ## Derivation -1. Divide through by $a$. -2. Complete the square on the left. -3. Take the square root of both sides and solve for $x$. +1. Assume a is nonzero, divide both sides by a, and move the constant to the right. +2. Add the same completing-square term to both sides. The left becomes a square and the right contains the discriminant. +3. Take both square-root choices and isolate x. The resulting formula is valid over the reals when the discriminant is nonnegative. ## Real world -### Projectile landing time -Height versus time under gravity is quadratic; the discriminant tells you whether a thrown ball ever reaches a given height. +### Reaching a target + +Subtract a target height from an idealized quadratic height model. Roots identify when the model reaches that target, subject to its physical time interval. + +### Zero profit -### Break-even with fixed and variable costs -Profit that includes a quadratic revenue term (price affects quantity sold) needs the quadratic formula to find zero-profit points. +If a profit model is quadratic, its real roots are candidate break-even quantities. Check which quantities are feasible. -### Optics and antenna design -Focal properties of parabolic mirrors and dishes come from the same quadratic geometry. +### Geometric intersections -### Engineering tolerances -A design constraint with no real solution ($\Delta < 0$) tells engineers a target is simply unreachable with the current parameters. +Intersecting a line with a quadratic curve can lead to a quadratic equation. The discriminant indicates two intersections, tangency, or no real intersection. From 2e772b041a2cd9d0be48b68a16af404786cc9b68 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:28:32 +0300 Subject: [PATCH 012/124] content: rewrite vectors for first-time learners in both languages --- content/lessons/algebra/vectors/ar.md | 53 +++++++++++++------------- content/lessons/algebra/vectors/en.md | 55 +++++++++++++-------------- 2 files changed, 52 insertions(+), 56 deletions(-) diff --git a/content/lessons/algebra/vectors/ar.md b/content/lessons/algebra/vectors/ar.md index 8f140d01..7619253b 100644 --- a/content/lessons/algebra/vectors/ar.md +++ b/content/lessons/algebra/vectors/ar.md @@ -1,7 +1,6 @@ --- title: المتجهات -summary: >- - رقمان فقط يحددان طول السهم واتجاهه. هكذا تُكتب السرعة والقوة في كل لعبة. +summary: 'صف الإزاحة بمركبتين أفقية ورأسية، ثم احسب طول السهم الذي يمثلها.' parameters: a: المصفوفة، الصف 1 والعمود 1 b: المصفوفة، الصف 1 والعمود 2 @@ -16,54 +15,54 @@ variables: ## Try it -1. اسحب رأس السهم البرتقالي وراقب vx وvy يتغيّران معًا. -2. راقب قراءة الطول أسفل الشبكة تتغيّر وأنت تسحب. فهي المسافة المستقيمة للسهم من المركز. -3. ادفع vx أو vy إلى قيمة سالبة وراقب السهم ينقلب ليشير إلى الجهة المعاكسة على المحور نفسه. +1. اضبط a = 1 وb = 0 وc = 0 وd = 1 لتترك المصفوفة المتجه كما هو. ثم اضبط vx = 3 وvy = 4. +2. اقرأ v = (3, 4) أسفل الشبكة. طوله 5 بحسب نظرية فيثاغورس؛ تعرض القراءة المركبتين، ولا تعرض قيمة منفصلة للطول. +3. غيّر vx إلى -3. ينعكس الاتجاه الأفقي ويبقى الطول 5. يتطابق سهم المدخل المتقطع مع سهم الناتج المتصل ما دامت المصفوفة هي مصفوفة الوحدة. ## Real-life examples -1. **سيارة تسير شرقًا تمامًا.** بلا انجراف جانبي، فقط vx=5 م/ث شرقًا (vy=0). طول المتجه 5 بالضبط، مطابقًا لسرعتها. -2. **مصعد يصعد مباشرة.** بلا حركة أفقية، فقط vy=4 م/ث للأعلى (vx=0). طول المتجه 4 بالضبط. -3. **مسار طائرة فوق الأرض.** تتجه شرقًا بسرعة 3 بينما تدفعها الريح شمالًا بسرعة 4 (vx=3, vy=4). طول متجه المسار الناتج 5 بالضبط، رغم أن لا مركّبة منهما وحدها تساوي 5. +1. **التحرك شرقًا.** عند vx = 5 وvy = 0، يتجه المتجه أفقيًا يمينًا وطوله 5. +2. **التحرك إلى الأعلى.** عند vx = 0 وvy = 4، يتجه المتجه رأسيًا إلى الأعلى وطوله 4. +3. **جمع حركتين متعامدتين.** مركبة مقدارها 3 شرقًا وأخرى 4 شمالًا تعطيان إزاحة طولها 5. وإذا مثلتا سرعة متجهة بوحدات متوافقة، كان 5 مقدار السرعة الناتجة. ## Test yourself -1. اجعل طول المتجه 5 بالضبط باستخدام vx وvy غير صفريين كليهما. -2. اجعل المتجه يشير مباشرة إلى الأعلى، بلا مركّبة أفقية، وبطول 4 بالضبط. -3. اجعل المتجه يشير بالضبط على القطر (vx يساوي vy) وبطول أكبر من 4. +1. اجعل طول متجه المدخل يبتعد عن 5 بأقل من 0.1، مع قيمة مطلقة لكل مركبة أكبر من 0.1. +2. اجعل متجه المدخل (0, 4)، متجهًا إلى الأعلى مباشرة. +3. اجعل vx وvy متساويين بفارق أقل من 0.05، وطول المتجه أكبر من 4. يجوز أن تكونا موجبتين معًا أو سالبتين معًا. ## Intuition -طيّار يطير شرقًا بمقدار 3 وحدات بينما تدفعه ريح جانبية شمالًا بمقدار 4 وحدات، فينتهي به المطاف يتحرك على مسار قطري واحد، لا شرقًا ولا شمالًا، بل بينهما، وبسرعة مستقيمة أكبر من أي دفعة منهما وحدها. السهم البرتقالي على الشبكة هو بالضبط هذه الحركة المجموعة. اسحب رأسه فيتغيّر رقمان معًا، vx وvy، أي المسافة التي يبلغها جانبيًا والمسافة التي يبلغها للأعلى. هذان الرقمان وحدهما يكفيان لرسم السهم نفسه من جديد. +تحرك ثلاث وحدات يمينًا وأربعًا إلى الأعلى. السهم من نقطة البداية إلى نقطة النهاية يسجل الإزاحة الكلية. مركبتاه 3 و4؛ واحدة لكل اتجاه من الاتجاهين المتعامدين. -طول السهم المستقيم يأتي من الفكرة نفسها التي يقيس بها سلّم مائل على جدار. ربّع كل رقم من الرقمين واجمعهما ثم خذ الجذر التربيعي، وهو تطبيق نظرية فيثاغورس على المثلث الذي يكوّنه السهم مع بلوغه الجانبي والعلوي. مدّد vx أو vy فيكبر طول السهم ليطابقه، واجعل أحدهما سالبًا فينقلب السهم ليشير إلى الجهة المعاكسة على المحور نفسه. +السهم وتر مثلث قائم طول ضلعَيه 3 و4. طوله الجذر التربيعي لمجموع 9 و16، أي 5. المركبة السالبة تعكس اتجاهًا دون أن تجعل الطول سالبًا. أبقِ المصفوفة عند مصفوفة الوحدة للتركيز على متجه المدخل؛ الإعدادات الأخرى تنتج متجهًا محولًا منفصلًا. ## Formal -المتجه في المستوى زوج $\mathbf{v} = (v_x, v_y)$. وطوله، أي مقداره، هو $|\mathbf{v}| = \sqrt{v_x^2 + v_y^2}$، وهذا تطبيق مباشر لنظرية فيثاغورس على المثلث الذي يكوّنه المتجه ومركّبتاه. +نكتب المتجه في المستوى $\mathbf{v}=(v_x,v_y)$. وطوله الإقليدي هو $|\mathbf{v}|=\sqrt{v_x^2+v_y^2}$. يجب أن تستخدم المركبتان وحدات متوافقة لهذا التفسير. -المصفوفة المعروضة هنا هي مصفوفة الوحدة، إذ $a=d=1$ و$b=c=0$، فهي تترك كل متجه في مكانه تمامًا: $M\mathbf{v} = \mathbf{v}$. دروس لاحقة تغيّر $a,b,c,d$ لتنقل السهم إلى موضع جديد. +تكون مصفوفة الوحدة عند a = d = 1 وb = c = 0، فتعطي $M\mathbf{v}=\mathbf{v}$. هذا إعداد يمكن اختياره، وليس قيدًا على المنزلقات. تختبر التمارين هنا مركبتي المدخل مهما كان إعداد المصفوفة. ## Advanced -في فضاء ذي $n$ بعدًا يكون المتجه ببساطة قائمة من $n$ عددًا، وتعمّم الصيغة نفسها للمقدار إلى $|\mathbf{v}| = \sqrt{v_1^2 + v_2^2 + \dots + v_n^2}$. الجمع وضرب عدد في متجه والضرب القياسي كلها تمتد دون تغيير، ولهذا تصف المتجهات كل شيء من سرعة ثنائية البعد إلى تمثيل بمليون بعد. +نجمع المتجهات بجمع المركبات المتناظرة. ونضرب المتجه في عدد بضرب كل مركبة فيه. يعكس العدد السالب اتجاه المتجه غير الصفري. أما المتجه الصفري فطوله صفر ولا اتجاه محددًا له. ## Derivation -1. اكتب المتجه بمركّبتيه. -2. ربّع كل مركّبة، تمامًا كما في نظرية فيثاغورس. -3. الجذر التربيعي لمجموع المربعين هو طول المتجه. +1. نسجل المركبتين الأفقية والرأسية. +2. نربع المركبتين ونجمعهما للحصول على مربع طول الوتر. +3. نأخذ الجذر التربيعي غير السالب للحصول على الطول. ## Real world -### الفيزياء -السرعة والقوة والتسارع كلها متجهات. السرعة العددية وحدها لا تخبرك بوجهة السيارة، لكن متجه السرعة يخبرك بها. +### الحركة -### الرسوميات الحاسوبية -كل نقطة، وكل اتجاه تنظر إليه الكاميرا، وكل عمودي على سطح في مشهد ثلاثي الأبعاد يُخزَّن كمتجه. +تجمع السرعة المتجهة بين المقدار والاتجاه. وتحدد مركبتاها المتعامدتان السرعة المتجهة الكلية. -### الملاحة -مسار الطائرة فوق الأرض هو مجموع متجهي اتجاه الطائرة والريح. اجمع السهمين رأسًا بذيل لتعرف إلى أين تذهب الطائرة فعلًا. +### القوى -### تعلّم الآلة -تُحوَّل الكلمة أو الصورة إلى متجه من الأرقام، ومدى قرب متجهين يقيس مدى تشابه الشيئين. +تُجمع القوى المؤثرة على جسم بوصفها متجهات، ولذلك قد تلغي المركبات المتعاكسة بعضها. + +### الرسوم الحاسوبية + +تساعد الإحداثيات ومتجهات الإزاحة على تحديد مواضع الأجسام وحركتها. ويعتمد وصف الموضع أيضًا على الأصل المختار. diff --git a/content/lessons/algebra/vectors/en.md b/content/lessons/algebra/vectors/en.md index 4cae02d9..295ddc3e 100644 --- a/content/lessons/algebra/vectors/en.md +++ b/content/lessons/algebra/vectors/en.md @@ -1,9 +1,6 @@ --- title: Vectors -summary: >- - See how two numbers alone pin down an arrow's exact length and direction — - the language behind velocity, force, and screen positions in every game - and map. +summary: 'Describe a displacement with horizontal and vertical components, then calculate its length.' parameters: a: matrix row 1, column 1 b: matrix row 1, column 2 @@ -18,54 +15,54 @@ variables: ## Try it -1. Drag the orange arrow's tip and watch vx and vy change together. -2. Watch the length readout below the grid update as you drag — that is the arrow's straight-line distance from the center. -3. Push vx or vy negative and watch the arrow flip to point the other way along that axis. +1. Set a = 1, b = 0, c = 0 and d = 1 so the matrix leaves the vector unchanged. Set vx = 3 and vy = 4. +2. Read v = (3, 4) below the grid. Its length is 5 by the Pythagorean theorem; the readout shows components rather than a separate length value. +3. Change vx to -3. The horizontal direction reverses, but the length remains 5. The dashed input arrow and solid transformed arrow overlap while the matrix is the identity. ## Real-life examples -1. **A car driving due east.** No sideways drift, just vx=5 m/s east (vy=0): the vector's length is exactly 5, matching its speed. -2. **An elevator rising straight up.** No horizontal motion, just vy=4 m/s upward (vx=0): the vector's length is exactly 4. -3. **An airplane's ground track.** Heading east at 3 while wind pushes it north at 4 (vx=3, vy=4): the combined ground-track vector has length exactly 5, even though neither component alone is 5. +1. **Moving east.** With vx = 5 and vy = 0, the vector points horizontally right and has length 5. +2. **Moving upwards.** With vx = 0 and vy = 4, the vector points straight up and has length 4. +3. **Combining perpendicular movements.** Components 3 east and 4 north give a displacement of length 5. If both components instead describe velocity in the same units, 5 is the resulting speed. ## Test yourself -1. Make the vector's length exactly 5 using a vx and vy that are both nonzero. -2. Make the vector point straight up, with no horizontal component, and a length of exactly 4. -3. Make the vector point along the exact diagonal (equal vx and vy) with a length greater than 4. +1. Make the input vector's length within 0.1 of 5, with both component magnitudes greater than 0.1. +2. Make the input vector (0, 4), pointing straight up. +3. Make vx and vy equal within 0.05, with vector length greater than 4. Both may be positive or both negative. ## Intuition -A pilot flying due east at 3 units, while a crosswind pushes the plane north at 4 units, ends up moving along a single diagonal path — not east, not north, but somewhere between, and faster in a straight line than either push alone. The orange arrow on the grid is exactly that combined motion: drag its tip and two numbers change together, vx and vy, how far it reaches sideways and how far it reaches up. Those two numbers alone are enough to redraw the same arrow from scratch. +Move three units right and four units up. The arrow from your starting point to your final point records the total displacement. Its two components are 3 and 4: one for each perpendicular direction. -The arrow's straight-line length comes from the same idea as a ladder leaning against a wall: square each of the two numbers, add them, and take the square root — the Pythagorean theorem applied to the triangle the arrow forms with its own sideways and upward reach. Stretch vx or vy and the arrow's length grows to match; flip either one negative and the arrow points the opposite way along that same axis. +The arrow is the diagonal of a right triangle with side lengths 3 and 4. Its length is the square root of 9 plus 16, which is 5. Negative components reverse a direction without making the length negative. Keep the matrix at the identity in this lesson to focus on the input vector; other matrix settings create a separate transformed vector. ## Formal -A vector in the plane is the pair $\mathbf{v} = (v_x, v_y)$. Its length, or magnitude, is $|\mathbf{v}| = \sqrt{v_x^2 + v_y^2}$, the Pythagorean theorem applied to the triangle formed by the vector and its two components. +A plane vector is written $\mathbf{v}=(v_x,v_y)$. Its Euclidean length is $|\mathbf{v}|=\sqrt{v_x^2+v_y^2}$. Both components must use compatible units for this interpretation. -The matrix shown here is the identity, $a=d=1$ and $b=c=0$, so it leaves every vector exactly where it is: $M\mathbf{v} = \mathbf{v}$. Later lessons change $a,b,c,d$ to move the arrow somewhere new. +The identity matrix has a = d = 1 and b = c = 0, giving $M\mathbf{v}=\mathbf{v}$. This is a selectable setting, not a restriction on the matrix controls. The exercises here test the input components regardless of the matrix setting. ## Advanced -In $n$ dimensions a vector is simply a list of $n$ numbers, and the same magnitude formula generalises to $|\mathbf{v}| = \sqrt{v_1^2 + v_2^2 + \dots + v_n^2}$. Addition, scalar multiplication and the dot product all extend unchanged, which is why vectors describe everything from a two-dimensional velocity to a million-dimensional embedding. +Add vectors by adding corresponding components. Multiply by a scalar by multiplying every component by that scalar. A negative scalar reverses a nonzero vector's direction. The zero vector has length zero and no defined direction. ## Derivation -1. Write the vector as its two components. -2. Square each component, exactly as in the Pythagorean theorem. -3. The square root of that sum is the vector's length. +1. Record the horizontal and vertical components. +2. Square both components and add them to obtain the squared diagonal length. +3. Take the nonnegative square root to obtain the length. ## Real world -### Physics -Velocity, force and acceleration are all vectors: a speed alone does not tell you where a car is heading, but a velocity vector does. +### Motion -### Computer graphics -Every point, every direction a camera looks, and every surface normal in a 3D scene is stored as a vector. +Velocity combines speed with direction. Two perpendicular velocity components determine the total velocity. -### Navigation -A pilot's ground track is the vector sum of the plane's heading and the wind: add the two arrows tip to tail to find where the plane actually goes. +### Forces -### Machine learning -A word or an image is turned into a vector of numbers, and how close two vectors are measures how similar the two things are. +Forces acting on an object add as vectors, so opposite components can cancel. + +### Graphics + +Coordinates and displacement vectors help locate objects and describe their movement. A position also depends on the chosen origin. From 86f61098b5e0efdf5d0346a00948a45adc354f67 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:28:32 +0300 Subject: [PATCH 013/124] docs: record completed bilingual Algebra review --- content/lessons/EDITORIAL_REVIEW.md | 30 ++++++++++++++--------------- content/lessons/STYLE.en.md | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/content/lessons/EDITORIAL_REVIEW.md b/content/lessons/EDITORIAL_REVIEW.md index 16989262..6e1a0633 100644 --- a/content/lessons/EDITORIAL_REVIEW.md +++ b/content/lessons/EDITORIAL_REVIEW.md @@ -1,6 +1,6 @@ # Bilingual editorial review -25 of 390 lessons reviewed. 365 remain. +37 of 390 lessons reviewed. 353 remain. A checked lesson has had both language files rewritten or reviewed against its configuration and visualization source. Automated validation alone does not mark a lesson reviewed. Browser interaction and independent learner review remain separate checks. @@ -44,20 +44,20 @@ Scope: every lesson, including summaries, parameter labels, examples, exercises, - [ ] [what-is-machine-learning](ai/what-is-machine-learning/en.md) · [Arabic](ai/what-is-machine-learning/ar.md) - [ ] [word-embeddings](ai/word-embeddings/en.md) · [Arabic](ai/word-embeddings/ar.md) -## algebra (0/12) - -- [ ] [absolute-value-inequalities](algebra/absolute-value-inequalities/en.md) · [Arabic](algebra/absolute-value-inequalities/ar.md) -- [ ] [complex-numbers](algebra/complex-numbers/en.md) · [Arabic](algebra/complex-numbers/ar.md) -- [ ] [determinant](algebra/determinant/en.md) · [Arabic](algebra/determinant/ar.md) -- [ ] [eigenvectors](algebra/eigenvectors/en.md) · [Arabic](algebra/eigenvectors/ar.md) -- [ ] [exponents-and-powers](algebra/exponents-and-powers/en.md) · [Arabic](algebra/exponents-and-powers/ar.md) -- [ ] [linear-equations](algebra/linear-equations/en.md) · [Arabic](algebra/linear-equations/ar.md) -- [ ] [logarithms](algebra/logarithms/en.md) · [Arabic](algebra/logarithms/ar.md) -- [ ] [matrices-as-transformations](algebra/matrices-as-transformations/en.md) · [Arabic](algebra/matrices-as-transformations/ar.md) -- [ ] [percent-and-compound-growth](algebra/percent-and-compound-growth/en.md) · [Arabic](algebra/percent-and-compound-growth/ar.md) -- [ ] [powers-of-complex-numbers](algebra/powers-of-complex-numbers/en.md) · [Arabic](algebra/powers-of-complex-numbers/ar.md) -- [ ] [quadratic-roots](algebra/quadratic-roots/en.md) · [Arabic](algebra/quadratic-roots/ar.md) -- [ ] [vectors](algebra/vectors/en.md) · [Arabic](algebra/vectors/ar.md) +## algebra (12/12) + +- [x] [absolute-value-inequalities](algebra/absolute-value-inequalities/en.md) · [Arabic](algebra/absolute-value-inequalities/ar.md) +- [x] [complex-numbers](algebra/complex-numbers/en.md) · [Arabic](algebra/complex-numbers/ar.md) +- [x] [determinant](algebra/determinant/en.md) · [Arabic](algebra/determinant/ar.md) +- [x] [eigenvectors](algebra/eigenvectors/en.md) · [Arabic](algebra/eigenvectors/ar.md) +- [x] [exponents-and-powers](algebra/exponents-and-powers/en.md) · [Arabic](algebra/exponents-and-powers/ar.md) +- [x] [linear-equations](algebra/linear-equations/en.md) · [Arabic](algebra/linear-equations/ar.md) +- [x] [logarithms](algebra/logarithms/en.md) · [Arabic](algebra/logarithms/ar.md) +- [x] [matrices-as-transformations](algebra/matrices-as-transformations/en.md) · [Arabic](algebra/matrices-as-transformations/ar.md) +- [x] [percent-and-compound-growth](algebra/percent-and-compound-growth/en.md) · [Arabic](algebra/percent-and-compound-growth/ar.md) +- [x] [powers-of-complex-numbers](algebra/powers-of-complex-numbers/en.md) · [Arabic](algebra/powers-of-complex-numbers/ar.md) +- [x] [quadratic-roots](algebra/quadratic-roots/en.md) · [Arabic](algebra/quadratic-roots/ar.md) +- [x] [vectors](algebra/vectors/en.md) · [Arabic](algebra/vectors/ar.md) ## biology (0/13) diff --git a/content/lessons/STYLE.en.md b/content/lessons/STYLE.en.md index 15f60582..b0c7f330 100644 --- a/content/lessons/STYLE.en.md +++ b/content/lessons/STYLE.en.md @@ -37,6 +37,6 @@ Run `pnpm check` after editing. It validates structure, formulas and challenge s ## Reviewed examples and remaining work -See [the lesson-by-lesson review checklist](EDITORIAL_REVIEW.md) for coverage. The Numbers and Functions sections and the derivative lesson have received a complete bilingual editorial pass under this guide. +See [the lesson-by-lesson review checklist](EDITORIAL_REVIEW.md) for coverage. The Numbers, Functions and Algebra sections and the derivative lesson have received a complete bilingual editorial pass under this guide. The remaining lessons still need individual review of their summaries, controls, explanations, examples and challenges. Do not treat a global phrase replacement or a successful build as an editorial review. From 3315a890b3cfb382825624085306e0e09d9f6df8 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:44:20 +0300 Subject: [PATCH 014/124] content: rewrite graph-colouring for first-time learners in both languages --- .../lessons/discrete/graph-colouring/ar.md | 59 ++++++++---------- .../lessons/discrete/graph-colouring/en.md | 61 ++++++++----------- 2 files changed, 54 insertions(+), 66 deletions(-) diff --git a/content/lessons/discrete/graph-colouring/ar.md b/content/lessons/discrete/graph-colouring/ar.md index ac854f94..8c979727 100644 --- a/content/lessons/discrete/graph-colouring/ar.md +++ b/content/lessons/discrete/graph-colouring/ar.md @@ -1,66 +1,61 @@ --- title: 'تلوين المخططات: الخرائط والجداول' -summary: >- - لوّن الخريطة بحيث لا تتجاور منطقتان بلون واحد. أربعة ألوان تكفي دائمًا. +summary: 'وزّع الألوان بحيث يختلف لون كل رأس عن جيرانه، وميّز بين إيجاد تلوين ناجح وإثبات استحالة استخدام ألوان أقل.' parameters: - k: الألوان المسموح بها — عدد الألوان المسموح باستخدامها - order: البداية — المنطقة التي يبدأ منها التلوين (اضغط منطقة) + k: 'k — عدد الألوان المتاحة' + order: 'order — أول منطقة في ترتيب الزيارة الدوري؛ انقر منطقة لاختيارها' variables: - - 'المخطط المُستمَد من الخريطة: عقدة واحدة لكل منطقة، وضلع واحد عند كل حدود مشتركة' - - 'عدد التلوين اللوني: أقل عدد ألوان يستخدمه أي تلوين سليم للخريطة' - - 'أعلى درجة: أكبر عدد جيران تلامسهم منطقة واحدة' + - 'G: الرسم الذي يمثل المناطق وحدودها المشتركة' + - 'χ: أقل عدد ألوان يكفي لتلوين صحيح' + - 'Δ: أكبر عدد جيران لأي رأس' --- ## Try it -1. اضغط منطقة WA لتبدأ التلوين منها، وراقب كل منطقة تمتلئ بأصغر رقم لون لم يستخدمه أحد جيرانها الملوَّنين بالفعل. -2. حرّك «الألوان المسموح بها» إلى 2، ولاحظ SA، وهي المنطقة الأكثر تلامسًا مع غيرها، تتحول إلى تظليل أحمر متقاطع. لونان لا يكفيان لهذه الخريطة. -3. أعد «الألوان المسموح بها» إلى 3 ثم إلى 4، وراقب التظليل الأحمر يختفي في المرتين. +1. اضبط order = 0 للبدء من WA، وk = 2. لن يبقى لون متاح لـSA، فيظهر حدها بخط أحمر متقطع. +2. أبقِ order = 0 وارفع k إلى 3. تحصل كل منطقة على لون دون تعارض. +3. أبقِ k = 3 واضبط order = 4. لا يبقى لون متاح لـQLD. تغيير البداية يغيّر اختيارات الخوارزمية؛ وفشل محاولة واحدة لا يثبت وحده استحالة التلوين. ## Real-life examples -1. **لونان لا يكفيان.** بلونين فقط، وبدءًا من WA (أستراليا الغربية)، تصطدم SA (أستراليا الجنوبية) بجارة لها. هذا دليل أن هذه الخريطة تحتاج فعلًا أكثر من لونين. -2. **الحد الأدنى الذي ينجح.** بثلاثة ألوان، وبدءًا من WA أيضًا، تُلوَّن المناطق السبع كلها دون أي تصادم. هذا أقل عدد ألوان تحتاجه هذه الخريطة الحقيقية. -3. **وعد النظرية.** بأربعة ألوان، وبدءًا هذه المرة من SA، ينتهي التلوين أيضًا بلا أي تصادم. هذا هو العدد الذي تضمن نظرية الألوان الأربعة كفايته لأي خريطة مسطحة. +1. **لونان.** عند k = 2 وorder = 0، تأخذ WA وNT لونين مختلفين. تجاور SA الاثنتين، فتحتاج إلى لون ثالث. يثبت هذا المثلث من المناطق المتجاورة أن لونين لا يكفيان. +2. **ثلاثة ألوان.** عند k = 3 وorder = 0، تُلوّن جميع المناطق. هذا التلوين، مع حجة المثلث السابقة، يثبت أن الحد الأدنى هو ثلاثة بالضبط. +3. **إتاحة أربعة ألوان.** عند k = 4 وorder = 2، تكمل الطريقة التلوين. إتاحة أربعة ألوان لا تعني ضرورة استخدامها كلها. ## Test yourself -1. اضبط «الألوان المسموح بها» على 2، وجد المنطقة التي تنتهي دائمًا بتظليل أحمر أيًا كانت المنطقة التي تبدأ منها العدّ. -2. اضبط «الألوان المسموح بها» على 4، وهو العدد الذي تعد نظرية الألوان الأربعة بأنه يكفي دائمًا لخريطة مرسومة على صفحة مسطحة. -3. ابدأ التلوين من TAS، وهي المنطقة الوحيدة بلا حدود مشتركة مع أي منطقة أخرى، وتحقق أنها لا تُظلَّل حمراء أبدًا. +1. اضبط k = 2 وافحص المناطق التي لا تستطيع الطريقة تلوينها. +2. اضبط k = 4 وافحص التلوين الناتج. +3. اضبط order = 6 للبدء من TAS، وهي منطقة بلا حدود مشتركة في هذا النموذج. ## Intuition -تخيّل خريطة مبسّطة لولايات أستراليا وأقاليمها، مقسّمة إلى سبع مناطق. منطقتان تشتركان في حدود حقيقية، مثل WA وSA، لا يُسمح لهما بأن تُطليا باللون نفسه، وإلا تعذّر على من ينظر إلى الخريطة أن يعرف أين تنتهي ولاية وتبدأ أخرى. اضغط أي منطقة لتبدأ التلوين منها. تسير الصورة حينها حول الخريطة، وتعطي كل منطقة جديدة أصغر رقم لون لم يستخدمه أي من جيرانها الملوَّنين بالفعل. +نريد أن يختلف لون كل منطقة عن ألوان المناطق التي تشترك معها في حد. أما المناطق غير المتجاورة فيمكنها استخدام اللون نفسه. نمثل كل منطقة برأس، وكل حد مشترك بحافة؛ فيصبح المطلوب أن يختلف لونا طرفي كل حافة. -SA أكثر منطقة انشغالًا هنا، فهي تشترك في حدود مع خمس مناطق أخرى، ولذلك هي أول من تنفد أمامه الخيارات حين تقل الألوان. بلونين فقط، تُظلَّل بالأحمر أي جارة من جاراتها المتلامسة فيما بينها تُلوَّن أخيرًا ولا يبقى لها لون صالح. أضف لونًا ثالثًا فيختفي التصادم كليًا. يتبين أن ثلاثة ألوان تكفي كل منطقة في هذه الخريطة، أيًا كان ترتيب العدّ. +يستخدم الرسم طريقة جشعة: تزور المناطق بالترتيب المعروض وتعطي كل منطقة أول لون متاح، دون تعديل الاختيارات السابقة. يعني الحد المتقطع أن الطريقة لم تجد لونًا مسموحًا لهذه المنطقة. ولإثبات أن لونين لا يكفيان هنا، انظر إلى مثلث WA–NT–SA: كل منطقتين فيه متجاورتان، فتحتاج الثلاث إلى ثلاثة ألوان مختلفة. ## Formal -يُعطي التلوين السليم لمخطط $G$ كل رأس لونًا، بحيث لا يصل أي ضلع بين رأسين باللون نفسه. عدد التلوين اللوني $\chi(G)$ هو أقل عدد ألوان يستخدمه أي تلوين سليم. مناطق الخريطة وحدودها المشتركة تكوّن بالضبط رسمًا بيانيًا كهذا، رأس واحد لكل منطقة وضلع واحد لكل حدود مشتركة. +التلوين الصحيح لرسم بياني بسيط ومنتهٍ $G$ يخصص ألوانًا للرؤوس بحيث يختلف لون كل رأسين متجاورين. العدد اللوني $\chi(G)$ هو أقل عدد ألوان يكفي لذلك. وهو خاصية للرسم نفسه، لا لترتيب واحد نختاره للتلوين. -طريقة جشعة بسيطة تجد دائمًا تلوينًا سليمًا، وإن لم يكن الأرخص. زُر الرؤوس بأي ترتيب، وأعطِ كل رأس أصغر رقم لون لم يستخدمه جار سبق تلوينه. لكل رأس على الأكثر $\Delta(G)$ جيران، فعند دوره يمكن أن تُحظر على الأكثر $\Delta(G)$ ألوان بسببهم. لذلك تكفي $\Delta(G)+1$ ألوان دائمًا لنجاح هذه الطريقة. $\chi(G) \le \Delta(G) + 1$. +لتكن $\Delta(G)$ أكبر درجة لرأس في الرسم. عندما تصل الطريقة الجشعة إلى رأس، تمنع ألوان جيرانه الملوّنين مسبقًا استخدام ما لا يزيد على $\Delta(G)$ لونًا. إذا أتحنا $\Delta(G)+1$ لونًا، بقي لون واحد على الأقل، فنثبت $\chi(G) \le \Delta(G)+1$. ## Advanced -للخرائط المرسومة على صفحة مسطحة تحديدًا، تصح حقيقة أقوى بكثير، مهما تشابكت الحدود أو ارتفعت درجة أي منطقة بمفردها. أربعة ألوان تكفي دائمًا. هذه هي نظرية الألوان الأربعة، افتُرضت عام 1852 وأُثبتت أخيرًا عام 1976 على يد كينيث أبيل وولفغانغ هاكن، بمساعدة حاسوب تحقق من نحو 1900 حالة خاصة. كانت أول نظرية كبرى اعتمد إثباتها فعليًا على آلة. +يمكن تلوين أي رسم بياني مستوٍ تلوينًا صحيحًا بأربعة ألوان على الأكثر. لكن وجود هذا التلوين لا يعني أن كل ترتيب للطريقة الجشعة سيجده. ولا تنطبق النتيجة على كل مسائل الجدولة، لأن علاقات التعارض قد تكوّن رسمًا غير مستوٍ. وفي الخرائط، لا يُعدّ التقاء منطقتين عند نقطة واحدة حدًا مشتركًا. ## Derivation -1. لوّن المناطق واحدة تلو الأخرى، بأي ترتيب تريد، وأعطِ المنطقة التالية دائمًا أصغر رقم لون لم يستخدمه أي من جيرانها الملوَّنين بالفعل. -2. تلامس أي منطقة على الأكثر $\Delta(G)$ منطقة أخرى، فحين يأتي دورها يمكن أن يكون على الأكثر $\Delta(G)$ رقم لون قد استُبعد بسبب جيرانها. -3. يبقى لون واحد حر على الأقل كلما توفر $\Delta(G)+1$ لونًا، فلا تتعثر هذه الطريقة أبدًا متى تحقق $\chi(G) \le \Delta(G)+1$. +1. نزور الرؤوس بالترتيب، ونختار لكل رأس لونًا لا يستخدمه أي جار سبق تلوينه. +2. لا يزيد عدد الألوان الممنوعة على عدد الجيران، ولا يزيد عدد الجيران على أكبر درجة في الرسم. +3. إتاحة لون إضافي فوق تلك الدرجة تضمن بقاء اختيار في كل خطوة، فتنتج الطريقة تلوينًا صحيحًا. ## Real world -### جدولة الامتحانات والمناوبات -كل امتحان منطقة، وامتحانان يتلامسان إن اضطر أي طالب لأدائهما معًا. التلوين حسب الفترة الزمنية المسموحة يضمن ألا يُطلب من طالب حضور امتحانين معًا أبدًا، والحيلة نفسها تجدول مناوبات العمل حول الموظفين المشتركين. +### جداول الاختبارات -### أبراج الهاتف المحمول -يجب أن تستخدم الأبراج اللاسلكية المتقاربة قنوات تردد مختلفة، وإلا تداخلت إشاراتها، تمامًا كمناطق الخريطة المتلامسة التي تحتاج ألوانًا مختلفة. يحل مخططو الشبكات مسألة تلوين لإعادة استخدام أقل عدد ممكن من القنوات عبر مدينة كاملة. +نمثل الاختبارات برؤوس، ونصل اختبارين إذا كان هناك طالب سيؤديهما معًا. تمثل الألوان المواعيد، ويمنع التلوين الصحيح تعارضها، مع معالجة بقية شروط الجدولة على حدة. -### تخصيص السجلات في المترجمات -يخصص المترجم لكل متغير في برنامج قيد التشغيل واحدًا من عدد محدود من سجلات المعالج. متغيران يُستخدمان في الوقت نفسه لا يمكن أن يتشاركا سجلًا، فيلوّن المترجم رسمًا بيانيًا للمتغيرات ليحشرها في أقل عدد ممكن من السجلات. +### شروط السودوكو -### السودوكو وأطالس الطباعة -السودوكو لغز تلوين متنكر. كل خلية رأس، والخلايا المشتركة في صف أو عمود أو مربع يصل بينها ضلع. من يلوّن أطلسًا حقيقيًا للطباعة يستخدم القاعدة نفسها المتبعة في هذا الدرس، فيقلل تكلفة الحبر بعدم استخدام ألوان أكثر مما تقوله نظرية الألوان الأربعة. +نمثل الخانات برؤوس، ونصل الخانات التي يجب أن تختلف أرقامها. تقوم الأرقام بدور الألوان، وتثبت المعطيات بعض الألوان قبل إكمال الباقي. diff --git a/content/lessons/discrete/graph-colouring/en.md b/content/lessons/discrete/graph-colouring/en.md index 4fa93931..4ebb8130 100644 --- a/content/lessons/discrete/graph-colouring/en.md +++ b/content/lessons/discrete/graph-colouring/en.md @@ -1,68 +1,61 @@ --- title: 'Graph colouring: maps and schedules' -summary: >- - Colour every region of a map so that no two touching regions share a - colour, and you never need more than four — the same trick keeps clashing - exams, radio channels and computer variables apart. +summary: 'Assign colours so neighbouring vertices differ, then distinguish a successful colouring from a proof that fewer colours are impossible.' parameters: - k: colours allowed — how many colours you are allowed to use - order: start — which region the colouring begins from (tap a region) + k: 'k — number of available colours' + order: 'order — first region in the cyclic processing order; tap a region' variables: - - the graph made from the map — one node per region, one edge wherever two regions share a border - - the chromatic number — the fewest colours any proper colouring of the map can use - - the maximum degree — the largest number of neighbours any single region touches + - 'G: graph of regions and shared borders' + - 'χ: fewest colours needed for a proper colouring' + - 'Δ: largest number of neighbours of any vertex' --- ## Try it -1. Tap the WA region to start colouring from there, and watch each region fill in with the smallest colour number not already used by an already-coloured neighbour. -2. Drag "colours allowed" down to 2 and notice SA — the region touching the most others — turn hatched red: two colours are not enough for this map. -3. Drag "colours allowed" back up to 3, then to 4, and watch the red hatching disappear both times. +1. Set order = 0 (WA) and k = 2. SA has no available colour and receives a dashed red outline. +2. Keep order = 0 and set k = 3. Every region gets a colour without a conflict. +3. Keep k = 3 and set order = 4. QLD now has no available colour. The starting region changes the greedy choices; a failed attempt alone does not prove that no colouring exists. ## Real-life examples -1. **Two colours are not enough.** With only two colours allowed, starting the count at Western Australia, South Australia ends up clashing with a neighbour — proof that this map genuinely needs more than two. -2. **The minimum that works.** Three colours, again starting at Western Australia, colour every one of the seven regions with no clash at all — the fewest colours this real map actually needs. -3. **The theorem's promise.** Four colours, starting instead from South Australia, also finish with zero clashes — the number the four-colour theorem guarantees will always be enough, for any flat map at all. +1. **Two colours.** With k = 2 and order = 0, WA and NT use different colours. SA borders both and needs a third. These three mutually adjacent regions prove that two colours cannot work. +2. **Three colours.** With k = 3 and order = 0, every region is coloured. Combining this construction with the triangle argument proves that the minimum is exactly three. +3. **Four available colours.** With k = 4 and order = 2, the method completes a colouring. Allowing four colours does not mean that all four must be used. ## Test yourself -1. Set "colours allowed" to 2 and find the region that always ends up hatched red, whichever region you start counting from. -2. Set "colours allowed" to 4, the number the four-colour theorem promises is always enough for a map drawn on a flat page. -3. Start the colouring from Tasmania, the one region with no shared border with any other, and see that it is never the one hatched red. +1. Set k = 2 and inspect which regions the method cannot colour. +2. Set k = 4 and inspect the resulting colouring. +3. Set order = 6 to begin with TAS, which has no shared borders in this model. ## Intuition -Picture a simplified map of Australia's states and territories, split into seven regions. Two regions that share a real border, like Western Australia and South Australia, are not allowed to be painted the same colour — otherwise you could not tell on the map where one state ends and the other begins. Tap any region to start colouring from there; the picture then works its way around the map, giving each new region the lowest-numbered colour that none of its already-painted neighbours are using. +Suppose each region needs a colour different from every region sharing a border with it. Regions that do not share a border may reuse a colour. We can represent each region by a vertex and each shared border by an edge; then the rule is that the two ends of every edge must differ. -South Australia is the busiest region here — it shares a border with five others — so it is the first to run out of options when colours are scarce. With only two colours allowed, whichever of its mutually touching neighbours gets coloured last is left with no valid colour, and is shown hatched in red. Add a third colour and the clash disappears completely: three colours turn out to be enough for every region in this map, however you order the count. +The diagram uses a greedy method: process the regions in the displayed order and give each the first available colour. It never revises an earlier choice. A dashed outline means this procedure has run out of allowed colours at that region. To prove that two colours are impossible here, use the triangle WA–NT–SA: all three pairs are neighbours, so all three need different colours. ## Formal -A proper colouring of a graph $G$ assigns each vertex a colour so that no edge joins two vertices of the same colour. The chromatic number $\chi(G)$ is the fewest colours any proper colouring can use; a map's regions and shared borders form exactly such a graph, one vertex per region and one edge per shared border. +A proper colouring of a finite simple graph $G$ assigns colours to vertices so that adjacent vertices differ. The chromatic number $\chi(G)$ is the minimum number needed. This is a property of the graph, not of one chosen processing order. -A simple greedy method always finds some proper colouring, though maybe not the cheapest one: visit the vertices in any order, and give each the lowest-numbered colour not already used by an earlier-coloured neighbour. Since a vertex has at most $\Delta(G)$ neighbours, at most $\Delta(G)$ colours can be blocked when its turn arrives, so $\Delta(G)+1$ colours are always enough for this method to succeed: $\chi(G) \le \Delta(G) + 1$. +Let $\Delta(G)$ be the largest vertex degree. When greedy colouring reaches a vertex, at most $\Delta(G)$ colours are forbidden by previously coloured neighbours. With $\Delta(G)+1$ colours, at least one remains available, proving $\chi(G) \le \Delta(G)+1$. ## Advanced -For maps drawn on a flat page specifically, a far stronger fact holds no matter how tangled the borders are or how high any one region's degree climbs: four colours always suffice. That is the four-colour theorem, conjectured in 1852 and finally proved in 1976 by Kenneth Appel and Wolfgang Haken with the help of a computer checking around 1,900 special cases — the first major theorem whose proof genuinely depended on a machine. +Every planar graph can be properly coloured with at most four colours. This existence theorem does not say that any greedy order will find such a colouring. It also does not apply to every scheduling graph: conflicts in a schedule may form a nonplanar graph. For maps, sharing only a point does not count as sharing a border. ## Derivation -1. Colour the regions one at a time, in whatever order you like, always giving the next region the smallest colour number that none of its already-coloured neighbours are using. -2. Any single region touches at most $\Delta(G)$ other regions, so when its turn comes, at most $\Delta(G)$ colour numbers can already be ruled out by its neighbours. -3. That leaves at least one colour free whenever $\Delta(G)+1$ colours are available, so this method can never get stuck once $\chi(G) \le \Delta(G)+1$. +1. Visit the vertices in order, choosing a colour not used by any already coloured neighbour. +2. The number of forbidden colours cannot exceed the number of neighbours, which is at most the graph's maximum degree. +3. One more colour than that maximum guarantees an available choice at every step, so the method constructs a proper colouring. ## Real world -### Exam and shift scheduling -Each exam is a region, and two exams touch if any student must sit both; colouring by allowed time-slot guarantees no student is ever asked to be in two exams at once, and the same trick schedules work shifts around shared staff. +### Exam timetables -### Mobile phone masts -Nearby radio masts must use different frequency channels or their signals interfere, exactly like touching map regions needing different colours; network planners solve a colouring problem to reuse as few channels as possible across a whole city. +Represent exams by vertices and connect two if a student must take both. Colours represent time slots. A proper colouring avoids clashes, assuming other scheduling restrictions are handled separately. -### Register allocation in compilers -A compiler assigns each variable in a running program to one of a small number of processor registers; two variables that are both in use at the same time cannot share a register, so the compiler colours a graph of variables to pack them into as few registers as it can. +### Sudoku constraints -### Sudoku and printed atlases -Sudoku is a colouring puzzle in disguise — each cell is a vertex, and cells sharing a row, column or box are joined by an edge; printers colouring a real atlas use the very same rule as this lesson, keeping ink costs down by never using more colours than the four-colour theorem says they need to. +Represent cells by vertices and connect cells that must contain different digits. Digits act as colours. The given clues fix some colours before the remaining cells are filled. From 8a562f400bf2e012ae951377d46548b96ece62eb Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:44:20 +0300 Subject: [PATCH 015/124] content: rewrite graphs-and-euler-paths for first-time learners in both languages --- .../discrete/graphs-and-euler-paths/ar.md | 57 ++++++++---------- .../discrete/graphs-and-euler-paths/en.md | 59 ++++++++----------- .../graphs-and-euler-paths/lesson.yaml | 2 +- 3 files changed, 53 insertions(+), 65 deletions(-) diff --git a/content/lessons/discrete/graphs-and-euler-paths/ar.md b/content/lessons/discrete/graphs-and-euler-paths/ar.md index 5db99ab0..a42bc9a1 100644 --- a/content/lessons/discrete/graphs-and-euler-paths/ar.md +++ b/content/lessons/discrete/graphs-and-euler-paths/ar.md @@ -1,65 +1,60 @@ --- title: 'المخططات ومسارات أويلر' -summary: >- - عدّ الطرق عند كل محطة، فتعرف هل يمكن المرور بكل طريق مرة واحدة فقط. +summary: 'عدّ الوصلات عند كل رأس لتعرف هل يمكن اجتياز شبكة متصلة باستعمال كل حافة مرة واحدة فقط.' parameters: - start: start — العقدة التي يبدأ منها البحث - step: step — مدى تقدّم البحث + start: 'start — رأس البداية: من A = 0 إلى J = 9' + step: 'step — تقدم البحث من 0 إلى 1' variables: - - v — عقدة (رأس) واحدة من المخطط - - 'الدرجة: عدد الأضلاع الملامسة لرأس ما' + - 'v: أحد رؤوس الرسم البياني' + - 'الدرجة: عدد الحواف المتصلة بالرأس' --- ## Try it -1. اضغط المحطة A لتجعلها البداية، وراقب محطاتها المجاورة تضيء خضراء واحدة تلو الأخرى. -2. حرّك step ببطء من 0 إلى 1 وراقب الأرقام فوق كل محطة تمتلئ، كل رقم هو المسافة بالدقائق من البداية. -3. عُدّ الخطوط الملامسة للمحطة G، هذا العدد هو درجتها، ويحدد كم اتجاهًا يمكن أن يتفرع منها البحث. +1. اضبط start = 0 لاختيار A، وstep = 0. زد step نحو 1 لمتابعة البحث بالعرض. تستكشف الحركة الرؤوس، ولا تنشئ مسار أويلر. +2. عدّ الحواف المتصلة بـA ثم B: للأولى حافتان وللثانية ثلاث. تجاهل الأعداد المكتوبة على الحواف عند عدّ الوصلات. +3. احسب درجات الرؤوس العشرة. للرؤوس B وD وE وH درجات فردية، لذا لا يوجد في هذا الرسم المتصل مسار يستعمل كل حافة مرة واحدة فقط. ## Real-life examples -1. **الانطلاق من المستودع الرئيسي.** تبدأ شركة توصيل كل جولة صباحية من المحطة A، وهي المستودع. تشغّل البحث كاملًا (step = 1) لترى ترتيب وصول الشاحنات إلى المحطات العشر كلها. -2. **الانطلاق من مستودع فرعي.** تفتح الشركة نفسها مستودعًا ثانيًا عند المحطة F. يبدأ البحث منه فيصل إلى مجموعة مختلفة من المحطات أولًا، وبترتيب مختلف. -3. **نصف دوام.** يتحقق موزّع من مسار المحطة C في منتصف الصباح (step = 0.5) ليرى أي المحطات وصلها البحث فعلًا وأيها ما زال بالانتظار. +1. **بدء الاستكشاف من المستودع A.** عند start = 0 وstep = 1، يكون البحث قد زار المواقع العشرة. وصلات الاكتشاف لا تمثل رحلة تمر بكل طريق مرة واحدة. +2. **بدء الاستكشاف من المستودع F.** عند start = 5 وstep = 1، يتغير ترتيب الزيارة. لكن درجات الرؤوس لا تتغير، فتظل النتيجة المتعلقة بمسار أويلر كما هي. +3. **إيقاف البحث مؤقتًا.** عند start = 2 وstep = 0.5، افحص الجزء المستكشف. الوصول إلى منتصف خطوات العرض لا يعني قطع نصف مسافة الطرق. ## Test yourself -1. جد محطة يلتقي عندها عدد فردي من الطرق (توجد أربع محطات كهذه في الخريطة). -2. جد محطة تلتقي عندها أربعة طرق، أعلى درجة في هذه الخريطة. -3. أوقف البحث مؤقتًا عند نصف مساره بالضبط (step = 0.5). +1. اختر رأسًا درجته فردية. +2. اختر رأسًا درجته 4، وهي أكبر درجة في هذا الرسم. +3. اضبط تقدم البحث على 0.5. ## Intuition -تخيّل عشر محطات توصيل، من A إلى J، تربط بينها طرق تستغرق من 2 إلى 7 دقائق بالسيارة، وهذا هو الرقم المكتوب على كل خط. اضغط المحطة A لتجعلها نقطة البداية، ثم حرّك المنزلق step من 0 إلى 1 لترى البحث ينتشر طبقة تلو طبقة. تضيء المحطات المتصلة مباشرة بـA أولًا باللون الأخضر، ثم التي تبعدها طريق واحد إضافي. تلمس المحطة C أربعة خطوط، فلها فرص تفرّع أكثر من المحطة A التي تلمس طريقين فقط. +نمثل التقاطعات برؤوس والطرق بحواف تصل بينها. درجة الرأس هي عدد الحواف المتصلة به. تتصل A برأسين هما B وF، وتتصل B بثلاثة رؤوس هي A وC وG. الأوزان المكتوبة على الطرق معلومات مستقلة، ولا تدخل في حساب الدرجة. -أربع من هذه المحطات يلتقي عندها عدد فردي من الطرق: B وD وE وH. يسمّي الرياضيون هذا العدد درجة الرأس، ويكتبونها $\deg(v)$، ومسار واحد يعبر كل طريق مرة واحدة بالضبط، أي مسار أويلر، لا يوجد إلا حين يكون لدى صفر أو محطتين درجة فردية. في هذه الخريطة أربع محطات فردية الدرجة، فلا يوجد مسار يغطي كل طريق مرة واحدة فقط، لا بد أن تعيد طريقًا واحدًا على الأقل. +تخيل رحلة تستعمل كل طريق مرة واحدة. كلما مررت بتقاطع في أثناء الرحلة، تستخدم حافة للدخول وأخرى للخروج، فتأتي الحواف في أزواج. وحدهما رأسا البداية والنهاية قد تبقى عندهما حافة دون زوج. في هذا الرسم أربعة رؤوس فردية الدرجة، هي B وD وE وH، ولذلك لا يمكن تنفيذ هذه الرحلة. ## Formal -المخطط يتكون من رؤوس (العقد) وأضلاع (الصلات بين أزواجها). والمسار سلسلة أضلاع تزور الرؤوس واحدًا بعد آخر دون تكرار ضلع. درجة الرأس، $\deg(v)$، هي ببساطة عدد الأضلاع الملامسة له. +يتكون الرسم البياني غير الموجّه من رؤوس وحواف تصل بينها. تحسب الدرجة $\deg(v)$ عدد الحواف المتصلة بالرأس v، وتُحسب الحلقة مرتين إذا سمح الرسم بحلقات. يمكن للمسار الذي لا يكرر الحواف أن يزور رأسًا أكثر من مرة. ويستعمل مسار أويلر كل حافة في الرسم مرة واحدة بالضبط. -مسار أويلر، وهو جولة تستخدم كل ضلع في المخطط مرة واحدة بالضبط، يوجد إذا وفقط إذا كان للرسم البياني صفر أو رأسان بدرجة فردية. فمع الصفر يمكن أن تبدأ الجولة وتنتهي في أي مكان، ومع الرأسين لا بد أن تبدأ عند أحدهما وتنتهي عند الآخر. +في رسم بياني غير موجّه ومنتهٍ يحتوي على حافة واحدة على الأقل، يوجد مسار أويلر إذا وفقط إذا كانت جميع الرؤوس المتصلة بحواف ضمن مكوّن متصل واحد، وكان عدد الرؤوس فردية الدرجة صفرًا أو اثنين. عند الصفر يكون المسار مغلقًا، ويمكن بدؤه من أي رأس متصل بحافة. وعند الاثنين يجب أن يبدأ بأحدهما وينتهي بالآخر. ## Advanced -سأل لغز جسور كونيغسبرغ إن كان بإمكان ماشٍ عبور الجسور السبعة كلها مرة واحدة بالضبط، وأثبت أويلر استحالة ذلك لأن قطع اليابسة الأربع كلها بدرجة فردية، أكثر بكثير من الاثنين المسموح بهما. الشجرة مخطط خاص بلا دورات إطلاقًا، له بالضبط $n-1$ ضلعًا لـn رأس، ومسار واحد بالضبط بين أي رأسين، الحد الأدنى الصارم من الصلات اللازمة لإبقاء المخطط متصلًا. +توضح حجة أزواج الحواف لماذا يلزم شرط الدرجات. ولإثبات كفايته، يمكن بناء مسارات ودمج المسارات المغلقة فيها حتى نستخدم جميع الحواف. شرط الاتصال ضروري: لدورتين منفصلتين درجات زوجية كلها، لكن لا يمكن اجتيازهما بمسار واحد. أما البحث بالعرض المعروض هنا فيقلل عدد الحواف للوصول إلى الرؤوس؛ ومجموع الأوزان الذي يعرضه ليس بالضرورة أقل مجموع ممكن. ## Derivation -1. كلما مرّ مسار أويلر برأس دون أن يتوقف عنده، يدخل عبر ضلع ويخرج عبر آخر، مستهلكًا ضلعين بالضبط من أضلاع ذلك الرأس. -2. بما أن كل زيارة لرأس غير طرفي تستهلك الأضلاع اثنين اثنين، لا بد أن تخرج درجة ذلك الرأس زوجية تمامًا دون فائض. -3. طرفا المسار وحدهما يمكن أن يكسرا هذا النمط، لأنهما يستخدمان ضلعًا واحدًا فقط عند البداية أو النهاية، فلا يُسمح إلا لرأسين على الأكثر بدرجة فردية. +1. في كل زيارة وسطية، نستخدم حافة للدخول وحافة أخرى للخروج، لأن مسار أويلر لا يكرر الحافة. +2. تتجمع هذه الاستخدامات في أزواج عند كل رأس عدا طرفي مسار مفتوح، فتكون درجة كل رأس وسطي زوجية. +3. يبقى استخدام واحد دون زوج عند كل طرف لمسار مفتوح، ولا يبقى شيء في المسار المغلق. لذلك يوجد رأسان فرديا الدرجة أو لا يوجد أي منهما، مع ضرورة تحقق الاتصال أيضًا. ## Real world -### شبكات الطرق والتوصيل -تحتاج جرافة ثلج أو ساعي بريد مسارًا يغطي كل شارع في الحي مرة واحدة بالضبط. هذا المسار السلس لا يوجد إلا حين يحقق المخطط للشوارع قاعدة الدرجة الفردية. +### المرور بكل الشوارع -### الشبكات الاجتماعية -كل شخص رأس وكل صداقة ضلع. درجة الشخص هي ببساطة عدد أصدقائه المباشرين، ويكشف المخطط كله عن تجمعات وموصلات مركزية. +في شبكة شوارع غير موجّهة، تحدد القاعدة إمكان المرور بكل شارع مرة واحدة. إذا لم تتحقق، نحتاج إلى تكرار بعض الطرق أو تقسيم العمل إلى رحلات. -### لوحات الدوائر والأسلاك -تستخدم أدوات تصميم أجهزة التوجيه ولوحات الدوائر المطبوعة بنية المخطط لتخطيط المسارات. وغالبًا ما تُفضَّل الأسلاك على شكل شجرة، بلا دورات، لضمان مسار وحيد بين أي نقطتين. +### الرسم دون إعادة خط -### الإنترنت وشبكات الحاسوب -أجهزة التوجيه رؤوس والصلات المادية أو المنطقية أضلاع. الأفكار نفسها عن الدرجة والاتصال تحدد إمكانية الوصول وكيفية توجيه حركة المرور حول رابط معطّل. +اعتبر التقاطعات ونهايات الخطوط رؤوسًا. يحدد الاختبار نفسه إمكان رسم الشكل بخط متصل دون إعادة أي جزء، بشرط أن تكون حوافه ضمن جزء متصل واحد. diff --git a/content/lessons/discrete/graphs-and-euler-paths/en.md b/content/lessons/discrete/graphs-and-euler-paths/en.md index 7b6af5df..bc51cce8 100644 --- a/content/lessons/discrete/graphs-and-euler-paths/en.md +++ b/content/lessons/discrete/graphs-and-euler-paths/en.md @@ -1,67 +1,60 @@ --- title: 'Graphs and Euler paths' -summary: >- - Count how many roads meet at each hub, and you can tell whether a single - route could use every road exactly once, without trying every possible - order. +summary: 'Count the connections at each vertex to decide whether a connected network can be traversed using every edge exactly once.' parameters: - start: start — node the search begins from - step: step — how far the search has progressed + start: 'start — starting vertex: A = 0 through J = 9' + step: 'step — progress through the search, from 0 to 1' variables: - - v — a single vertex (node) of the graph - - 'degree: how many edges touch a vertex' + - 'v: a vertex of the graph' + - 'degree: number of edges meeting a vertex' --- ## Try it -1. Tap hub A to set it as the start, then watch hub A's neighbours turn green one by one as the search finds them. -2. Drag the step slider slowly from 0 to 1 and watch the numbers above each hub fill in — each one is that hub's distance from the start, in minutes. -3. Count the lines touching hub G: that count is its degree, and it sets how many directions the search could branch from there. +1. Set start = 0 (A) and step = 0. Increase step toward 1 to inspect a breadth-first search. This animation explores vertices; it does not construct an Euler route. +2. Count the edges meeting A and B: A has 2, B has 3. Ignore the numbers on the edges when counting connections. +3. Count all ten degrees. B, D, E and H have odd degree, so this connected graph has no route using every edge exactly once. ## Real-life examples -1. **Dispatching from the main depot.** A courier company starts every morning route at hub A, the depot, and plays the whole search (step = 1) to see the order trucks would reach all ten hubs. -2. **Starting from a satellite warehouse.** The same company opens a second warehouse at hub F, and starting the search there instead reaches a different set of hubs first, in a different order. -3. **A half-finished shift.** A dispatcher checks hub C's route halfway through the morning (step = 0.5) to see which hubs have already been reached and which are still waiting. +1. **Exploring from depot A.** With start = 0 and step = 1, the search has visited all ten hubs. Its discovery connections do not form a trip covering every road once. +2. **Exploring from depot F.** With start = 5 and step = 1, the visit order changes. The degrees do not change, so the Euler-route conclusion stays the same. +3. **Pausing the search.** With start = 2 and step = 0.5, inspect the partially explored graph. Halfway through the animation does not mean half the road distance has been travelled. ## Test yourself -1. Find a hub where an odd number of roads meet (there are four such hubs in this map). -2. Find a hub where four roads meet, the highest degree in this map. -3. Pause the search exactly halfway through its run. +1. Select a vertex with odd degree. +2. Select a vertex with degree 4, the largest degree in this graph. +3. Set the search progress to 0.5. ## Intuition -Picture ten delivery hubs, labelled A to J, joined by roads that take between 2 and 7 minutes to drive, the number printed on each line. Tap hub A to make it the starting point, then drag the step slider from 0 to 1 to watch the search spread outward one layer at a time. The hubs directly joined to A turn green first, then the ones one road further away. Hub C touches four lines, so it has more ways to branch than hub A, which touches only two roads. +Represent junctions by vertices and roads by edges. The degree of a vertex is the number of edges meeting it. A has two connections, to B and F. B has three, to A, C and G. The weights printed on the roads are separate information; they do not affect degree. -Four of these hubs have an odd number of roads meeting them: B, D, E and H. Mathematicians call that count the degree of a vertex, written $\deg(v)$, and a single walk that crosses every road exactly once, an Euler path, can only exist when 0 or 2 hubs have an odd degree. This map has four odd hubs, so no route can cover every road just once — you would have to retrace at least one. +Imagine a route that uses every road once. Whenever it passes through an intermediate junction, it uses one edge to enter and another to leave. Those edges pair up. Only the starting and ending vertices can have an unpaired edge. This graph has four odd-degree vertices, B, D, E and H, so it cannot have such a route. ## Formal -A graph consists of vertices (the nodes) and edges (the connections between pairs of them); a path is a sequence of edges that visits vertices one after another without repeating an edge. The degree of a vertex, $\deg(v)$, is simply how many edges touch it. +An undirected graph consists of vertices and edges joining them. The degree $\deg(v)$ counts edges incident to v, counting a loop twice if loops are allowed. A trail may revisit vertices but does not repeat edges. An Euler trail, often called an Euler path, uses every edge exactly once. -An Euler path — a walk that uses every edge of the graph exactly once — exists if and only if the graph has zero or two vertices of odd degree; with zero, the walk can start and end anywhere, and with two, it must start at one odd vertex and end at the other. +For a finite undirected graph with at least one edge, an Euler trail exists exactly when all vertices incident to edges lie in one connected component and there are zero or two odd-degree vertices. With zero, the trail closes and may start at any vertex incident to an edge. With two, those vertices must be its endpoints. ## Advanced -The Königsberg bridge problem asked whether a walker could cross all seven bridges exactly once; Euler showed it was impossible because all four landmasses had odd degree, far more than the two allowed. A tree is a special graph with no cycles at all, exactly $n-1$ edges for n vertices, and exactly one path between any two vertices — the strict minimum of connections needed to keep a graph connected. +The pairing argument explains why the degree condition is necessary. To show sufficiency, one can build trails and splice closed trails into them until every edge is used. Connectivity is essential: two separate cycles have only even degrees, yet no single trail can cover both. The breadth-first search shown here minimizes edge count to reachable vertices; its displayed accumulated weights need not be minimum-weight distances. ## Derivation -1. Any time an Euler path passes through a vertex without stopping there, it enters along one edge and leaves along another, using up exactly two of that vertex's edges. -2. Since every visit to a non-endpoint vertex uses edges two at a time, that vertex's total degree must come out even, with nothing left over. -3. Only the walk's two endpoints can break that pattern, since they use just one edge each at the very start or the very end, so at most two vertices are allowed to have odd degree. +1. At an intermediate visit, arrival and departure use two distinct edges because an Euler trail cannot reuse an edge. +2. At every vertex other than two distinct endpoints, these uses pair up, making the degree even. +3. An open trail leaves one unpaired use at each endpoint. A closed trail leaves none. Thus an Euler trail has two odd-degree vertices or zero; connectivity is also required. ## Real world -### Road and delivery networks -A route that covers every street in a neighbourhood exactly once, like some snowplough or mail routes, only exists cleanly when the street graph obeys the odd-degree rule. +### Covering every street -### Social networks -Each person is a vertex and each friendship an edge; a person's degree is simply their number of direct friends, and the whole graph reveals clusters and central connectors. +For an undirected street network, the rule tells us whether a route can cover each street exactly once. If not, a route covering all streets must repeat some edges or use multiple trips. -### Circuit boards and wiring -Router and printed-circuit-board tools use graph structure to plan traces, and tree-shaped wiring (no cycles) is often preferred to guarantee a unique path between any two points. +### Drawing without retracing -### The internet and computer networks -Routers are vertices and physical or logical links are edges; the same degree and connectivity ideas decide reachability and how traffic can route around a failed link. +Treat intersections and endpoints in a line drawing as vertices. The same test determines whether the drawing can be traced in one stroke without retracing a line, provided its edges form one connected part. diff --git a/content/lessons/discrete/graphs-and-euler-paths/lesson.yaml b/content/lessons/discrete/graphs-and-euler-paths/lesson.yaml index aae87b88..47c0e4b6 100644 --- a/content/lessons/discrete/graphs-and-euler-paths/lesson.yaml +++ b/content/lessons/discrete/graphs-and-euler-paths/lesson.yaml @@ -1,7 +1,7 @@ id: graphs-and-euler-paths subject: discrete difficulty: high-school -equation: \deg(v) = \text{edges touching } v, \quad \text{Euler path} \iff 0 \text{ or } 2 \text{ vertices have odd } \deg(v) +equation: \text{Connected undirected graph } \deg(v) = \text{edges touching } v, \quad \text{Euler path} \iff 0 \text{ or } 2 \text{ vertices have odd } \deg(v) concepts: - graph - vertex From 2340a3d74ff8825ef4a4c72df8f0f436edff7833 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:44:20 +0300 Subject: [PATCH 016/124] content: rewrite implication-and-equivalence for first-time learners in both languages --- .../implication-and-equivalence/ar.md | 63 +++++++++--------- .../implication-and-equivalence/en.md | 64 +++++++++---------- 2 files changed, 58 insertions(+), 69 deletions(-) diff --git a/content/lessons/discrete/implication-and-equivalence/ar.md b/content/lessons/discrete/implication-and-equivalence/ar.md index e410a7a8..42b2d209 100644 --- a/content/lessons/discrete/implication-and-equivalence/ar.md +++ b/content/lessons/discrete/implication-and-equivalence/ar.md @@ -1,68 +1,63 @@ --- title: 'الاستلزام والتكافؤ' -summary: >- - «إذا أمطرت ابتلّ الشارع» لا تعني «إذا ابتلّ الشارع أمطرت». هنا ترى الفرق. +summary: 'ميّز بين «إذا صحت p فإن q تصح» و«للعبارتين p وq قيمة الصواب نفسها».' parameters: - a: a — المدخل الأول (0 أو 1) - b: b — المدخل الثاني (0 أو 1) + a: 'a — العبارة الأولى: خاطئة (0) أو صحيحة (1)' + b: 'b — العبارة الثانية: خاطئة (0) أو صحيحة (1)' variables: - - 'p، q: قضيتان، كل منهما إما صادقة (1) أو كاذبة (0)' - - 'XOR: صادقة حين يكون واحد فقط من p وq صادقًا، وكاذبة حين يتفقان' - - 'الاستلزام: كاذب فقط حين تكون p صادقة وq كاذبة' - - 'إذا وفقط إذا: صادقة حين تتشارك p وq القيمة نفسها' - - 'NOT: تقلب الصادق إلى كاذب والكاذب إلى صادق' + - 'p وq: عبارتان يمثلهما a وb' + - 'XOR: تصح عندما تصح عبارة واحدة فقط' + - 'العبارة الشرطية: إذا صحت p فإن q تصح' + - 'التكافؤ: اتفاق قيمتي صواب p وq' + - 'النفي: قلب قيمة الصواب' --- ## Try it -1. ارفع المفتاح a إلى 1 وb إلى 1 وراقب لمبة البوابة، تبقى مطفأة لأن XOR تضيء فقط حين يختلف المدخلان. -2. أعد b إلى 0 فيصبح a يساوي 1 وb يساوي 0، تضيء اللمبة، ويضيء صف (1، 0) في جدول الصدق على اليمين. -3. جرّب التركيبات الأربع لـa وb واقرأ عمود sum في كل مرة، هذا العمود هو بالضبط ما تحسبه XOR. +1. اضبط a = 1 وb = 1. يعطي الرسم خرج XOR يساوي 0 لأن المدخلين متفقان. أما التكافؤ فيكون صحيحًا في هذه الحالة. +2. أبقِ a = 1 وغيّر b إلى 0. يصبح خرج XOR مساويًا 1. وهذا أيضًا الزوج الوحيد الذي يجعل عبارة «إذا صحت a فإن b تصح» خاطئة. +3. اضبط a = 0 وb = 1. يبقى خرج XOR مساويًا 1، لكن العبارة الشرطية تصبح صحيحة. إذن لا يكفي خرج XOR وحده للحكم على صحة العبارة الشرطية. ## Real-life examples -1. **المطر يبلل الأرض.** أمطرت (a = 1) وابتلت الأرض (b = 1)، فتصح القاعدة «إذا أمطرت فالأرض تبتل» تمامًا كما تتوقع. -2. **رشاش يبلل الأرض دون مطر.** لم تمطر (a = 0) لكن رشاشًا بلّل الأرض على كل حال (b = 1). تبقى القاعدة صادقة لأنها تَعِد فقط بما يحدث حين تمطر. -3. **شرفة مسقوفة تبقى جافة تحت المطر.** أمطرت (a = 1) لكن شرفة مسقوفة بقيت جافة (b = 0). هذه هي الحالة الوحيدة التي تكسر القاعدة «إذا أمطرت فالأرض تبتل». +1. **تحقق الشرط والنتيجة.** لتمثل p عبارة «تمطر»، ولتمثل q عبارة «أحمل مظلة». عند a = 1 وb = 1 تصح عبارة «إذا أمطرت أحمل مظلة». ويكون خرج XOR مساويًا 0 لاتفاق قيمتي العبارتين. +2. **تحقق النتيجة دون الشرط.** عند a = 0 وb = 1، أحمل مظلة رغم عدم نزول المطر. لا يناقض ذلك العبارة الشرطية، لأنها لم تحدد ما أفعله عند غياب المطر. خرج XOR هنا يساوي 1. +3. **حالة تنقض العبارة.** عند a = 1 وb = 0، تمطر ولا أحمل مظلة، فتكون العبارة الشرطية خاطئة. خرج XOR يساوي 1 لاختلاف المدخلين. ## Test yourself -1. جد التركيبة الوحيدة للمفتاحين التي تكسر القاعدة «إذا أمطرت فالأرض تبتل». -2. جد تركيبة يختلف فيها المطر وابتلال الأرض، ومع ذلك تبقى القاعدة صادقة. -3. جد تركيبة يتساوى فيها المطر وابتلال الأرض، وكلاهما كاذب في آن واحد. +1. اضبط a = 1 وb = 0، وهي الحالة التي تجعل «إذا صحت a فإن b تصح» خاطئة. +2. اضبط a = 0 وb = 1، فتكون العبارة الشرطية الأصلية صحيحة وعكسها خاطئًا. +3. اجعل العبارتين خاطئتين. تتفق قيمتا صوابهما في هذه الحالة، ويكون خرج XOR مساويًا 0. ## Intuition -اجعل المفتاح a يساوي 1 والمفتاح b يساوي 1، كلاهما مرفوع، ومع ذلك تبقى اللمبة فوق البوابة مطفأة. أرجعهما إلى 0 فتبقى اللمبة مطفأة أيضًا. لا تضيء اللمبة إلا حين يُرفع مفتاح واحد فقط، a يساوي 1 وb يساوي 0، أو العكس، لأن XOR تكافئ الاختلاف بين مدخليها لا الاتفاق. أما OR فمختلفة، فهي تضيء بسرور مع رفع المفتاحين معًا. +تقول عبارة «إذا كان العدد من مضاعفات 4 فإنه زوجي» شيئًا محددًا عن مضاعفات 4. لنقضها، نحتاج إلى عدد من مضاعفات 4 لكنه غير زوجي. أما وجود عدد زوجي مثل 6 فليس نقضًا لها؛ فالعبارة لم تقل إن كل عدد زوجي من مضاعفات 4. -تخيّل قاعدة عن الطقس، أي a يساوي 1 حين تمطر وb يساوي 1 حين تبتل الأرض. الاستلزام «إذا أمطرت فالأرض تبتل» ينكسر في حالة واحدة فقط، حين تكون a يساوي 1 وb يساوي 0، أي مطر بلا أرض مبللة. كل تركيبة أخرى للمفتاحين تُبقي القاعدة صادقة، حتى حين يكون a يساوي 0 وb يساوي 0. أما «إذا وفقط إذا» فأكثر صرامة، فهي صادقة فقط حين يتفق a وb، مرفوعين معًا أو مخفوضين معًا، نمط يكاد يكون عكس لمبة XOR أعلاه. +للعبارة الشرطية اتجاه: نبدأ بشرط ونربطه بنتيجة. أما التكافؤ فيشترط صحة العلاقة في الاتجاهين، ويصح عندما تتفق قيمتا صواب العبارتين. يعرض الرسم عملية أخرى هي XOR، وتعطي 1 عندما تختلف القيمتان. التكافؤ يعكس هذا الخرج، لكن الحكم على العبارة الشرطية يحتاج إلى التمييز بين (1, 0) و(0, 1). ## Formal -$p \oplus q$ (XOR) صادقة بالضبط حين تختلف p وq. $p \Rightarrow q$ صادقة في كل حالة إلا حين تكون p صادقة وq كاذبة، ولافت أنها صادقة كذلك حين تكون p نفسها كاذبة، مهما بدا هذا غريبًا لأول وهلة. $p \iff q$ صادقة بالضبط حين تتحقق $p \Rightarrow q$ و$q \Rightarrow p$ معًا، أي حين تتشارك p وq القيمة نفسها. +تكون $p \Rightarrow q$ خاطئة فقط عندما تصح p وتكون q خاطئة، وتصح في بقية الحالات. أما العكس $q \Rightarrow p$ فيبدّل الاتجاه، وقد تختلف قيمة صوابه. والمقابل المعاكس $\neg q \Rightarrow \neg p$ له دائمًا قيمة الصواب نفسها للعبارة الأصلية. -لكل استلزام عكس ومعكوس نقيض. عكس $p \Rightarrow q$ هو $q \Rightarrow p$، وهو قضية مختلفة لا يلزم أن تكون صادقة. أما المعكوس النقيض $\neg q \Rightarrow \neg p$ فمطابق منطقيًا للأصل، وقيمة صدقه نفسها في كل صف. +تعني $p \iff q$ صحة العلاقتين الشرطيتين معًا، أي اتفاق قيمتي صواب p وq. في المقابل، تصح $p \oplus q$ عندما تختلف القيمتان. هذه العملية، المسماة XOR أو «أو الحصرية»، هي التي يعرضها الرسم وجدوله. ## Advanced -«إذا أمطرت فالأرض مبللة» هي $p \Rightarrow q$ حيث p = «أمطرت» وq = «الأرض مبللة». العكس، «إذا كانت الأرض مبللة فقد أمطرت»، قد يفشل، إذ ربما بلّل رشاش الماء الأرض دون أي مطر، فالاستلزام الصادق لا يبيح أبدًا تبديل طرفيه. المعكوس النقيض وحده، «إذا لم تكن الأرض مبللة فلم تمطر»، مضمون من القضية الأصلية، وتستخدمه البراهين كثيرًا لأنه أسهل في النقاش. +لا تعني صحة العبارة الشرطية بالضرورة وجود علاقة سببية؛ فهي تصف علاقة بين قيمتي الصواب. لإثبات عبارة شرطية في الرياضيات، نستبعد كل حالة يصح فيها الشرط وتخطئ النتيجة. قد يسهل إثبات المقابل المعاكس لأنه يستبعد الحالات نفسها، لكن انطلاقًا من نفي النتيجة. ## Derivation -1. $p \Rightarrow q$ تفشل في صف واحد بالضبط من جدول الصدق، حين تكون p صادقة وq كاذبة. وكل تركيبة أخرى تجعلها صادقة. -2. بدّل الطرفين وانفِهما لتحصل على المعكوس النقيض $\neg q \Rightarrow \neg p$، وتحقق أنه يفشل في الصف نفسه، فتتطابق القضيتان دومًا. -3. بدّل دون نفي لتحصل على العكس $q \Rightarrow p$. يفشل حين تكون q صادقة وp كاذبة، وهو صف مختلف، فهي قضية مختلفة حقًا. +1. تخطئ العبارة الشرطية حين يتحقق شرطها ولا تتحقق نتيجتها، أي عند p = 1 وq = 0. +2. يخطئ المقابل المعاكس عند q = 0 وp = 1، وهي الحالة نفسها. لذلك تتفق العبارتان في جميع صفوف جدول الصواب. +3. يخطئ العكس عند q = 1 وp = 0، وهي حالة مختلفة. ولهذا يحتاج إثبات العكس إلى حجة مستقلة. ## Real world -### التكافؤ ومجاميع التحقق -تقارن XOR البتّات باحثة عن الاختلاف، وتقوم عليها بتّات التكافؤ ومجاميع التحقق التي تكشف خطأ في بتّة واحدة أثناء نقل البيانات. +### وصف الأشكال -### شروط الضمان والقانون -«إذا كسرت الختم يسقط الضمان» تخبرك فقط بما يحدث بعد كسر الختم. فختم سليم وحده لا يثبت أن شيئًا لم يُكسر، والمعكوس النقيض وحده يثبت ذلك. +كل مربع مستطيل، لكن العكس غير صحيح: المستطيل الذي طولا ضلعيه 2 و3 ليس مربعًا. لصياغة تعريف يصح في الاتجاهين، نحتاج إلى إضافة الشرط الناقص. -### تحويل الشبكات -تصل الإشارة إلى مسار واحد بالضبط من مسارين حين يعمل المفتاح في وضع إقصائي يشبه XOR، فلا يحمل المخرجان النبضة نفسها في آن واحد. +### متطلبات البرامج -### البراهين الرياضية -إثبات «إذا كانت n² زوجية فn زوجية» أسهل غالبًا عبر معكوسه النقيض «إذا كانت n فردية فn² فردية»، وهو منطقيًا القضية نفسها. +عبارة «إذا كان حقل الإدخال فارغًا، اعرض رسالة خطأ» تحدد ما يجب أن يحدث عند فراغ الحقل. لكنها لا تقول إن فراغه هو السبب الوحيد الممكن لرسالة الخطأ. diff --git a/content/lessons/discrete/implication-and-equivalence/en.md b/content/lessons/discrete/implication-and-equivalence/en.md index 72a8c67e..00ed49b5 100644 --- a/content/lessons/discrete/implication-and-equivalence/en.md +++ b/content/lessons/discrete/implication-and-equivalence/en.md @@ -1,69 +1,63 @@ --- title: 'Implication and equivalence' -summary: >- - Comparing XOR with "if... then" and "if and only if" shows why swapping an - implication's two halves can turn a true statement false. +summary: 'Distinguish “if p, then q” from “p and q have the same truth value.”' parameters: - a: a — first input (0 or 1) - b: b — second input (0 or 1) + a: 'a — first statement: false (0) or true (1)' + b: 'b — second statement: false (0) or true (1)' variables: - - 'p, q: propositions, each either true (1) or false (0)' - - 'XOR: true when exactly one of p, q is true, false when they agree' - - 'implies: false only when p is true and q is false' - - 'if and only if: true when p and q share the same truth value' - - 'NOT: flips true to false and false to true' + - 'p, q: statements represented by a and b' + - 'XOR: true when exactly one statement is true' + - 'Implication: if p, then q' + - 'Equivalence: p and q have the same truth value' + - 'NOT: reverses a truth value' --- ## Try it -1. Flip switch a to 1 and switch b to 1 and watch the gate's lamp — it stays dark, because XOR only lights up when the two inputs disagree. -2. Flip switch b back to 0 so a = 1 and b = 0: the lamp turns on, and the row (1, 0) lights up in the truth table on the right. -3. Try all four combinations of a and b and read off the sum column each time — that column is exactly what XOR computes. +1. Set a = 1 and b = 1. The displayed XOR output is 0 because the inputs agree. Equivalence would be true for this pair. +2. Keep a = 1 and set b = 0. XOR becomes 1. This is also the only pair that makes the implication “if a, then b” false. +3. Set a = 0 and b = 1. XOR is still 1, but the implication is now true. The XOR output alone cannot tell you whether an implication is true. ## Real-life examples -1. **Rain wets the ground.** It rains (a = 1) and the ground is wet (b = 1): the promise "if it rains, the ground gets wet" holds exactly as you would expect. -2. **A sprinkler wets the ground without rain.** It does not rain (a = 0) but a sprinkler left the ground wet anyway (b = 1): the implication still holds, since it only promises what happens when it does rain. -3. **A covered patio stays dry in the rain.** It rains (a = 1) but a covered patio stays dry (b = 0): this is the one combination that breaks the promise "if it rains, the ground gets wet." +1. **Condition and result both hold.** Let p mean “it rains” and q mean “I carry an umbrella.” With a = 1 and b = 1, “if it rains, I carry an umbrella” is true. XOR is 0 because p and q agree. +2. **The result without the condition.** With a = 0 and b = 1, I carry an umbrella although it does not rain. This does not contradict the implication: it says nothing about what I do when it does not rain. XOR is 1. +3. **A counterexample.** With a = 1 and b = 0, it rains and I have no umbrella. This makes the implication false. XOR is 1 because the inputs differ. ## Test yourself -1. Find the one combination of switches where the promise "if it rains, the ground gets wet" is broken. -2. Find a combination where rain and wet ground disagree, yet the promise still holds true. -3. Find a combination where rain and wet ground are equivalent, both false at once. +1. Set a = 1 and b = 0: the pair that makes “if a, then b” false. +2. Set a = 0 and b = 1: the original implication is true, but its converse is false. +3. Make both statements false. They are equivalent for this pair, and XOR is 0. ## Intuition -Set switch a to 1 and switch b to 1: both up, yet the lamp above the gate stays dark. Set both back to 0 and the lamp is still dark. Only when exactly one switch is up, a = 1 with b = 0, or a = 0 with b = 1, does the lamp light, because XOR rewards disagreement between its two inputs rather than agreement. OR is different: it would happily light up with both switches on. +“If a number is a multiple of 4, then it is even” makes a promise about multiples of 4. To disprove it, we would need a multiple of 4 that is not even. An even number such as 6 does not disprove it: the statement never says that every even number is a multiple of 4. -Picture a weather rule instead: a = 1 means it rained, and b = 1 means the ground got wet. The implication "if it rains, the ground gets wet" only breaks in one situation, when a = 1 but b = 0, rain with no wet ground; every other combination of the two switches keeps the rule true, even a = 0 with b = 0. "If and only if" is stricter: it is true only when a and b agree, both up or both down, which is almost the opposite pattern from the XOR lamp above. +An implication has a direction, from a condition to a conclusion. Equivalence asks for both directions and is true when the two statements agree. The diagram displays a third rule, XOR: its output is 1 when the inputs differ. Equivalence reverses that output; implication requires us to distinguish (1, 0) from (0, 1). ## Formal -$p \oplus q$ (XOR) is true exactly when p and q differ. $p \Rightarrow q$ is true in every case except p true and q false — notably it is true whenever p itself is false, however strange that first sounds. $p \iff q$ is true exactly when $p \Rightarrow q$ and $q \Rightarrow p$ both hold, i.e. when p and q share the same truth value. +$p \Rightarrow q$ is false only when p is true and q is false. In every other case it is true. The converse $q \Rightarrow p$ reverses the direction and need not have the same truth value. The contrapositive $\neg q \Rightarrow \neg p$ always has the same truth value as the original implication. -Every implication has a converse and a contrapositive. The converse of $p \Rightarrow q$ is $q \Rightarrow p$, a different statement that need not be true. The contrapositive, $\neg q \Rightarrow \neg p$, is logically identical to the original: same truth value in every row. +$p \iff q$ means that both implications hold, so p and q have the same truth value. In contrast, $p \oplus q$ is true exactly when their truth values differ. This XOR rule is the one shown by the diagram and its table. ## Advanced -"If it rains, the ground is wet" is $p \Rightarrow q$ with p = "it rains" and q = "the ground is wet". The converse, "if the ground is wet, it rains", can fail — a sprinkler could have wet the ground with no rain at all — so a true implication never licenses swapping its two halves. Only the contrapositive, "if the ground is not wet, it did not rain", is guaranteed by the original statement, and proofs often use it precisely because it is easier to argue. +A true implication does not automatically describe a cause. It is a relationship between truth values. When proving a mathematical implication, we must rule out every case where the condition is true and the conclusion false. Proving the contrapositive can be useful because it rules out the same cases from another starting point. ## Derivation -1. $p \Rightarrow q$ fails in exactly one row of the truth table: p true, q false; every other combination makes it true. -2. Swap and negate both sides to get the contrapositive $\neg q \Rightarrow \neg p$, and check it fails in that same single row, so the two statements always match. -3. Swap without negating to get the converse $q \Rightarrow p$; it fails whenever q is true and p is false, a different row, so it is a genuinely different claim. +1. The implication fails only when its condition holds but its conclusion does not: p = 1 and q = 0. +2. The contrapositive fails when q = 0 and p = 1, exactly the same case. The two statements therefore agree in every row. +3. The converse fails when q = 1 and p = 0, a different case. Reversing the original implication needs a separate argument. ## Real world -### Parity and checksums -XOR compares bits for disagreement and underlies parity bits and checksums that catch single-bit errors in transmitted data. +### Describing shapes -### Warranty and legal conditions -"If you break the seal, the warranty is void" only tells you what happens after breaking the seal — an intact seal alone does not prove nothing broke, only the contrapositive does. +Every square is a rectangle. The converse is false: a rectangle with sides 2 and 3 is not a square. A definition that works in both directions must add the missing condition. -### Network switching -A signal reaches exactly one of two paths when a switch is in XOR-like exclusive mode, ensuring the two outputs never carry the same pulse at once. +### Program requirements -### Mathematical proofs -Proving "if n² is even then n is even" is often easier as its contrapositive, "if n is odd then n² is odd", which is logically the same claim. +“If the input is empty, show an error” specifies what must happen for an empty input. It does not say that an empty input is the only possible cause of an error. From c0f25b8f94c038156e240ffe13f4b07649cc86a8 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:44:20 +0300 Subject: [PATCH 017/124] content: rewrite modular-patterns-and-clocks for first-time learners in both languages --- .../modular-patterns-and-clocks/ar.md | 62 +++++++++--------- .../modular-patterns-and-clocks/en.md | 63 +++++++++---------- 2 files changed, 56 insertions(+), 69 deletions(-) diff --git a/content/lessons/discrete/modular-patterns-and-clocks/ar.md b/content/lessons/discrete/modular-patterns-and-clocks/ar.md index 989da9da..a343c57e 100644 --- a/content/lessons/discrete/modular-patterns-and-clocks/ar.md +++ b/content/lessons/discrete/modular-patterns-and-clocks/ar.md @@ -1,68 +1,62 @@ --- title: 'الأنماط المعيارية: حيل القسمة' -summary: >- - رتّب الأعداد في صفوف ثابتة العرض تصطف الأعداد ذات الباقي نفسه أعمدةً. من هنا تأتي - حيل القسمة على 3 و9. +summary: 'اقرأ القسمة بوصفها مجموعات كاملة وباقيًا، وافهم لماذا تقع الأعداد ذات الباقي نفسه في عمود واحد.' parameters: - cols: العرض — عدد الأرقام في كل صف، المعامل - highlight: الرقم — أي رقم تريد فحصه (اضغط خلية) + cols: 'm — عرض الصف، وهو المقسوم عليه' + highlight: 'n — العدد المحدد من 0 إلى 47؛ انقر خانته لاختياره' variables: - - الرقم الذي يوضع في الجدول - - خارج القسمة، عدد الصفوف الكاملة التي تسبقه - - عرض كل صف، المعامل - - الباقي، إلى أي مدى داخل صفه يقع الرقم + - 'n: العدد الذي نقسمه' + - 'q: خارج القسمة، أي عدد المجموعات الكاملة من m' + - 'm: المقسوم عليه الموجب، وهو عرض الصف' + - 'r: الباقي، من 0 إلى m − 1' --- ## Try it -1. اضغط الرقم 23 (أو أي خلية) واقرأ باقيه وخارج قسمته في المؤشرات أدناه. -2. حرّك «العرض» من 7 إلى 10، وراقب كل رقم ينزلق إلى عمود جديد. الأرقام نفسها، لكن نمط الخطوط مختلف تمامًا. -3. أعد «العرض» إلى 7، واضغط بضعة أرقام في العمود الأول تمامًا، وهي 0 و7 و14 و21. كلها من مضاعفات 7، وكلها تشترك في الباقي 0. +1. اضبط cols = 7 وhighlight = 23. تعرض القيم خارج قسمة 3 وباقيًا 2، لأن 23 = 3 × 7 + 2. +2. أبقِ 23 محددًا واجعل cols = 10. تصبح القسمة 23 = 2 × 10 + 3، فيكون الباقي 3. +3. أعد cols إلى 7، واختر 0 و7 و14 و21 بالتتابع. باقي قسمة كل منها صفر، وكلها في العمود الأول. ## Real-life examples -1. **صفحة تقويم.** بعرض 7، كالأعمدة السبعة لتقويم مطبوع، يقع الرقم 23 على بُعد مكانين داخل صفه. يقع اليوم الرابع والعشرون من الشهر في يوم الأسبوع نفسه الذي يقع فيه الثالث والسابع عشر. -2. **مربع المئة.** بعرض 10، تُقرأ أرقام العدد مباشرة من صفه وعموده. يقع 36 في الصف 3 والعمود 6، ورقماه 3 و6 يجمعان إلى 9، وهذا اختبار سريع لمعرفة هل يقبل العدد القسمة على 9. -3. **جدول بعرض أحد عشر.** بعرض 11، يقع الرقم 33 بالضبط عند نهاية صفه، والباقي 0. رقماه متساويان، 3 و3، وهذا صحيح دائمًا لمضاعفات 11 ذات الرقمين. +1. **دورة الأسبوع.** عند عرض 7 واختيار 23، نجد ثلاثة أسابيع كاملة ويومين إضافيين. بعد 23 يومًا من تاريخ بداية معلوم، يتقدم يوم الأسبوع يومين عن يوم البداية. +2. **العشرات والآحاد.** عند عرض 10، يعطي العدد 36 خارج قسمة 3 وباقيًا 6، أي ثلاث عشرات وست آحاد. مجموع رقميه 9، ولذلك يقبل القسمة على 9. +3. **مجموعات من أحد عشر.** عند عرض 11، يكون 33 مساويًا 3 × 11 بلا باقٍ. يقع في بداية صف، في العمود 0. ## Test yourself -1. اضبط العرض على 7 واختر رقمًا مظللًا يقع في العمود الأول تمامًا، الباقي 0. -2. اختر أي رقم مظلل أصغر من 60 تجمع أرقامه إلى مضاعف لـ9. -3. اختر رقمًا مظللًا يساوي 11 أو أكبر ويقبل القسمة على 11 تمامًا، سيكون رقماه متساويين. +1. اضبط cols = 7 واختر عددًا من عمود الباقي صفر. +2. اختر عددًا من المجال المعروض، من 0 إلى 47، يكون مجموع أرقامه قابلًا للقسمة على 9. +3. اختر مضاعفًا للعدد 11 لا يقل عن 11. ## Intuition -رتّب الأعداد الصحيحة 0، 1، 2، 3، … في صفوف بعدد ثابت من الأعمدة، وستلاحظ شيئًا فورًا. الأرقام الواقعة مباشرة تحت بعضها تختلف دائمًا بمقدار عرض ذلك الصف بالضبط، فكلها تترك الباقي نفسه عند القسمة عليه. حرّك «العرض» وراقب كل رقم في الشبكة ينزلق جانبيًا إلى عمود جديد، لأن الباقي الذي يتركه كل رقم يعتمد كليًا على عرض الصفوف. +رتّب الأعداد من 0 إلى 47 في صفوف، في كل صف سبع خانات. يحتوي الصف الأول على 0 إلى 6، ويبدأ التالي عند 7. للوصول إلى 23 نتجاوز ثلاثة صفوف كاملة ثم خانتين. نرقّم الصفوف والأعمدة ابتداءً من الصفر، لذا يقع في الصف 3 والعمود 2. -اضغط أي رقم لترى صفه وعموده مُظلَّلين. الصف يخبرك بخارج القسمة، أي كم صفًا كاملًا بذلك العرض سبقه، والعمود يخبرك بالباقي، أي إلى أي مدى قصُر عن إنهاء صف آخر. تقع مضاعفات عرض الصف دائمًا في العمود الأول تمامًا، عند الباقي 0، وهذا بالضبط سبب تميزها، إذ تظهر هنا بخط عريض. +تختلف الأعداد في العمود نفسه بمقدار صفوف كاملة. مثلًا، تترك 2 و9 و16 و23 الباقي 2 عند قسمتها على 7. وإذا غيّرنا عرض الصف، تغيرت البواقي. الباقي صفر يعني أن العدد يقبل القسمة على العرض دون جزء متبقٍ. ## Formal -خوارزمية القسمة تقول إنه لأي عدد صحيح $n$ وأي عرض موجب $m$، يوجد عددان صحيحان فريدان $q$ و$r$ بحيث $n = q\cdot m + r$ و$0 \le r < m$. ترتيب الأعداد في صفوف طولها $m$ هو بالضبط تجسيد هذه العبارة. $q$ يَعُدّ الصفوف المكتملة، و$r$ هو الموضع داخل الصف الحالي. +لكل عدد صحيح غير سالب $n$ وعدد صحيح موجب $m$، يوجد عددان صحيحان وحيدان $q$ و$r$ يحققان $n=qm+r$ و$0\le r- - Lay the counting numbers out in rows of a fixed width and same-remainder - numbers line up in tidy columns — the pattern behind calendars, - hundred-squares, and quick tests for whether a number divides by 3, 9 or 11. +summary: 'Read division as complete groups plus a remainder, and see why equal remainders line up in the same column.' parameters: - cols: width — how many numbers per row, the modulus - highlight: number — which number to inspect (tap a cell) + cols: 'm — row width, or divisor' + highlight: 'n — selected number from 0 to 47; tap a cell' variables: - - the number being placed in the table - - the quotient — how many complete rows come before it - - the width of each row — the modulus - - the remainder — how far into its row the number sits + - 'n: number being divided' + - 'q: quotient, or complete groups of m' + - 'm: positive divisor and row width' + - 'r: remainder, from 0 to m − 1' --- ## Try it -1. Tap the number 23 (or any cell) and read off its remainder and quotient in the readouts below. -2. Drag "width" from 7 up to 10 and watch every number slide into a new column — same numbers, completely different stripe pattern. -3. Set "width" back to 7 and tap a few numbers in the very first column: 0, 7, 14, 21 — all multiples of 7, all sharing remainder 0. +1. Set cols = 7 and highlight = 23. The readouts give quotient 3 and remainder 2: 23 = 3 × 7 + 2. +2. Keep 23 selected and set cols = 10. Now 23 = 2 × 10 + 3, so the remainder becomes 3. +3. Set cols = 7 and select 0, 7, 14 and 21 in turn. Each has remainder 0 and lies in the first column. ## Real-life examples -1. **A calendar page.** With width 7, like the seven columns of a printed calendar, the number 23 sits two places into its row: the 24th day of a month lands on the same weekday as the 3rd and the 17th. -2. **A hundred-square.** With width 10, the digits of a number read straight off its row and column: 36 sits in row 3, column 6, and its digits, 3 and 6, add up to 9 — a quick test for whether 9 divides it evenly. -3. **An eleven-wide table.** With width 11, the number 33 lands exactly on the end of its row, remainder 0: its two digits are equal, 3 and 3, which is always true for two-digit multiples of 11. +1. **Weekly cycles.** With width 7 and number 23, there are three complete weeks and two extra days. A date 23 days after a starting date falls two weekdays later than that starting weekday. +2. **Tens and units.** With width 10, number 36 has quotient 3 and remainder 6: three tens and six units. Its digit sum is 9, so it is divisible by 9. +3. **Groups of eleven.** With width 11, number 33 is 3 × 11 with no remainder. It sits at the start of a row, in column 0. ## Test yourself -1. Set the width to 7 and pick a highlighted number that lands in the very first column, remainder 0. -2. Pick any highlighted number under 60 whose digits add up to a multiple of 9. -3. Pick a highlighted number of 11 or more that is exactly divisible by 11 — its two digits will be equal. +1. Set cols = 7 and select a number in the remainder-0 column. +2. Select a number in the displayed range 0–47 whose digit sum is divisible by 9. +3. Select a multiple of 11 that is at least 11. ## Intuition -Lay the whole numbers 0, 1, 2, 3, … out in rows, a fixed number wide, and something falls into place immediately: numbers directly below each other always differ by exactly that row width, so they all leave the same remainder when divided by it. Drag "width" and watch every number in the grid slide sideways into a new column, because the remainder each number leaves depends entirely on how wide the rows are. +Arrange 0 through 47 in rows of seven. The first row is 0 through 6; the next begins at 7. Number 23 comes after three full rows, with two positions left over. We number rows and columns from zero, so it is in row 3, column 2. -Tap any number to see its own row and column highlighted: the row tells you the quotient, how many complete rows of that width came before it, and the column tells you the remainder, how far short of finishing one more row it fell. Multiples of the row width always land in the very first column, remainder 0, which is exactly why they stand out, shown here in bold. +Numbers in the same column differ by whole rows. For example, 2, 9, 16 and 23 all leave remainder 2 after division by 7. Changing the row width changes the remainders. A zero remainder means the number is exactly divisible by the width. ## Formal -The division algorithm says that for any whole number $n$ and any positive width $m$, there exist unique whole numbers $q$ and $r$ with $n = q\cdot m + r$ and $0 \le r < m$. Arranging the numbers in rows of length $m$ is exactly this statement made visible: $q$ counts the completed rows and $r$ is the position within the current one. +For a nonnegative integer $n$ and a positive integer $m$, there are unique integers $q$ and $r$ satisfying $n=qm+r$ and $0\le r Date: Mon, 16 Nov 2026 10:44:21 +0300 Subject: [PATCH 018/124] content: rewrite pigeonhole-and-counting for first-time learners in both languages --- .../discrete/pigeonhole-and-counting/ar.md | 57 +++++++++---------- .../discrete/pigeonhole-and-counting/en.md | 57 ++++++++----------- 2 files changed, 51 insertions(+), 63 deletions(-) diff --git a/content/lessons/discrete/pigeonhole-and-counting/ar.md b/content/lessons/discrete/pigeonhole-and-counting/ar.md index 309f3b63..c1399795 100644 --- a/content/lessons/discrete/pigeonhole-and-counting/ar.md +++ b/content/lessons/discrete/pigeonhole-and-counting/ar.md @@ -1,65 +1,60 @@ --- title: 'مبدأ برج الحمام والعدّ' -summary: >- - عشر حمامات في تسعة أبراج: برج واحد على الأقل فيه حمامتان. فكرة بسيطة ببراهين قوية. +summary: 'ميّز بين عدّ الاختيارات الممكنة، وإثبات ما لا بد أن يحدث عندما يزيد عدد العناصر على عدد الصناديق.' parameters: - n: n — العناصر المتاحة للاختيار - k: k — عدد ما نختاره + n: 'n — عدد العناصر المختلفة المتاحة في الرسم' + k: 'k — عدد العناصر المختارة، بين 0 وn' variables: - - n — عدد العناصر الموضوعة في الصناديق - - m — عدد الصناديق المتاحة + - 'n: عدد العناصر، ويمثل في الرسم حجم المجموعة المتاحة' + - 'm: عدد الصناديق في البرهان، وليس أداة تحكم في الرسم' --- ## Try it -1. اجعل n يساوي 8 وk يساوي 3، واقرأ المجموع أسفل المجمّع، فهذا هو عدد لجان الثلاثة أشخاص الممكن تكوينها. -2. حرّك k صاعدًا نحو n وراقب عدد المجموعات يتصاعد، ثم أعده نازلًا نحو 0 وراقبه يتقلّص من جديد. -3. اضغط في أي مكان على مجمّع الكرات لينتقل k فورًا إلى تلك النقطة، وقارن العدد الجديد بالعدد السابق. +1. اضبط n = 8 وk = 3. يوجد 56 مجموعة مختلفة من ثلاثة عناصر. تُحسب كل مجموعة مرة واحدة، مهما اختلف ترتيب عناصرها. +2. أبقِ n = 8 وجرّب k = 0 ثم 4 ثم 8. تكون الأعداد 1 و70 و1. أكبر عدد من الاختيارات يقع قرب المنتصف، لا عند أكبر حجم للمجموعة. +3. اضبط n = 5 وk = 2، وعدّ المجموعات العشر المعروضة. أبقِ k أقل من n أو مساويًا لها؛ فالرسم لا يعرض مجموعة مختارة أكبر من n. ## Real-life examples -1. **اختيار لجنة من 3 أشخاص.** اختيار 3 متطوعين للجنة من بين 8 أشخاص سجّلوا أسماءهم، n يساوي 8 وk يساوي 3، والترتيب الذي يُختارون به لا يهم. -2. **اختيار إضافات البيتزا.** يتيح مطعم بيتزا اختيار إضافتين من قائمة فيها 5، n يساوي 5 وk يساوي 2، و«فطر ثم زيتون» يُحسب حساب «زيتون ثم فطر» نفسه. -3. **اختيار أرقام اليانصيب.** يسحب يانصيب 4 كرات مرقّمة من برميل فيه 10، n يساوي 10 وk يساوي 4، ومجموعة الفوز واحدة بغض النظر عن ترتيب خروج الكرات. +1. **لجنة من ثلاثة أشخاص.** اختيار 3 من 8 متطوعين يعطي 56 لجنة، إذا لم نخصص أدوارًا مختلفة لأعضائها. +2. **إضافتان للطعام.** اختيار إضافتين مختلفتين من 5 يعطي 10 اختيارات. اختيار الزيتون والفطر هو نفسه اختيار الفطر والزيتون. +3. **أربع بطاقات مرقمة.** اختيار 4 بطاقات مختلفة من 10 يعطي 210 مجموعات. يعرض الرسم أول 60 مجموعة فقط عندما يكبر العدد، لكن الإجمالي يشملها كلها. ## Test yourself -1. جد قيمتي n وk تسمحان بعشر اختيارات مختلفة بالضبط. -2. جد قيمتي n وk تعطيان أكثر من 100 اختيار مختلف مع اختيار 6 عناصر أو أقل. -3. جد قيمتي n وk اللتين تعطيان أكبر عدد ممكن من الاختيارات المختلفة في هذه الصورة (252 مجموعة). +1. أوجد n وk بحيث يكون عدد الاختيارات 10 بالضبط. +2. أوجد n وk بحيث يتجاوز عدد الاختيارات 100، مع اختيار 6 عناصر أو أقل. +3. أوجد n وk بحيث يكون عدد الاختيارات 252، وهو أكبر عدد متاح هنا. ## Intuition -تخيّل 8 متطوعين سجّلوا أسماءهم، وتحتاج إلى اختيار لجنة من 3 منهم. حرّك n إلى 8 وk إلى 3، وستُظهر الصورة تحتها كل مجموعة من 3 يمكن تكوينها من الكرات الملوّنة في المجمّع. حرّك k صاعدًا نحو n فيزداد عدد المجموعات الممكنة بسرعة، لأن طرق الجمع بين الكرات تكثر كلما اقترب حجم المجموعة من نصف n. +يعدّ الرسم الاختيارات الممكنة. مثلًا، لدينا عشر طرق لاختيار عنصرين من خمسة عناصر مختلفة إذا لم يكن للترتيب أهمية. يجيب هذا عن سؤال «كم مجموعة يمكن تكوينها؟»، ولا يعرض توزيع العناصر على صناديق. -اقلب الفكرة الآن. ادعُ 13 شخصًا إلى حفلة لا يوجد فيها سوى 12 شهرًا تحمل أعياد الميلاد، فلا بد أن يشترك ضيفان على الأقل في شهر واحد مهما وقعت التواريخ. هذا هو مبدأ برج الحمام. كلما كان لديك عناصر أكثر من الصناديق التي تسعها، لا بد أن ينتهي الأمر بصندوق يحمل عنصرين أو أكثر بداخله. +هناك سؤال آخر: ما الذي لا بد أن يحدث؟ وزّع 13 شخصًا على 12 فئة بحسب شهر الميلاد. لو احتوت كل فئة على شخص واحد على الأكثر، لما تجاوز العدد 12 شخصًا. لكن لدينا 13، فلا بد أن يشترك شخصان على الأقل في شهر ميلاد واحد. هذه هي فكرة مبدأ الحمام، حيث تمثل الأشهر الخانات التي نوزع عليها الأشخاص. ## Formal -ينص مبدأ برج الحمام على $n > m \Rightarrow \text{some box holds at least two of the } n \text{ items}$. ضع n عنصرًا في m صندوقًا وn أكبر من m بشكل صارم، فيستقبل صندوق واحد على الأقل عنصرين أو أكثر. +إذا وزعنا n عنصرًا على m صندوقًا، وكان m عددًا صحيحًا موجبًا، فإن $n>m$ يضمن وجود صندوق فيه عنصران على الأقل. يجب إسناد كل عنصر إلى صندوق واحد. يضمن المبدأ وجود صندوق مشترك دون تحديد أي صندوق هو. -قاعدة الضرب تكمّله لبناء الأشياء بدل ضغطها. إن أمكن إجراء اختيار أول بـk1 طريقة واختيار ثانٍ مستقل بـk2 طريقة، فيمكن إجراء الزوج معًا بـk1 × k2 طريقة، وهذا الأساس الذي تستند إليه كل عمليات عدّ التباديل والتوافيق في هذا المقرر. +يحسب الرسم التوافيق: $\binom{n}{k}=n!/[k!(n-k)!]$ للأعداد الصحيحة التي تحقق $0\le k\le n$. هنا n عدد العناصر المتاحة وk عدد العناصر المختارة. أما مبدأ الضرب فيقول: إذا كان للاختيار الأول a بدائل، وكان كل منها يسمح بـb بدائل للاختيار الثاني، فإن عدد الأزواج الممكنة ab. ## Advanced -يتعمم مبدأ برج الحمام. بـn عنصرًا وm صندوقًا، لا بد أن يحوي صندوق واحد على الأقل ⌈n/m⌉ عنصرًا (بالتقريب لأعلى)، لا «عنصرين على الأقل» فقط. هذا الشكل الأقوى يثبت نتائج أبعد بكثير من أشهر الميلاد، مثل ضمان أن يكون بين أي n+1 عددًا مختارًا من 1 إلى 2n عددان متتاليان، أو أن متتالية طويلة كفاية من أعداد مختلفة لا بد أن تحوي تسلسلًا صاعدًا أو هابطًا بطول مضمون. +بصورة أعم، يحتوي صندوق واحد على الأقل على n/m بعد التقريب إلى العدد الصحيح الأعلى. مثلًا، توزيع 25 عنصرًا على 12 صندوقًا يفرض وجود صندوق فيه 3 عناصر على الأقل؛ فلو احتوى كل صندوق على عنصرين على الأكثر، لكان الإجمالي 24 فقط. وفي التوافيق، اختيار k عناصر يكافئ تحديد العناصر n − k التي سنتركها، وهذا يفسر تماثل الأعداد المعروضة. ## Derivation -1. افترض، للوصول إلى تناقض، أن كل صندوق من الصناديق الـm يحوي عنصرًا واحدًا على الأكثر. -2. بهذا الافتراض يمكن للصناديق مجتمعة أن تحوي m عنصرًا على الأكثر، لأن كل صندوق يساهم بعنصر واحد لا أكثر. -3. لكن هناك n عنصرًا وn أكبر من m، وهذا تناقض مباشر، فيكون الافتراض خاطئًا ويحوي صندوق ما عنصرين أو أكثر حقًا. +1. نفترض أن كل صندوق يحتوي على عنصر واحد على الأكثر. +2. عندها لا يمكن أن تحتوي الصناديق m معًا على أكثر من m عنصرًا. +3. يتناقض ذلك مع توزيع أكثر من m عنصرًا عليها. إذن لا بد أن يحتوي صندوق على عنصرين على الأقل. ## Real world -### تشارك أشهر الميلاد -بين أي 13 شخصًا، يضمن مبدأ برج الحمام أن يشترك شخصان على الأقل في شهر الميلاد، إذ لا يوجد سوى 12 شهرًا للتوزيع عليها. +### الاشتراك في شهر الميلاد -### تصادم جداول التجزئة -جدول تجزئة بخانات أقل من العناصر المخزَّنة فيه يضمن حدوث تصادم، وهو منطق برج الحمام نفسه الذي يصمم المبرمجون حوله بإعادة التحجيم والتسلسل. +بين أي 13 شخصًا، يشترك اثنان على الأقل في شهر الميلاد. يضمن هذا الشهر نفسه، ولا يضمن يوم الميلاد نفسه. -### عدّ كلمات المرور والمعرّفات -قاعدة الضرب تضرب خيارات كل موضع حرف معًا لعدّ كم كلمة مرور أو رمز تعريف مختلف تسمح به صيغة ما، وهي القاعدة نفسها خلف عدّ التباديل. +### تكرار الرموز -### حدود الضغط بلا فقدان -لا يمكن لأي مخطط ضغط بلا فقدان أن يقلّص حجم كل ملف ممكن. ملفات الدخل أكثر عددًا من ملفات الخرج الأقصر اللازمة لحفظها كلها بشكل فريد، وهذا مبدأ برج الحمام نفسه، لكن بالملفات بدل الحمام. +إذا أعطينا 101 غرضًا رموزًا من قائمة فيها 100 رمز مختلف فقط، فلا بد من تكرار رمز واحد على الأقل، مهما حاولنا تنظيم الاختيار. diff --git a/content/lessons/discrete/pigeonhole-and-counting/en.md b/content/lessons/discrete/pigeonhole-and-counting/en.md index 39dc58f7..7660f77d 100644 --- a/content/lessons/discrete/pigeonhole-and-counting/en.md +++ b/content/lessons/discrete/pigeonhole-and-counting/en.md @@ -1,67 +1,60 @@ --- title: 'The pigeonhole principle and counting' -summary: >- - Cramming more items into fewer boxes than you have items forces one box to - hold at least two — a simple idea that proves surprisingly strong things - about codes, passwords, and shared birthdays. +summary: 'Use counting to distinguish how many selections are possible from what must happen when items outnumber boxes.' parameters: - n: n — items to choose from - k: k — how many to pick + n: 'n — number of distinct items available in the diagram' + k: 'k — number selected; keep k between 0 and n' variables: - - n — the number of items placed into boxes - - m — the number of boxes available + - 'n: item count; in the diagram, the pool size' + - 'm: box count in the pigeonhole argument; not a diagram control' --- ## Try it -1. Set n to 8 and k to 3, and read the total under the pool: that is how many different 3-person committees you could form. -2. Drag k up toward n and watch the number of groups climb, then drag it back down toward 0 and watch it shrink again. -3. Tap anywhere on the token pool to jump k straight to that position, and compare the new count to the one before. +1. Set n = 8 and k = 3. There are 56 different groups of three. Each group is counted once, regardless of the order of its members. +2. Keep n = 8 and try k = 0, 4 and 8. The counts are 1, 70 and 1. The maximum is near the middle, not at the largest group size. +3. Set n = 5 and k = 2. Count the 10 displayed groups. Keep k no greater than n; the picture caps its selected group size at n. ## Real-life examples -1. **Picking a 3-person committee.** Choosing 3 volunteers for a committee out of 8 people who signed up: n = 8 and k = 3, and the order they are picked in does not matter. -2. **Choosing pizza toppings.** A pizza shop lets you pick 2 toppings from a menu of 5: n = 5 and k = 2, "mushroom then olive" counts the same as "olive then mushroom". -3. **Picking lottery numbers.** A lottery draws 4 numbered balls from a drum of 10: n = 10 and k = 4, and the winning set is the same no matter the order the balls came out. +1. **A committee of three.** Choosing 3 of 8 volunteers gives 56 committees if there are no distinct roles within the committee. +2. **Two toppings.** Choosing 2 distinct toppings from 5 gives 10 combinations. Selecting olive and mushroom is the same choice as mushroom and olive. +3. **Four numbered cards.** Selecting 4 distinct cards from 10 gives 210 groups. The display shows only the first 60 groups when the count is large; the total includes them all. ## Test yourself -1. Find values of n and k that allow exactly 10 different selections. -2. Find values of n and k that give more than 100 different selections while picking 6 or fewer items. -3. Find the n and k that give the largest possible number of different selections in this picture (252 groups). +1. Find n and k giving exactly 10 selections. +2. Find n and k giving more than 100 selections, with k no greater than 6. +3. Find n and k giving 252 selections, the largest count available here. ## Intuition -Imagine 8 volunteers sign up and a 3-person committee needs to be chosen from them. Slide n to 8 and k to 3, and the picture below shows every different group of 3 you could form from the coloured tokens in the pool. Push k up toward n and the number of possible groups grows fast, because there are far more ways to combine tokens once the group size gets close to half of n. +The diagram counts selections. For example, there are ten ways to pick two of five distinct items when order does not matter. This answers “how many groups are possible?” It does not show items being placed in boxes. -Now flip the idea around: invite 13 people to a party where only 12 calendar months exist to hold birthdays, and at least two guests are forced to share a month no matter how the dates fall. That is the pigeonhole principle: whenever you have more items than boxes to hold them, one box must end up with two or more items inside it. +A different counting question asks what must happen. Put 13 people into 12 categories according to birth month. If every category contained at most one person, there could be at most 12 people. Since there are 13, at least one month belongs to two or more people. This reasoning is called the pigeonhole principle. ## Formal -The pigeonhole principle states $n > m \Rightarrow \text{some box holds at least two of the } n \text{ items}$: place n items into m boxes with n strictly greater than m, and at least one box receives two or more items. +For n items assigned to m boxes, with positive integer m, $n>m$ guarantees that some box contains at least two items. Each item must be assigned to one box. The principle guarantees a shared box without identifying which box it is. -The product rule complements it for building things up rather than squeezing them down: if a first choice can be made k1 ways and a second, independent choice k2 ways, the pair together can be made k1 × k2 ways — the basis every permutation and combination count in this course relies on. +The diagram counts combinations: $\binom{n}{k}=n!/[k!(n-k)!]$ for integers with $0\le k\le n$. Here n is the pool size and k is the group size. The product rule is different: if each of a first choice's a options allows b second options, there are ab pairs of choices. ## Advanced -The pigeonhole principle generalises: with n items and m boxes, some box must hold at least ⌈n/m⌉ items (rounding up), not just "at least two". This stronger form proves results far beyond birthdays, such as guaranteeing that among any n+1 numbers chosen from 1 to 2n, two must be consecutive, or that a long enough sequence of distinct numbers must contain a rising or falling run of a guaranteed length. +More generally, some box contains at least n/m rounded up to an integer. For example, 25 items in 12 boxes force one box to contain at least 3 items: if all boxes held at most 2, their total capacity would be 24. For combinations, choosing k items is equivalent to choosing the n − k items to leave out, explaining the symmetry of the displayed counts. ## Derivation -1. Suppose, for contradiction, that every one of the m boxes holds at most one item. -2. Under that assumption the boxes together can hold at most m items in total, since each contributes no more than one. -3. But there are n items and n is greater than m, a direct contradiction, so the assumption was false and some box really does hold two or more. +1. Suppose every box holds at most one item. +2. Then m boxes hold at most m items altogether. +3. This contradicts having more than m items assigned to those boxes. Therefore some box holds at least two. ## Real world ### Shared birth months -Among any 13 people, the pigeonhole principle guarantees at least two share a birth month, since there are only 12 months to go around. -### Hash table collisions -A hash table with fewer slots than items being stored is guaranteed to have a collision, the same pigeonhole logic that programmers design around with resizing and chaining. +Among 13 people, at least two share a birth month. This guarantees a shared month, not a shared birthday. -### Counting passwords or IDs -The product rule multiplies the choices for each character position together to count how many distinct passwords or ID codes a format allows, the same rule behind counting permutations. +### Repeated labels -### Lossless compression limits -No lossless compression scheme can shrink every possible file, because there are strictly more input files than shorter output files to hold them uniquely — pigeonhole again, just with files as the pigeons. +Assigning 101 objects labels from only 100 distinct labels forces at least one label to be reused. This remains true however carefully we choose the labels. From 38ee668af07a4442ddbc913ca5c9b2b0517fad1a Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:44:21 +0300 Subject: [PATCH 019/124] content: rewrite proof-by-induction for first-time learners in both languages --- .../lessons/discrete/proof-by-induction/ar.md | 57 ++++++++---------- .../lessons/discrete/proof-by-induction/en.md | 59 ++++++++----------- 2 files changed, 52 insertions(+), 64 deletions(-) diff --git a/content/lessons/discrete/proof-by-induction/ar.md b/content/lessons/discrete/proof-by-induction/ar.md index b5c7338c..f5c465e4 100644 --- a/content/lessons/discrete/proof-by-induction/ar.md +++ b/content/lessons/discrete/proof-by-induction/ar.md @@ -1,9 +1,8 @@ --- title: 'البرهان بالاستقراء' -summary: >- - أسقط أول قطعة دومينو، وتأكد أن كل قطعة تسقط التالية، فيسقط الصف كله إلى ما لا نهاية. +summary: 'أثبت صحة عبارة لكل عدد صحيح موجب بإثبات حالة البداية، ثم بيان كيف تنتقل الصحة من أي حالة إلى التالية.' parameters: - x: n — عدد الحدود المجموعة + x: 'n — عدد الحدود التي نجمعها، ويضبطه المنزلق x' charts: - title: صيغة المجموع مقابل منحنى للمقارنة xLabel: n — عدد الحدود @@ -12,61 +11,57 @@ charts: - 'صيغة المجموع: n(n+1)/2' - 'مقارنة: n²/2' variables: - - n — عدد الحدود التي تجمعها - - i — الحد الذي يُجمع حاليًا - - k — الخطوة العامة المستخدمة في الحجة الاستقرائية + - 'n: عدد حدود المجموع' + - 'i: فهرس يمر على حدود المجموع' + - 'k: عدد صحيح عام نستخدمه في خطوة الاستقراء' --- ## Try it -1. حرّك x إلى 10: تسقط عشر قطع دومينو، ويكدّس الدرج في الأسفل الصفوف من 1 حتى 10 في 55 مربعًا — مع توأمه الباهت الذي يكمل مستطيل 10×11. -2. راقب التسميتين بجوار المستطيل: المجموع المعدود وn(n+1)/2 يتفقان دائمًا، لأن درجين هما بالضبط مستطيل واحد. -3. ادفع x حتى 20، ثم أعده إلى 0 — من دون دفع القطعة الأولى لا يسقط شيء، ولهذا يحتاج البرهان إلى حالته الأساس. +1. اضبط x = 10. يحتوي الشكل المتدرج على 55 مربعًا. تكمل نسخته الفاتحة مستطيلًا فيه 10 × 11 = 110 مربعات. +2. اضبط x = 11. يضيف العمود الجديد 11 مربعًا، فيرتفع المجموع من 55 إلى 66. تحقق من أن الصيغة تعطي 11 × 12 ÷ 2 = 66. +3. اضبط x = 0 ثم x = 1. تمثل قطعة الدومينو الأولى الساقطة إثبات حالة البداية. يوضح المنزلق الفكرة، لكنه لا يثبت خطوة الانتقال لكل عدد صحيح. ## Real-life examples -1. **تكديس عرض علب مثلث.** يكدّس بقّال علبًا في مثلث ارتفاعه 10 صفوف، علبة واحدة في الصف الأول وعشر علب في الصف العاشر، فيصبح المجموع 55 علبة. -2. **ادخار مبلغ متزايد كل يوم.** ادّخار 1 دولار في اليوم الأول، و2 دولار في اليوم الثاني، وهكذا لمدة 14 يومًا، يجمع 105 دولارات. -3. **بناء درج من 20 مكعبًا.** درج مبني من مكعبات، مكعب إضافي واحد لكل درجة على مدى 20 درجة، يستخدم 210 مكعبات. +1. **عشرة صفوف من العلب.** إذا احتوت الصفوف على 1 إلى 10 علب بالتتابع، فالمجموع 10 × 11 ÷ 2 = 55 علبة. +2. **ادخار يومي متزايد.** ادخار وحدة في اليوم الأول، ووحدتين في الثاني، وهكذا مدة 14 يومًا، يعطي 14 × 15 ÷ 2 = 105 وحدات. +3. **عشرون عمودًا من المكعبات.** لبناء أعمدة بارتفاعات من 1 إلى 20، نحتاج إلى 20 × 21 ÷ 2 = 210 مكعبات. ## Test yourself -1. جد عدد الحدود الذي يجعل المجموع الجاري يساوي 66 بالضبط. -2. جد x الذي يكون عنده المجموع الدقيق أكبر بمقدار 5 بالضبط من منحنى المقارنة n²/2. -3. جد x الذي يكون عنده المجموع الجاري قد تجاوز 150 بالفعل، بينما منحنى المقارنة n²/2 لم يتجاوزه بعد. +1. أوجد x التي تجعل المجموع يساوي 66 بالضبط. +2. أوجد x التي تجعل المجموع يزيد على قيمة المقارنة x²/2 بمقدار 5 بالضبط. +3. أوجد x التي تجعل المجموع 150 على الأقل، بينما تبقى x²/2 أقل من 150. ## Intuition -كدّس علبًا في مثلث ارتفاعه 10 صفوف، علبة واحدة في الصف الأول وعشر علب في الصف العاشر، وعدّها يدويًا يعطيك 55 علبة. حرّك المنزلق x إلى 10 فيكدّس الدرج على الشاشة تلك الصفوف نفسها في 55 مربعًا، مُظهرًا المجموع $1 + 2 + \cdots + n$ كصورة واحدة لا كتراكم إضافات منفصلة. +مجموع الأعداد من 1 إلى 10 هو 55. يقترح الشكل المتدرج طريقة مختصرة: نسختان منه تكملان مستطيلًا عرضه 10 وارتفاعه 11، فتحتوي النسخة الواحدة على نصف 110 مربعات. ويقترح الترتيب نفسه الصيغة $1 + 2 + \cdots + n = n(n+1)/2$. -يرسم الرسم البياني أيضًا منحنى ثانيًا، $n^2/2$، قريبًا من الأول لكنه غير مطابق له. عند x يساوي 10 يستقر المجموع الدقيق عند 55 بينما يستقر منحنى المقارنة عند 50، وفارق قدره 5 مصدره حد x/2 المتبقي داخل الصيغة الدقيقة. راقب المنحنيين يتباعدان قليلًا عند x الصغيرة ويكادان يلتقيان عند x الكبيرة، وهذه لمحة مبكرة عن كيف تقارب صيغة صيغة أخرى. +يمكننا إثبات الصيغة أيضًا بالاستقراء الرياضي. نتحقق أولًا من صحتها عند 1. ثم نثبت أنها إذا صحت حتى عدد صحيح k، فإن إضافة العدد التالي تجعلها تصح حتى k + 1. يجب أن تنجح الحجة الثانية لأي k، لا لمثال نختاره وحده. حالة البداية تبدأ البرهان، وخطوة الانتقال توصلنا إلى كل عدد بعدها. ## Formal -يثبت الاستقراء دعوى $P(n)$ لكل عدد طبيعي n بقطعتين. حالة أساس تبيّن صحة $P(1)$، وخطوة استقرائية تبيّن أنه إذا صحت $P(k)$ فلا بد أن تصح $P(k+1)$ أيضًا. +لتكن $P(n)$ عبارة عن عدد صحيح موجب n. لإثباتها لكل هذه الأعداد، نثبت حالة البداية $P(1)$، ثم نثبت $P(k) \Rightarrow P(k+1)$ لكل عدد صحيح k لا يقل عن 1. نسمي الافتراض الذي نستخدمه في هذا البرهان الشرطي فرضية الاستقراء. -ومتى استقرت القطعتان، تصبح السلسلة لا تُكسر. $P(1)$ صادقة، فتتبعها $P(2)$، فتتبعها $P(3)$، وهكذا لكل n، تمامًا كقطعة دومينو ساقطة تضمن سقوط التالية، إلى ما لا نهاية على طول الصف. +لصيغة المجموع، نفترض أن $1+\cdots+k = k(k+1)/2$. بإضافة k + 1 نحصل على $k(k+1)/2+(k+1)=(k+1)(k+2)/2$، وهي الصيغة نفسها بعد استبدال k بـk + 1. ومع حالة البداية، يكتمل البرهان. ## Advanced -الاستقراء القوي يقوّي الخطوة الاستقرائية لتفترض صحة $P(1), P(2), \dots, P(k)$ كلها لا $P(k)$ وحدها، وهذا مفيد لدعاوى، مثل أن كل عدد صحيح أكبر من 1 له تحليل إلى عوامل أولية، حيث تنقسم الخطوة طبيعيًا إلى أجزاء أصغر بدل أن تتقلص بمقدار واحد بالضبط. وكلا الشكلين يستند إلى حقيقة الترتيب الجيد نفسها للأعداد الطبيعية، وهي أن لكل مجموعة غير خالية منها عنصرًا أصغر. +يمكن أن يبدأ الاستقراء من عدد صحيح آخر بحسب مجال العبارة. ويسمح الاستقراء القوي باستخدام جميع الحالات السابقة من البداية حتى k عند إثبات الحالة التالية. أما منحنى المقارنة هنا فهو n²/2؛ الفرق العددي بينه وبين المجموع هو n/2 ويزداد مع n، لكن الخطأ النسبي مقارنة بالمجموع الدقيق يساوي 1/(n + 1) ويتناقص. ## Derivation -1. تحقق من الصيغة يدويًا عند أصغر حالة. بحد واحد فقط يكون المجموع 1 بالضبط، والصيغة توافق ذلك. -2. افترض أن الصيغة تعمل بالفعل عند قيمة k، هذا الافتراض هو قطعة الدومينو الوحيدة التي يُسمح لك بالاتكاء عليها. -3. أضف الحد التالي k+1 إلى طرفي الافتراض وبسّط. الناتج هو بالضبط صيغة k+1، فتسقط قطعة الدومينو التالية أيضًا. +1. عند n = 1 يكون المجموع 1، وتعطي الصيغة 1 × 2 ÷ 2 = 1. هكذا نثبت حالة البداية. +2. نفترض أن المجموع حتى k يساوي k(k + 1)/2. نستخدم هذا الافتراض لإثبات الحالة التالية، ولا نفترض أننا أثبتنا جميع الحالات مسبقًا. +3. نضيف k + 1 ونأخذ (k + 1) عاملًا مشتركًا، فنحصل على (k + 1)(k + 2)/2. هذه هي خطوة الانتقال المطلوبة. ## Real world -### عدّ المصافحات -في حفلة تضم n شخصًا يصافح فيها كل واحد الآخر مرة واحدة، يثبت الاستقراء أن مجموع المصافحات يطابق دائمًا $n(n-1)/2$. +### عدّ عمليات متكررة -### تكلفة الحلقات والخوارزميات -تحليل عدد العمليات التي تنفذها حلقة تكرارية n مرة يستخدم الاستقراء غالبًا لإثبات صيغة مجموع جارٍ كهذه. +إذا نفذت عملية واحدة في الجولة الأولى، وعمليتين في الثانية، وهكذا، فإن الصيغة تحسب الإجمالي بعد n جولات. ويثبت الاستقراء أن العدّ يظل صحيحًا كلما أضفنا جولة. -### ألغاز التكديس والتبليط -كثير من ألغاز تغطية لوح أو تكديس مكعبات يُحل بإثبات نمط أساس صغير وبيان أنه يمتد خطوة واحدة في كل مرة. +### بناء نمط -### جداول الفائدة المركبة -إثبات أن صيغة ادخار تصح بعد كل إيداع جديد، بشرط أنها صحت في الخطوة السابقة، هو منطق سلسلة الدومينو نفسه في الاستقراء. +عندما يتوسع نمط بإضافة صف واحد كل مرة، قد يناسبه برهان بالاستقراء: نتحقق من الصف الأول، ثم نشرح لماذا تحافظ إضافة الصف التالي على الخاصية المطلوبة. diff --git a/content/lessons/discrete/proof-by-induction/en.md b/content/lessons/discrete/proof-by-induction/en.md index c6ca4132..e8ba53fd 100644 --- a/content/lessons/discrete/proof-by-induction/en.md +++ b/content/lessons/discrete/proof-by-induction/en.md @@ -1,11 +1,8 @@ --- title: 'Proof by induction' -summary: >- - Induction proves a statement true for every one of infinitely many numbers - from just two checks — a base case and a step that topples the next domino - in an endless row. +summary: 'Prove a statement for every positive integer by establishing a starting case and a rule that carries it to the next case.' parameters: - x: n — how many terms are added + x: 'n — number of terms, controlled by x' charts: - title: The sum formula against a comparison curve xLabel: n — number of terms @@ -14,61 +11,57 @@ charts: - 'sum formula: n(n+1)/2' - 'comparison: n²/2' variables: - - n — how many terms you are adding up - - i — the term currently being summed - - k — the general step used in the inductive argument + - 'n: number of terms in the sum' + - 'i: index running through the terms' + - 'k: arbitrary integer used in the inductive step' --- ## Try it -1. Drag x to 10: ten dominoes topple, and the staircase below stacks rows 1 through 10 into 55 squares — with its pale twin completing a 10×11 rectangle. -2. Watch the two labels beside the rectangle: the counted sum and n(n+1)/2 always agree, because two staircases are exactly one rectangle. -3. Push x all the way to 20, then back to 0 — with no push on the first domino, nothing falls, which is why a proof needs its base case. +1. Set x = 10. The staircase contains 55 squares. Its pale copy completes a rectangle with 10 × 11 = 110 squares. +2. Set x = 11. The new column adds 11 squares, so the sum rises from 55 to 66. Check that the formula gives 11 × 12 ÷ 2 = 66. +3. Set x = 0, then x = 1. The first fallen domino represents establishing a starting case. Moving the slider illustrates the argument; it does not prove the step for every integer. ## Real-life examples -1. **Stacking a triangular can display.** A grocery stacks cans in a triangle 10 rows tall, 1 can in row 1 up to 10 cans in row 10, for 55 cans in total. -2. **Saving a growing amount each day.** Saving 1 dollar on day 1, 2 dollars on day 2, and so on for 14 days adds up to 105 dollars saved. -3. **Building a 20-step staircase of blocks.** A staircase built from cubes, one more cube per step for 20 steps, uses 210 cubes in total. +1. **Ten rows of cans.** Rows containing 1 through 10 cans use 10 × 11 ÷ 2 = 55 cans. +2. **Increasing daily savings.** Saving 1 unit on day 1, 2 on day 2, and so on for 14 days gives 14 × 15 ÷ 2 = 105 units. +3. **Twenty columns of blocks.** Columns of heights 1 through 20 use 20 × 21 ÷ 2 = 210 blocks. ## Test yourself -1. Find the number of terms that makes the running sum equal exactly 66. -2. Find x where the exact sum is exactly 5 more than the comparison curve n²/2. -3. Find x where the running sum has already passed 150 but the comparison curve n²/2 has not. +1. Find x for which the sum is exactly 66. +2. Find x for which the sum exceeds the comparison value x²/2 by exactly 5. +3. Find x for which the sum is at least 150 while x²/2 is still below 150. ## Intuition -Stack cans in a triangle 10 rows tall, 1 can in row 1 up to 10 cans in row 10, and counting them all by hand gives 55 cans. Drag the slider x to 10 and the staircase on screen stacks those same rows into 55 squares, showing the running sum $1 + 2 + \cdots + n$ as one picture instead of a pile of separate additions. +Adding the integers from 1 to 10 gives 55. The staircase suggests a shortcut: two copies fit into a rectangle of width 10 and height 11, so one copy contains half of 110 squares. The same arrangement suggests the formula $1 + 2 + \cdots + n = n(n+1)/2$. -The chart also draws a second curve, $n^2/2$, close to the first one but not identical. At x = 10 the exact sum sits at 55 while the comparison curve sits at 50, a gap of 5 that comes from the leftover x/2 term hiding inside the exact formula. Watch the two curves separate slightly for small x and nearly meet for large x, an early look at how one formula can approximate another. +Induction gives another proof. First check that the formula works for 1. Then show that whenever it works up to some integer k, adding the next number makes it work up to k + 1. The second part must work for any k, not just for one chosen example. The base case starts the argument, and the step lets us reach every later integer. ## Formal -Induction proves a statement $P(n)$ for every natural number n using two pieces: a base case showing $P(1)$ holds, and an inductive step showing that if $P(k)$ holds then $P(k+1)$ must hold too. +Let $P(n)$ be a claim about a positive integer n. To prove it for all such integers, establish the base case $P(1)$ and prove $P(k) \Rightarrow P(k+1)$ for every integer k at least 1. The assumption in this conditional proof is the induction hypothesis. -Once both pieces are in place, the chain is unbreakable: $P(1)$ is true, so $P(2)$ follows, so $P(3)$ follows, and so on for every n — exactly like one falling domino guaranteeing the next falls, forever down the line. +For the sum formula, assume $1+\cdots+k = k(k+1)/2$. Adding k + 1 gives $k(k+1)/2+(k+1)=(k+1)(k+2)/2$, which is precisely the formula with k replaced by k + 1. Together with the base case, this proves the claim. ## Advanced -Strong induction strengthens the inductive step to assume $P(1), P(2), \dots, P(k)$ all hold rather than just $P(k)$, which is useful for statements — like every integer above 1 having a prime factorisation — where the step naturally splits into smaller pieces rather than shrinking by exactly one. Both forms rest on the same well-ordering fact about the natural numbers: any nonempty set of them has a smallest element. +Induction can start at another integer if the claim has a different domain. Strong induction allows the step to use all earlier cases from the base through k. The comparison curve here is n²/2: its absolute difference from the sum is n/2, which grows. Its relative error, measured against the exact sum, is 1/(n + 1), which shrinks. ## Derivation -1. Check the formula for the smallest case by hand: with a single term, the sum is just 1, and the formula agrees. -2. Assume the formula already works for some value k — this assumption is the one domino you are allowed to lean on. -3. Add the next term, k+1, onto both sides of the assumption and simplify; the result is exactly the formula for k+1, so the next domino falls too. +1. At n = 1, the sum is 1 and the formula gives 1 × 2 ÷ 2 = 1. This establishes the base case. +2. Assume the sum through k is k(k + 1)/2. We use this assumption to prove the next case, not as a claim that all cases are already known. +3. Add k + 1 and factor out (k + 1). The result is (k + 1)(k + 2)/2, completing the inductive step. ## Real world -### Counting handshakes -At a party of n people where everyone shakes hands once, induction proves the total number of handshakes always matches $n(n-1)/2$. +### Counting repeated work -### Loop and algorithm costs -Analysing how many operations a loop performs as it runs n times often uses induction to prove a running-total formula like this one. +If a process performs 1 operation on its first pass, 2 on its second, and so on, this formula counts the total after n passes. Induction verifies that the count remains correct after each additional pass. -### Stacking and tiling puzzles -Many puzzles about covering a board or stacking blocks are solved by proving a small base pattern and showing it extends one step at a time. +### Building a pattern -### Compound interest schedules -Showing a savings formula holds after each new deposit, given that it held the step before, is the same domino-chain reasoning as induction. +A pattern that extends one row at a time often suggests an inductive proof: verify the first row, then explain why adding the next preserves the claimed property. From 79ea3666669abe2cdb1a45b161625fd809ad0b2f Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:44:21 +0300 Subject: [PATCH 020/124] content: rewrite propositional-logic for first-time learners in both languages --- .../discrete/propositional-logic/ar.md | 61 +++++++++--------- .../discrete/propositional-logic/en.md | 62 +++++++++---------- 2 files changed, 56 insertions(+), 67 deletions(-) diff --git a/content/lessons/discrete/propositional-logic/ar.md b/content/lessons/discrete/propositional-logic/ar.md index c311f855..529ddf81 100644 --- a/content/lessons/discrete/propositional-logic/ar.md +++ b/content/lessons/discrete/propositional-logic/ar.md @@ -1,67 +1,62 @@ --- title: 'المنطق القضوي' -summary: >- - اجمع جملتين صادقتين أو كاذبتين بـ«و» و«أو» و«ليس». هذه قاعدة كل دارة في الحاسوب. +summary: 'تعلّم كيف نستخدم «و» و«أو» والنفي للحكم على صحة العبارات المركبة.' parameters: - a: a — المدخل الأول (0 أو 1) - b: b — المدخل الثاني (0 أو 1) + a: 'a — العبارة الأولى: خاطئة (0) أو صحيحة (1)' + b: 'b — العبارة الثانية: خاطئة (0) أو صحيحة (1)' variables: - - 'p، q: قضيتان، كل منهما صادقة (1) أو كاذبة (0)' - - 'AND: صادقة فقط حين يكون الطرفان صادقين معًا' - - 'OR: صادقة حين يكون طرف واحد على الأقل صادقًا' - - 'NOT: تقلب الصادق كاذبًا والكاذب صادقًا' + - 'p وq: عبارتان يمثلهما المدخلان a وb' + - 'AND: تشترط صحة العبارتين معًا' + - 'OR: تشترط صحة عبارة واحدة على الأقل' + - 'NOT: تقلب قيمة صواب العبارة' --- ## Try it -1. اجعل المفتاح a عند 1 (يحمل بطاقة) والمفتاح b عند 1 (يعرف الرمز)، وراقب اللمبة تضيء. -2. أرجع المفتاح b إلى 0، وراقب اللمبة تنطفئ فورًا رغم أن a ما زال عند 1. -3. قارن لمبة AND بجدول الصدق على اليمين، وابحث عن الصف الوحيد الذي خرجه 1. +1. اضبط a = 1 وb = 1. يكون خرج AND مساويًا 1 لأن العبارتين صحيحتان. +2. أبقِ a = 1 وغيّر b إلى 0. يصبح الخرج 0؛ فصحة عبارة واحدة لا تكفي مع AND. +3. اضبط a = 0 وجرّب قيمتي b. قارن الصفين المحددين في جدول الصواب؛ لا يعطي أي منهما خرجًا يساوي 1. ## Real-life examples -1. **دخول كامل: بطاقة ورمز.** يحمل الموظف بطاقة (a = 1) ويعرف رمز الباب (b = 1)، فتُخرج بوابة AND القيمة 1، ويُفتح الباب. -2. **بطاقة بلا رمز.** يحمل الزائر بطاقة (a = 1) ولا يعرف الرمز (b = 0)، فتُخرج AND القيمة 0، ويبقى الباب مقفلًا. -3. **رمز بلا بطاقة.** يعرف شخص ما الرمز (b = 1) لكنه لم يُمنح بطاقة (a = 0)، فتُخرج AND القيمة 0 أيضًا، ويبقى الباب مقفلًا. +1. **تحقق الشرطين.** لنفترض أن فتح باب يحتاج إلى بطاقة ورمز دخول. عند a = 1 وb = 1 يتحقق الشرطان، ويكون خرج AND مساويًا 1. +2. **البطاقة وحدها.** عند a = 1 وb = 0، لا يتوفر الرمز، فيكون خرج AND مساويًا 0. +3. **الرمز وحده.** عند a = 0 وb = 1، لا تتوفر البطاقة، فيكون خرج AND مساويًا 0. ## Test yourself -1. ابحث عن التركيبة الوحيدة لـ a وb التي تجعل AND تُخرج 1 وتضيء اللمبة. -2. ابحث عن تركيبة يختلف فيها a وb، بحيث تبقى AND عند 0 رغم أن أحد المدخلين 1. -3. حدد قيمة a التي يغيّر عندها تحريك b وحده إضاءة اللمبة. +1. أوجد قيمتي المدخلين اللتين تجعلان خرج AND مساويًا 1. +2. اختر قيمتين مختلفتين لـa وb. +3. اختر قيمة a التي تجعل تغيير b يغيّر خرج AND. ## Intuition -يُفتح الباب فقط حين يحمل الموظف بطاقة ويعرف الرمز معًا. اجعل a يساوي 1 ليعني «يحمل بطاقة»، وb يساوي 1 ليعني «يعرف الرمز»، وراقب اللمبة. تضيء اللمبة فقط حين يكون المفتاحان كلاهما عند 1، وهذا هو الصف (1، 1) في جدول الصدق. أرجع أي مفتاح إلى 0 فتنطفئ اللمبة فورًا، لأن AND تشترط تحقق كل المدخلات معًا. +عبارة «العدد 6 زوجي» صحيحة، وعبارة «العدد 6 فردي» خاطئة. نسمي العبارة التي يمكن الحكم عليها بالصواب أو الخطأ قضية منطقية. نمثل الصواب بالعدد 1 والخطأ بالعدد 0. كل مدخل في الرسم يمثل قيمة الصواب لإحدى عبارتين. -تخيل قاعدة أخرى: يدخل الضيف إذا أظهر بطاقة أو زكّاه موظف. هنا يكفي شرط واحد بدل الاثنين. تضيء OR بمجرد أن يرتفع مفتاح واحد على الأقل، ولا تنطفئ إلا حين يكون المفتاحان عند 0 معًا. أما NOT فأبسط: تقلب المدخل الوحيد الذي تعطيها إياه، فالمفتاح الذي يشعل الضوء مع AND يُطفئه مع NOT. +تعني AND «و»، وتشترط صحة العبارتين معًا. وتعني OR «أو»، وتكفي معها صحة واحدة على الأقل؛ أي إنها تقبل أيضًا صحة العبارتين معًا. أما NOT فتنفي عبارة واحدة، فتقلب قيمة صوابها. يعرض الرسم AND فقط، وتغطي صفوف الجدول الأربعة جميع أزواج المدخلات الممكنة. ## Formal -لا تأخذ القضية إلا قيمة صادقة (1) أو كاذبة (0). تصدق $p \land q$ (AND) بالضبط حين تصدق p وq معًا. تصدق $p \lor q$ (OR) حين تصدق إحداهما على الأقل. تصدق $\neg p$ (NOT) بالضبط حين تكذب p. +إذا كانت p وq قضيتين منطقيتين، فإن $p \land q$ تعني «p وq»، ولا تصح إلا إذا صحت الاثنتان. وتعني $p \lor q$ «p أو q»، وتصح إذا صحت واحدة منهما أو كلتاهما. أما $\neg p$ فتعني نفي p، وتكون صحيحة عندما تكون p خاطئة. -يسرد جدول الصدق كل تركيبة من المدخلات وخرجها. بقضيتين تحصل على $2^2 = 4$ صفوف، وبـ n قضية تحصل على $2^n$ صفًا يجب التحقق منها. +لكل مدخل قيمتان ممكنتان، لذا يوجد لمدخلين $2^2 = 4$ أزواج من القيم. وبوجه عام، يحتوي جدول الصواب لعدد n من المدخلات على $2^n$ صفوف. يعرض كل صف حالة واحدة ونتيجة تطبيق القاعدة المنطقية عليها. ## Advanced -سمِّ القضية تناقضية دائمة الصدق إن خرجت صادقة في كل صف من جدولها، مثل $p \lor \neg p$ (يعني «p أو ليس p»)، وسمِّها تناقضًا إن خرجت كاذبة في كل صف. تربط قوانين دي مورغان الأدوات الثلاث: لجدول $\neg(p \land q)$ الصدق نفسه لجدول $\neg p \lor \neg q$، وإبدال $\land$ بـ $\lor$ يعطي القانون الثاني المطابق. يُستخدم هذا باستمرار عند تبسيط الدارات الرقمية واستعلامات البحث. +العبارة الصادقة دائمًا تصح مهما كانت قيم المدخلات، مثل «p أو نفي p». أما التناقض فيكون خاطئًا في جميع الحالات، مثل «p ونفي p». ويوضح قانونا دي مورغان نفي العبارات المركبة: نفي صحة العبارتين معًا يعني أن واحدة منهما على الأقل خاطئة، ونفي صحة أي منهما يعني أنهما خاطئتان معًا. ## Derivation -1. اسرد كل تركيبة ممكنة من p وq: بقضيتين تحصل على أربعة صفوف للتحقق. -2. اقرأ AND وOR مباشرة من هذه الصفوف: تحتاج AND الاثنين صادقين، وتحتاج OR واحدًا على الأقل. -3. القضية الصادقة في الصفوف الأربعة كلها، مثل «p أو ليس p»، تناقضية دائمة الصدق لا يمكن أن تخرج كاذبة أبدًا. +1. نكتب الأزواج الأربعة الممكنة: (0, 0) و(0, 1) و(1, 0) و(1, 1). +2. تعطي AND القيمة 1 في الصف الأخير فقط. وتعطي OR القيمة 1 في كل الصفوف عدا الأول. +3. في عبارة «p أو نفي p»، يكون أحد الجزأين صحيحًا دائمًا، ولذلك تصح العبارة كلها في جميع الحالات. ## Real world -### استعلامات محركات البحث -اكتب «قطط AND كلاب» فتحتاج النتيجة الكلمتين معًا، أو اكتب «قطط OR كلاب» فتكفيها كلمة واحدة، تمامًا كبوابتي AND وOR هنا. +### تصفية قائمة -### الدارات الرقمية -تحسب كل بوابة منطقية على رقاقة الحاسوب AND أو OR أو NOT، أو مزيجًا منها، وتُبنى المعالجات الكاملة من هذه القواعد الثلاث. +شرط «السعر أقل من 50 والمنتج متوفر» يُبقي المنتجات التي تحقق الشرطين معًا. وإذا استبدلنا «و» بـ«أو»، نقبل أيضًا المنتج الذي يحقق شرطًا واحدًا فقط. -### التحكم في الوصول -قد يمنح نظام الدخول فقط إذا «يحمل بطاقة AND يعرف الرمز»، أو يمنعه إذا كان الشخص «غير مدرج في القائمة المعتمدة». هذا منطق قضوي صرف خلف باب مقفل. +### فحص نموذج -### فلاتر الجداول وقواعد البيانات -تُفلتر الصفوف حيث «السعر < 50 AND متوفر»، فتُجمع شرطان صادقان أو كاذبان بالطريقة نفسها التي يجمع بها جدول الصدق p وq. +يمكن استخدام شرط «كُتب الاسم وكُتب البريد الإلكتروني» للتحقق من ملء الحقلين. ونستخدم النفي للتعبير عن عكس شرط، مثل «لم يُكتب البريد الإلكتروني». diff --git a/content/lessons/discrete/propositional-logic/en.md b/content/lessons/discrete/propositional-logic/en.md index 36b2a394..63492250 100644 --- a/content/lessons/discrete/propositional-logic/en.md +++ b/content/lessons/discrete/propositional-logic/en.md @@ -1,68 +1,62 @@ --- title: 'Propositional logic' -summary: >- - Combining two true-or-false statements with AND, OR and NOT is the same - rule that drives both a truth table and a computer chip's circuits. +summary: 'Use AND, OR and NOT to decide whether a combination of statements is true.' parameters: - a: a — first input (0 or 1) - b: b — second input (0 or 1) + a: 'a — first statement: false (0) or true (1)' + b: 'b — second statement: false (0) or true (1)' variables: - - 'p, q: propositions, each either true (1) or false (0)' - - 'AND: true only when both sides are true' - - 'OR: true when at least one side is true' - - 'NOT: flips true to false and false to true' + - 'p, q: statements represented by inputs a and b' + - 'AND: both statements must be true' + - 'OR: at least one statement must be true' + - 'NOT: reverses one truth value' --- ## Try it -1. Set switch a to 1 (has a badge) and switch b to 1 (knows the code) and watch the lamp turn on. -2. Slide switch b back to 0 and watch the lamp go dark immediately, even though a is still 1. -3. Compare the AND lamp with the truth table on the right, and find the only row where the output is 1. +1. Set a = 1 and b = 1. The AND output is 1 because both inputs are true. +2. Keep a = 1 and set b = 0. The output becomes 0: one true input is not enough for AND. +3. Set a = 0 and try both values of b. Compare the highlighted truth-table rows; neither gives output 1. ## Real-life examples -1. **Full access: badge and code.** A worker has a badge (a = 1) and knows the door code (b = 1): the AND gate outputs 1, and the door unlocks. -2. **Badge but no code.** A visitor has a badge (a = 1) but does not know the code (b = 0): AND outputs 0, and the door stays locked. -3. **Code but no badge.** Someone knows the code (b = 1) but was never issued a badge (a = 0): AND still outputs 0, so the door still stays locked. +1. **Both requirements met.** Suppose a door requires a badge and a code. With a = 1 and b = 1, both requirements are met and AND returns 1. +2. **Only the badge.** With a = 1 and b = 0, the missing code makes AND return 0. +3. **Only the code.** With a = 0 and b = 1, the missing badge makes AND return 0. ## Test yourself -1. Find the one combination of a and b that makes AND output 1 and light the lamp. -2. Find a combination where a and b disagree, so AND stays 0 even though one input is 1. -3. Find the value of a for which flipping b alone would change whether the lamp lights. +1. Find the input pair that makes AND return 1. +2. Choose different values for a and b. +3. Choose a so that changing b changes the AND output. ## Intuition -A door unlocks only when a worker both has a badge and knows the code. Set switch a to 1 for "has a badge" and switch b to 1 for "knows the code", and watch the lamp: it lights only when both switches read 1, matching the row (1, 1) in the truth table on the right. Slide either switch back to 0 and the lamp goes dark immediately, because AND demands every input hold at once. +“The number 6 is even” is true; “the number 6 is odd” is false. A statement with a definite truth value is called a proposition. We represent true by 1 and false by 0. The inputs in the diagram represent two such statements. -A different rule, admitting a guest if they show a badge or a staff member vouches for them, needs only one condition to hold instead of both: OR lights up whenever at least one switch is up, and only stays dark when both are 0. NOT is simpler still: it just flips whichever single input you give it, so the switch that turns a light on for AND turns the same light off for NOT. +AND requires both statements to be true. OR requires at least one, so it also accepts the case where both are true. NOT reverses the truth value of one statement. This diagram shows AND only; its four table rows cover all possible pairs of inputs. ## Formal -A proposition takes only the values true (1) or false (0). $p \land q$ (AND) is true exactly when both p and q are true; $p \lor q$ (OR) is true when at least one is true; $\neg p$ (NOT) is true exactly when p is false. +For propositions p and q, $p \land q$ means AND and is true only when both are true. $p \lor q$ means OR and is true when either or both are true. $\neg p$ means NOT p and is true exactly when p is false. -A truth table lists every combination of inputs and the output for each: with two propositions there are $2^2 = 4$ rows, and with n propositions there are $2^n$ rows to check. +Each of two inputs has two possible values, giving $2^2 = 4$ combinations. More generally, a truth table for n inputs has $2^n$ rows. Each row records one combination and the result of the logical rule. ## Advanced -A tautology is a statement that comes out true in every row of its truth table, such as $p \lor \neg p$ ("p or not p"), while a contradiction is false in every row. De Morgan's laws connect the three connectives: $\neg(p \land q)$ has the same truth table as $\neg p \lor \neg q$, and swapping $\land$ for $\lor$ gives the matching second law — a fact used constantly when simplifying digital circuits and search queries. +A tautology is true for every input, such as “p or not p.” A contradiction is false for every input, such as “p and not p.” De Morgan's laws explain how negation changes a combined condition: “not both” means at least one is false; “neither” means both are false. ## Derivation -1. List every possible combination of p and q: with two propositions that gives four rows to check. -2. Read off AND and OR directly from those rows: AND needs both to be true, OR needs at least one. -3. A statement true across all four rows, like "p or not p", is a tautology — it can never come out false. +1. List the four input pairs: (0, 0), (0, 1), (1, 0), (1, 1). +2. AND is 1 only in the final row. OR is 1 in every row except the first. +3. For “p or not p,” one of the two parts is always true, so the whole statement is a tautology. ## Real world -### Search engine queries -Typing "cats AND dogs" versus "cats OR dogs" changes whether a result needs both words or just one, exactly like the AND and OR gates here. +### Filtering a list -### Digital circuits -Every logic gate on a computer chip computes AND, OR or NOT (or a combination of them) on its input wires, building up from these three rules to full processors. +“Price below 50 AND in stock” keeps an item only if it meets both conditions. Replacing AND with OR also keeps items that meet just one. -### Access control -A system might grant access only if "has a badge AND knows the code", or block it if "not on the approved list" — plain propositional logic behind a locked door. +### Checking a form -### Spreadsheet and database filters -Filtering rows where "price < 50 AND in stock" combines two true/false conditions the same way the truth table combines p and q. +“Name supplied AND email supplied” can determine whether both required fields have been filled. NOT can express the opposite of one condition, such as “email not supplied.” From 7e771c8c4cb315bbfd7335ec7ebf50f169d01679 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:44:21 +0300 Subject: [PATCH 021/124] content: rewrite quantifiers for first-time learners in both languages --- content/lessons/discrete/quantifiers/ar.md | 69 ++++++++++----------- content/lessons/discrete/quantifiers/en.md | 71 ++++++++++------------ 2 files changed, 64 insertions(+), 76 deletions(-) diff --git a/content/lessons/discrete/quantifiers/ar.md b/content/lessons/discrete/quantifiers/ar.md index 687ff53f..f48635ae 100644 --- a/content/lessons/discrete/quantifiers/ar.md +++ b/content/lessons/discrete/quantifiers/ar.md @@ -1,71 +1,66 @@ --- title: 'المسوّرات: لكل ويوجد' -summary: >- - «كل» و«بعض» كلمتان صغيرتان تغيّران معنى الجملة كله، ومثال واحد يكفي لنقض «كل». +summary: 'تعلّم لماذا يكفي مثال واحد لإثبات «يوجد»، ويكفي مثال مضاد واحد لنقض «لكل».' parameters: - N: N — أكبر رقم في الكون - p: p — A هي كل مضاعفات p - q: q — B هي كل مضاعفات q - op: op — العملية المضاءة حاليًا + N: 'N — نعرض الأعداد الصحيحة من 1 إلى N' + p: 'p — نضع مضاعفات هذا العدد في A' + q: 'q — نضع مضاعفات هذا العدد في B' + op: 'op — الاتحاد (0)، التقاطع (1)، الفرق (2)، متممة A (3)' variables: - - 'المجموعة A: كل مضاعفات p' - - 'المجموعة B: كل مضاعفات q' - - 'لكل: الدعوى صحيحة لكل عنصر تتحقق منه' - - 'هناك: الدعوى صحيحة لعنصر واحد على الأقل' - - 'ليس عنصرًا في' - - 'ليس: يقلب الدعوى الصادقة إلى كاذبة والكاذبة إلى صادقة' + - 'A: مضاعفات p من 1 إلى N' + - 'B: مضاعفات q من 1 إلى N' + - 'لكل: تشمل العبارة كل عناصر المجال المحدد' + - 'يوجد: عنصر واحد على الأقل في المجال المحدد' + - 'لا ينتمي: ليس عنصرًا في المجموعة' + - 'النفي: إنكار صحة العبارة' --- ## Try it -1. اجعل p يساوي 2 وq يساوي 4، وراقب المجموعة B تقع بالكامل داخل المجموعة A على الشاشة. -2. بدّل العملية المضاءة إلى «الفرق» واقرأ الأرقام التي تظهر في A دون B، كل رقم منها يثبت دعوى وجود. -3. غيّر q إلى رقم ليس مضاعفًا لـp (جرّب q يساوي 5) وراقب منطقة B ناقص A تمتلئ بالأرقام، فتنكسر دعوى «لكل». +1. اضبط N = 20 وp = 2 وq = 4. اقرأ قائمة B: الأعداد 4 و8 و12 و16 و20 كلها تنتمي أيضًا إلى A. شكل الدائرتين ثابت، لذا افحص الأعداد التي تمثل عناصرهما. +2. اختر الفرق (op = 2). الأعداد المحددة، وهي 2 و6 و10 و14 و18، تنتمي إلى A ولا تنتمي إلى B. يكفي أي واحد منها لإثبات وجود عدد بهذه الصفة. +3. أبقِ N = 20 وp = 2، وغيّر q إلى 5. ينتمي العدد 5 إلى B ولا ينتمي إلى A، فينقض عبارة «كل عنصر في B ينتمي إلى A». ## Real-life examples -1. **الخزانات المرقّمة بمضاعفات 4 مرقّمة أيضًا بمضاعفات 2.** اجعل p يساوي 2 وq يساوي 4 وN يساوي 20 خزانة. كل رقم خزانة مضاعف لـ4 هو أيضًا مضاعف لـ2، فتصح دعوى «كل مضاعف لـ4 مضاعف لـ2» على الخزانات العشرين كلها. -2. **كل محطة باص سادسة هي أيضًا محطة ثالثة.** اجعل p يساوي 3 وq يساوي 6 وN يساوي 30 محطة. كل محطة مرقّمة بمضاعف لـ6 هي أيضًا مضاعف لـ3، فدعوى «لكل» صادقة مجددًا. -3. **ليست كل خزانة مرقّمة بمضاعفات 3 مرقّمة بمضاعفات 5.** اجعل p يساوي 5 وq يساوي 3 وN يساوي 24 خزانة. الخزانة رقم 3 مضاعف لـ3 لكنها ليست مضاعفًا لـ5، وهذا المثال المضاد الواحد يهدم دعوى «كل مضاعف لـ3 مضاعف لـ5». +1. **خزائن مرقمة.** بين الخزائن من 1 إلى 20، كل رقم يقبل القسمة على 4 يقبل القسمة على 2. لكن رقم الخزانة 2 يبين أن العكس غير صحيح. +2. **محطات مرقمة.** بين المحطات من 1 إلى 30، كل رقم من مضاعفات 6 هو أيضًا من مضاعفات 3. أما رقم المحطة 3 فهو من مضاعفات 3 وليس من مضاعفات 6. +3. **مثال ينقض التعميم.** للأعداد من 1 إلى 24، عند p = 5 وq = 3، ينتمي العدد 3 إلى B ولا ينتمي إلى A. يكفي هذا المثال لنقض أن كل عنصر في B ينتمي إلى A. ## Test yourself -1. جد p وq بحيث تصح الدعوى «كل مضاعف لـq مضاعف لـp». -2. جد p وq بحيث تكذب الدعوى «كل مضاعف لـq مضاعف لـp». -3. جد N وp وq بحيث يكون أكثر من 5 أرقام مضاعفات لـp وليست مضاعفات لـq. +1. اختر p وq بحيث يكون q من مضاعفات p. عندها يكون كل مضاعف لـq مضاعفًا لـp أيضًا. +2. اختر p وq بحيث لا يكون q من مضاعفات p. يكون q نفسه مثالًا مضادًا للعبارة عن جميع المضاعفات الموجبة. اجعل N مساويًا لـq أو أكبر منه كي يظهر المثال في الرسم. +3. اختر N وp وq بحيث يوجد في الرسم أكثر من 5 أعداد تنتمي إلى A ولا تنتمي إلى B. ## Intuition -تخيّل 20 خزانة مرقّمة من 1 إلى 20. تضم المجموعة A كل رقم خزانة هو مضاعف لـp، وتضم المجموعة B كل مضاعف لـq. بجعل p يساوي 2 وq يساوي 4، تقع المجموعة B بالكامل داخل المجموعة A على الشاشة. كل مضاعف لـ4 تسمّيه، 4، 8، 12، وهكذا، يظهر أيضًا في قائمة A من الخزانات الزوجية. هذه الدعوى «كل واحدة منها» هي بالضبط معنى محدِّد «لكل»، ولهذا تبقى منطقة B ناقص A خالية على الشاشة. +عبارة «كل مضاعف للعدد 4 هو عدد زوجي» تشمل جميع مضاعفات 4. لا يكفي فحص 4 و8 وحدهما لإثباتها. لكن لدينا سببًا عامًا: يتكون أي مضاعف للعدد 4 من مجموعات من أربعة، ويمكن تقسيم كل مجموعة إلى زوجين. يثبت هذا السبب العبارة حتى للأعداد التي لا يعرضها الرسم. -انظر الآن ماذا يضيء في A ناقص B. الخزانات 2، 6، 10، 14 و18، كل واحدة زوجية لكنها ليست مضاعفًا لـ4. كل واحدة من هذه الخزانات الخمس شاهد على دعوى وجود، أن هناك مضاعفًا لـ2 ليس مضاعفًا لـ4. إيجاد خزانة واحدة كهذه يكفي لإثبات الدعوى صادقة، والصورة تمنحك خمسًا. +أما عبارة «يوجد عدد زوجي ليس من مضاعفات 4» فيكفي لإثباتها العدد 2. نسمي هذا العدد شاهدًا على صحة العبارة. وإذا ادعى شخص أن كل عدد زوجي من مضاعفات 4، فإن العدد 2 نفسه ينقض ادعاءه، ونسميه عندها مثالًا مضادًا. انتبه دائمًا إلى الفرق بين «كل» و«واحد على الأقل». ## Formal -$(\forall x \in B)\ x \in A$ تقول إن كل عنصر في B ينتمي أيضًا إلى A، وهذا بالضبط معنى $B \subseteq A$. يتطلب التحقق من صحتها فحص كل عنصر في B، فمثال مضاد واحد يكفي لهدمها. +تعني $(\forall x \in B)\ x \in A$ أن كل عنصر في B ينتمي إلى A، أي إن $B \subseteq A$. يمكن إثباتها بفحص جميع عناصر B إذا كانت منتهية، أو بحجة تشمل كل عناصرها. ويكفي مثال مضاد واحد لنقضها. -$(\exists x \in A)\ x \notin B$ تقول إن عنصرًا واحدًا على الأقل من A غائب عن B. وخلافًا للدعوى الشاملة، مثال واحد يكفي لإثباتها، ولست بحاجة إلى فحص كل عنصر في A. +تعني $(\exists x \in A)\ x \notin B$ وجود عنصر واحد على الأقل في A لا ينتمي إلى B. يكفي شاهد واحد لإثباتها. ولا تقول العبارة إن هذا العنصر وحيد، ولا إن كل عناصر A تحقق الصفة نفسها. ## Advanced -المحدِّدان نقيض أحدهما للآخر. $\neg(\forall x \in B,\ x \in A) \iff \exists x \in B,\ x \notin A$. لتفنيد «كل عنصر في B هو في A» يكفيك مثال مضاد واحد في B. وبالعكس، لتفنيد «بعض عناصر B ليست في A» عليك أن تفحص كل عنصر في B دون أن تجد شاهدًا واحدًا. هذا التبادل بين «تحقّق من كل شيء» و«ابحث عن شاهد واحد» هو أنفع حيلة في كتابة البراهين الرياضية وقراءتها. +نفي «كل عنصر في B ينتمي إلى A» هو «يوجد عنصر في B لا ينتمي إلى A». ونفي «يوجد عنصر في B ينتمي إلى A» هو «لا يوجد أي عنصر مشترك بينهما». إذا كانت B خالية، تصح العبارة الأولى التي تبدأ بـ«كل»، لعدم وجود مثال مضاد، بينما يخطئ أي ادعاء بوجود عنصر فيها. ولا يكفي الرسم المنتهي وحده لإثبات عبارة عن جميع الأعداد الصحيحة الموجبة. ## Derivation -1. بما أن B هي بالضبط مضاعفات 4، فكل واحد منها مضاعف لـ2 أيضًا بحكم التعريف، فتصح دعوى «لكل» لكل x في B. -2. اختر x = 2. هو مضاعف لـ2 فهو في A، لكنه ليس مضاعفًا لـ4 فهو غائب عن B، وهذا وحده يثبت دعوى الوجود. -3. نفي «لكل x في B، x في A» يقلبها إلى «هناك x في B ليس في A»، فتبدّل المحدِّد وتنفِ الدعوى الداخلية معًا. +1. عند p = 2 وq = 4، يقبل كل عنصر في B القسمة على 4، وبالتالي على 2. إذن كل عنصر في B ينتمي إلى A. +2. ينتمي العدد 2 إلى A ولا ينتمي إلى B، فيثبت وجود عنصر واحد على الأقل بهذه الصفة. +3. إنكار انتماء كل عناصر B إلى A يعني تأكيد وجود عنصر واحد على الأقل في B لا ينتمي إلى A. ## Real world -### مواصفات البرمجيات -«يجب على كل المستخدمين توثيق بريدهم» شرط شامل يُفحص مقابل كل حساب، بينما «محاولة دخول واحدة تجاوزت حد المعدل» دعوى وجود يكفي المراقب فيها حالة واحدة لتفعيلها. +### مراجعة تسليم الواجبات -### استعلامات قواعد البيانات -عبارة EXISTS في SQL تتحقق من دعوى وجود مباشرة، وتتوقف بمجرد إيجاد صف واحد مطابق، بينما ALL أو ضم كل الصفوف يتحقق من دعوى شاملة. +تحتاج عبارة «سلّم جميع الطلاب» إلى فحص القائمة كاملة أو دليل آخر يشمل الجميع. أما عبارة «سلّم أحد الطلاب» فتكفي لإثباتها معرفة طالب واحد سلّم واجبه. -### النظريات الرياضية -«كل عدد أولي أكبر من 2 فردي» دعوى شاملة تحتاج حجة عامة. «هناك عدد أولي زوجي» دعوى وجود يكفي إثباتها بالإشارة إلى 2. +### قراءة العبارات الرياضية -### التفكير اليومي -كان يُعتقد أن «كل البجع أبيض» صحيحة حتى قدّم بجع أسود واحد في أستراليا المثال المضاد الوحيد اللازم لهدم الدعوى الشاملة. +نثبت «يوجد عدد أولي زوجي» بالمثال 2. أما «كل عدد أولي أكبر من 2 فردي» فتحتاج إلى سبب عام: كل عدد زوجي أكبر من 2 يقبل القسمة على 2، وهو قاسم غير 1 وغير العدد نفسه. diff --git a/content/lessons/discrete/quantifiers/en.md b/content/lessons/discrete/quantifiers/en.md index 2abed1b2..e425fb4a 100644 --- a/content/lessons/discrete/quantifiers/en.md +++ b/content/lessons/discrete/quantifiers/en.md @@ -1,73 +1,66 @@ --- title: 'Quantifiers: for all and there exists' -summary: >- - "Every multiple of 4 is also a multiple of 2" and "some multiple of 2 is - not a multiple of 4" are two different kinds of claim, and telling them - apart is what lets you prove or disprove a statement with just one example. +summary: 'Learn why one example can prove “there exists,” while one counterexample disproves “for all.”' parameters: - N: N — largest number in the universe - p: p — A is every multiple of p - q: q — B is every multiple of q - op: op — which operation is highlighted + N: 'N — include the integers from 1 to N' + p: 'p — A contains multiples of this number' + q: 'q — B contains multiples of this number' + op: 'op — union (0), intersection (1), difference (2), complement of A (3)' variables: - - 'set A: every multiple of p' - - 'set B: every multiple of q' - - 'for all: the claim holds for every element you check' - - 'there exists: the claim holds for at least one element' - - 'not an element of' - - 'not: flips a true claim to false and a false one to true' + - 'A: multiples of p from 1 to N' + - 'B: multiples of q from 1 to N' + - 'For all: every member of the stated domain' + - 'There exists: at least one member of the stated domain' + - 'Not in: does not belong to the set' + - 'NOT: negates a statement' --- ## Try it -1. Set p to 2 and q to 4 and watch set B sit entirely inside set A on screen. -2. Switch the highlighted operation to "difference" and read off the numbers that appear in A but not B — each one proves an existence claim. -3. Change q to a number that is not a multiple of p (try q = 5) and watch the region B minus A fill with numbers, breaking the "for all" claim. +1. Set N = 20, p = 2 and q = 4. Read the B list: 4, 8, 12, 16 and 20 all belong to A as well. The circles stay fixed; inspect their numbered members. +2. Choose difference (op = 2). The selected numbers 2, 6, 10, 14 and 18 belong to A but not B. Any one proves that such a number exists. +3. Keep N = 20 and p = 2, then set q = 5. The number 5 belongs to B but not A, disproving “every member of B belongs to A.” ## Real-life examples -1. **Lockers numbered in fours are always numbered in twos.** With p = 2 and q = 4, and N = 20 lockers, every locker number that is a multiple of 4 is also a multiple of 2: the claim "every multiple of 4 is a multiple of 2" holds for all 20 lockers. -2. **Every sixth bus stop is also a third stop.** With p = 3 and q = 6, and N = 30 stops, every stop numbered a multiple of 6 is also a multiple of 3, again a true "for all" claim. -3. **Not every locker numbered in threes is numbered in fives.** With p = 5 and q = 3, and N = 24 lockers, locker 3 is a multiple of 3 but not of 5, a single counterexample that breaks the claim "every multiple of 3 is a multiple of 5." +1. **Numbered lockers.** Among lockers 1–20, every number divisible by 4 is divisible by 2. Locker 2 shows that the reverse claim is false. +2. **Numbered stops.** Among stops 1–30, every sixth stop is also a multiple of 3. Stop 3 is a multiple of 3 but not of 6. +3. **A counterexample.** For numbers 1–24 with p = 5 and q = 3, the number 3 belongs to B but not A. One example disproves the claim that every member of B is in A. ## Test yourself -1. Find p and q so that the claim "every multiple of q is a multiple of p" is true. -2. Find p and q so that the claim "every multiple of q is a multiple of p" is false. -3. Find N, p and q so that more than 5 numbers are multiples of p but not of q. +1. Choose p and q so that q is a multiple of p. Every multiple of q is then a multiple of p. +2. Choose p and q so that q is not a multiple of p. Then q itself disproves that claim about all positive multiples. Set N at least as large as q to see it in the diagram. +3. Choose N, p and q so that more than 5 displayed numbers belong to A but not B. ## Intuition -Picture 20 lockers numbered 1 to 20. Set A holds every locker number that is a multiple of p, and set B holds every multiple of q. With p set to 2 and q set to 4, set B sits entirely inside set A on screen: every multiple of 4 you can name, 4, 8, 12, and so on, also shows up in A's list of even lockers. That "every single one" claim is what the for-all quantifier means, and it is why the region B minus A stays empty on screen. +“Every multiple of 4 is even” concerns all multiples of 4. Checking 4 and 8 alone does not establish it. A general reason does: a multiple of 4 consists of groups of four, and each group of four can be split into two pairs. This proves the statement even beyond the displayed numbers. -Now look at what lights up in A minus B: lockers 2, 6, 10, 14 and 18, each one even but not a multiple of 4. Each of those five lockers is a witness to an existence claim, that there exists a multiple of 2 which is not a multiple of 4. Finding just one such locker would already prove the claim true, and the picture hands you five. +“Some even number is not a multiple of 4” needs just one example: 2. We call it a witness. If someone instead claims that every even number is a multiple of 4, the same 2 disproves their claim and is called a counterexample. Pay attention to whether a statement says every or at least one. ## Formal -$(\forall x \in B)\ x \in A$ says every element of B also belongs to A, which is exactly what $B \subseteq A$ means. It takes checking every element of B to be sure this holds — one counterexample would break it. +$(\forall x \in B)\ x \in A$ means every member of B belongs to A, or $B \subseteq A$. We can prove it by checking every member of a finite B, or by giving an argument that covers every member. One counterexample disproves it. -$(\exists x \in A)\ x \notin B$ says at least one element of A is missing from B. Unlike the universal claim, a single example is enough to make this true; you do not need to check every element of A. +$(\exists x \in A)\ x \notin B$ means at least one member of A does not belong to B. One witness proves it. The claim does not say there is only one such member, nor that every member of A has this property. ## Advanced -The two quantifiers are negations of each other: $\neg(\forall x \in B,\ x \in A) \iff \exists x \in B,\ x \notin A$. To disprove "every B is an A" you only need one counterexample in B, and conversely, to disprove "some B is not an A" you would need to check every element of B and find none. This flip between "check everything" and "find one witness" is the single most useful trick for both writing and reading mathematical proofs. +Negating “every B is an A” gives “at least one B is not an A.” Negating “at least one B is an A” gives “no B is an A.” If B is empty, the first universal statement is true because it has no counterexample, while an existence claim about a member of B is false. The finite diagram does not by itself prove statements about all positive integers. ## Derivation -1. Since B is exactly the multiples of 4, every one of them is also a multiple of 2 by definition, so the for-all statement holds for every x in B. -2. Pick x = 2: it is a multiple of 2 so it lies in A, but it is not a multiple of 4 so it is missing from B, which alone proves the existence claim. -3. Negating "for all x in B, x is in A" flips it into "there exists an x in B that is not in A" — swapping the quantifier and negating the inner statement together. +1. For p = 2 and q = 4, each member of B is divisible by 4 and therefore by 2. Thus every member of B belongs to A. +2. The number 2 belongs to A but not B, proving that at least one such member exists. +3. To deny that all members of B belong to A is to assert that at least one member of B does not belong to A. ## Real world -### Software specifications -"All users must verify their email" is a for-all requirement checked against every account, while "some login attempt exceeded the rate limit" is an existence claim a monitor only needs one instance to trigger. +### Checking a class list -### Database queries -SQL's EXISTS clause checks an existential claim directly, stopping as soon as one matching row is found, while ALL or a join over every row checks a universal one. +“Every student has submitted” requires checking all students or establishing the claim another way. “Someone has submitted” needs only one confirmed submission. -### Mathematical theorems -"Every prime greater than 2 is odd" is universal and needs a general argument; "there exists an even prime" is existential and is proved just by pointing at 2. +### Reading mathematical claims -### Everyday reasoning -"All swans are white" was believed true until a single black swan in Australia supplied the one counterexample needed to break a universal claim. +“There is an even prime” is proved by the example 2. “Every prime greater than 2 is odd” needs a reason: an even number greater than 2 has 2 as a divisor other than 1 and itself. From 5fc503fb054e12d243db3e6555ff796424114506 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:44:21 +0300 Subject: [PATCH 022/124] content: rewrite relations-and-functions for first-time learners in both languages --- .../discrete/relations-and-functions/ar.md | 59 ++++++++---------- .../discrete/relations-and-functions/en.md | 61 ++++++++----------- 2 files changed, 54 insertions(+), 66 deletions(-) diff --git a/content/lessons/discrete/relations-and-functions/ar.md b/content/lessons/discrete/relations-and-functions/ar.md index ea78bbbc..1591a3cc 100644 --- a/content/lessons/discrete/relations-and-functions/ar.md +++ b/content/lessons/discrete/relations-and-functions/ar.md @@ -1,66 +1,61 @@ --- title: 'العلاقات والدوال: أسهم بين مجموعتين' -summary: >- - ارسم أسهمًا من ثلاثة أطفال إلى ثلاثة أندية، واعرف متى يكون هذا دالة. +summary: 'استخدم الأسهم للتمييز بين العلاقة والدالة، ثم افحص هل يشترك مدخلان مختلفان في مخرج واحد.' parameters: - code: code — أي الأسهم مرسومة، مُجمّعة في رقم واحد (اضغط خطًا لتبديله) + code: 'code — إعداد الرسم؛ انقر خطًا لإضافة سهم أو حذفه' variables: - - العلاقة نفسها، مجموعة الأسهم المرسومة كلها - - المجموعة المصدر، الأطفال الثلاثة - - المجموعة الهدف، الأندية الثلاثة - - الضرب الديكارتي، كل إقران ممكن لطفل واحد مع نادٍ واحد + - 'R: أزواج الطلاب والأندية المختارة' + - 'A: المجال، وهو الطلاب الثلاثة' + - 'B: المجال المقابل، وهو الأندية الثلاثة' + - '×: تكوين جميع الأزواج المرتبة الممكنة' --- ## Try it -1. اضغط الخط من أمير إلى كرة القدم لرسم سهم، ثم اضغطه مرة أخرى لمسحه. كل ضغطة تبدّل ذلك السهم الواحد تشغيلًا أو إيقافًا. -2. ابنِ رسمًا يخرج فيه من كل طفل سهم واحد بالضبط، وراقب مؤشر «هل هي دالة؟» يتحول إلى «نعم». -3. أرسل الآن سهمين من الطفل نفسه، أو اترك طفلًا بلا أي سهم، وراقبه يعود إلى «لا». +1. اضبط code = 273. لكل طالب سهم واحد إلى نادٍ مختلف. تشير النتائج إلى دالة متباينة وشاملة. +2. انقر الخط من أمير إلى كرة القدم لحذف السهم. يصبح أمير بلا مخرج، فلا تعود العلاقة دالة. انقر مرة أخرى لإعادة السهم. +3. اضبط code = 137. ما زال لكل طالب مخرج واحد، لكن طالبين اختارا كرة القدم. العلاقة دالة، لكنها ليست متباينة ولا شاملة. ## Real-life examples -1. **قائمة مرتّبة.** ينضم أمير إلى كرة القدم، وبيلا إلى الشطرنج، وتشين إلى الفن. سهم واحد لكل طفل، ولا اشتراك في نادٍ، فهذه دالة متباينة وشاملة معًا. -2. **تسجيل خاطئ.** يسجل أمير في كرة القدم والشطرنج معًا، بينما لا يسجل تشين في شيء إطلاقًا. هذه علاقة، لكنها تفشل في أن تكون دالة لسببين. -3. **نادٍ شائع.** ينضم أمير وبيلا كلاهما إلى كرة القدم، وينضم تشين إلى الشطرنج، بينما لا يحصل الفن على أحد. هذه دالة، لأن لكل طفل ناديًا واحدًا بالضبط، لكنها ليست متباينة، وليست شاملة. +1. **نادٍ مختلف لكل طالب.** عند code = 273، يختار أمير كرة القدم، وبيلا الشطرنج، وتشين الفن. لكل طالب نادٍ واحد، وكل نادٍ اختير مرة واحدة. +2. **اختيارات زائدة وأخرى ناقصة.** عند code = 35، يختار أمير كرة القدم والشطرنج، وتختار بيلا الفن، ولا يختار تشين شيئًا. هذه علاقة صحيحة، لكنها ليست دالة تسند ناديًا واحدًا لكل طالب. +3. **اختيار مشترك.** عند code = 137، يختار أمير وبيلا كرة القدم، ويختار تشين الشطرنج. لكل طالب نادٍ واحد، لكن كرة القدم اختيار مشترك، ولم يختر أحد الفن. ## Test yourself -1. ارسم رسمًا يخرج فيه من كل طفل سهم واحد بالضبط. -2. ارسم دالة يشترك فيها طفلان في النادي نفسه، بحيث تكون الدالة موجودة لكن غير متباينة. -3. ارسم رسمًا يفشل في أن يكون دالة، بإعطاء طفل ما إما بلا سهم أو سهمين. +1. ارسم سهمًا واحدًا خارجًا من كل طالب. +2. ارسم دالة يشترك فيها طالبان على الأقل في النادي نفسه. +3. ارسم علاقة ليست دالة، بترك طالب دون سهم أو بإخراج أكثر من سهم منه. ## Intuition -يجلس ثلاثة أطفال، أمير وبيلا وتشين، على اليسار، وتجلس ثلاثة أندية بعد المدرسة، كرة القدم والشطرنج والفن، على اليمين. اضغط أيًا من الخطوط التسعة الممكنة لرسم سهم من طفل إلى نادٍ أو مسحه. العلاقة هي ببساطة هذه الصورة كلها، أي مجموعة أسهم على الإطلاق، حتى لو كانت فوضوية يسجل فيها طفل في ناديين أو لا يسجل في شيء. +يسجل كل سهم زوجًا: طالبًا وناديًا. أي مجموعة من هذه الأزواج تسمى علاقة. قد يكون للطالب عدة أسهم أو لا يكون له سهم، وهذا مسموح في العلاقة. النقر على خط يصل طالبًا بنادٍ يضيف ذلك الزوج أو يحذفه. -تتحول الصورة إلى دالة في اللحظة التي يخرج فيها من كل طفل سهم واحد بالضبط، لا أكثر ولا أقل، لأن الدالة يجب أن تُعطي كل مُدخل مُخرجًا واحدًا بالضبط. حالما تصبح دالة، يستحق سؤالان إضافيان أن يُطرحا. هل هي متباينة، أي هل يحصل كل نادٍ على طفل واحد على الأكثر؟ وهل هي شاملة، أي هل يختار كل نادٍ شخصٌ ما؟ الدالة التي تكون الاثنين معًا، مثل القائمة المرتبة حيث يحصل كل طفل على نادٍ مختلف ولا يُترك نادٍ فارغًا، تُسمى تقابلًا. +للدالة شرط أدق: يجب أن يكون لكل مدخل مخرج واحد بالضبط. هنا يجب أن يختار كل طالب ناديًا واحدًا. يجوز أن يختار عدة طلاب النادي نفسه دون مخالفة هذا الشرط. وتضيف الدالة المتباينة شرطًا آخر: ألا يشترك مدخلان مختلفان في مخرج واحد. أما الدالة الشاملة فتصل إلى كل نادٍ بطالب واحد على الأقل. ## Formal -لمجموعتين $A$ و$B$، العلاقة $R$ من $A$ إلى $B$ هي أي مجموعة جزئية من الضرب الديكارتي $A \times B$، مجموعة كل الأزواج المرتبة $(a,b)$ حيث $a \in A$ و$b \in B$. رسم سهم من $a$ إلى $b$ بالضبط حين $(a,b) \in R$ يحوّل أي علاقة إلى صورة كالتي أعلاه. +الضرب الديكارتي $A\times B$ هو مجموعة جميع الأزواج المرتبة التي يأتي عنصرها الأول من A والثاني من B. تختار العلاقة $R\subseteq A\times B$ بعض هذه الأزواج. في الرسم ثلاثة مدخلات وثلاثة مخرجات ممكنة، لذا توجد تسعة أزواج ممكنة. -$R$ تكون دالة من $A$ إلى $B$ حين يظهر كل $a \in A$ في زوج واحد بالضبط من $R$، ويحصل عندها كل طفل على سهم واحد بالضبط. الدالة متباينة، أو واحد لواحد، حين لا يتشارك عنصران مختلفان من $A$ الصورة نفسها في $B$. وهي شاملة، أو غامرة، حين يكون كل عنصر من $B$ صورة لعنصر ما من $A$. الدالة المتباينة والشاملة معًا تُسمى تقابلًا، وهي تقرن $A$ و$B$ بشكل تام. +تكون العلاقة دالة من A إلى B عندما يظهر كل مدخل في A في زوج واحد بالضبط. نسمي A المجال وB المجال المقابل، أما المخرجات التي نصل إليها فعلًا فتكوّن المدى. تكون الدالة متباينة إذا اختلفت مخرجات المدخلات المختلفة، وشاملة إذا ساوى مداها B. وإذا جمعت الخاصيتين، سميت تقابلًا. ## Advanced -حين تكون $A$ و$B$ منتهيتين بالعدد نفسه من العناصر، كما هنا بثلاثة أطفال وثلاثة أندية، تكون الدالة من $A$ إلى $B$ متباينة بالضبط حين تكون شاملة. فلا سبيل لإصابة كل نادٍ دون استخدام كل طفل بالضبط مرة واحدة، ولا سبيل لاستخدام كل طفل دون تغطية كل نادٍ. تفشل هذه الحيلة بمجرد أن تختلف المجموعتان في الحجم. دالة من أربعة أطفال إلى ثلاثة أندية لا يمكن أبدًا أن تكون متباينة، إذ لا بد أن يشترك نادٍ ما، وفق مبدأ برج الحمام. +عندما تكون المجموعتان منتهيتين ومتساويتين في عدد العناصر، تكون الدالة متباينة إذا وفقط إذا كانت شاملة. هنا تصل ثلاثة مخرجات مختلفة من ثلاثة طلاب إلى الأندية الثلاثة كلها. وبالعكس، لا يترك الوصول إلى الأندية الثلاثة بثلاثة أسهم مجالًا لاشتراك طالبين في نادٍ واحد. لا تطبق هذا الاختصار تلقائيًا على مجموعتين مختلفتي الحجم أو غير منتهيتين. ## Derivation -1. العلاقة $R \subseteq A \times B$ تقرن كل عنصر من $A$ بصفر أو عنصر واحد أو عدة عناصر من $B$، أيًا كانت طريقة رسم الأسهم. -2. تُعد $R$ دالة بالضبط حين يخرج من كل عنصر في $A$ سهم واحد لا غير، لا صفر ولا اثنان أو أكثر أبدًا. -3. تلك الدالة متباينة بالضبط حين لا يشير، إضافة إلى ذلك، عنصران مختلفان من $A$ أبدًا إلى العنصر نفسه من $B$. +1. نبدأ بأي اختيار من أزواج الطلاب والأندية التسعة الممكنة. نحصل على علاقة مهما كان عدد الأسهم لكل طالب. +2. نفحص كل مدخل. وجود سهم واحد خارج من كل مدخل شرط لازم وكافٍ لتكون العلاقة دالة. +3. بعد التأكد من أنها دالة، نفحص الأسهم الداخلة. سهم واحد على الأكثر لكل مخرج يجعلها متباينة، وسهم واحد على الأقل لكل مخرج يجعلها شاملة. ## Real world -### توزيع المقاعد أو الخزائن أو أرقام الهوية -توزيع خزانة واحدة لكل طالب، أو مقعد واحد لكل راكب، لا ينجح بشكل سليم إلا إذا كان التوزيع دالة، بحيث يحصل كل طالب على خزانة واحدة بالضبط، ومتباينًا، بحيث لا يشترك طالبان في الخزانة نفسها. +### توزيع الخزائن -### البحث عن كلمة في قاموس -القاموس دالة من الكلمات إلى تعريفاتها. لكل كلمة تبحث عنها مدخل واحد بالضبط تقفز إليه، مع أن عدة كلمات مختلفة يمكن أن تتشارك التعريف نفسه. +إعطاء كل طالب خزانة واحدة يحدد دالة. إذا منعنا مشاركة الخزائن، يجب أن تكون الدالة متباينة أيضًا. يجوز ترك خزائن فارغة، إلا إذا اشترطنا أن تكون الدالة شاملة. -### مفاتيح قواعد البيانات -المفتاح الأساسي لجدول قاعدة بيانات يُبنى ليكون دالة متباينة من الصفوف إلى قيم المفاتيح، بحيث يقود ذلك المفتاح وحده دائمًا إلى صف واحد بالضبط، لا صفين أبدًا. +### تسجيل عدة اهتمامات -### برامج الحاسوب كدوال -تأخذ كل دالة نقية في برنامج حاسوبي مُدخلًا وتنتج مُخرجًا واحدًا بالضبط، وهي الفكرة نفسها التي تمثلها أسهم هذا الدرس. واختبار ما إذا كان مُدخلان مختلفان قد ينتجان مُخرجين متعارضين هو بالضبط سؤال عن التباين. +قد يسجل الطالب عدة اهتمامات أو لا يسجل شيئًا. تكوّن أزواج الطلاب والاهتمامات علاقة، لكنها ليست عادة دالة تكون مخرجاتها اهتمامات منفردة. ويمكن بدلًا من ذلك إسناد قائمة اهتمامات كاملة لكل طالب؛ حينها نستخدم مجموعة مخرجات مختلفة. diff --git a/content/lessons/discrete/relations-and-functions/en.md b/content/lessons/discrete/relations-and-functions/en.md index 942c23fd..92744cc8 100644 --- a/content/lessons/discrete/relations-and-functions/en.md +++ b/content/lessons/discrete/relations-and-functions/en.md @@ -1,68 +1,61 @@ --- title: 'Relations and functions: arrows between two sets' -summary: >- - Draw arrows from three kids to three after-school clubs, and discover - exactly when that arrow diagram counts as a function, and when it is - one-to-one. +summary: 'Use arrows to distinguish a relation from a function, then check whether different inputs share an output.' parameters: - code: code — which arrows are drawn, packed into one number (tap a line to toggle it) + code: 'code — diagram setting; tap a connecting line to add or remove an arrow' variables: - - the relation itself — the whole set of arrows drawn - - the starting set — the three kids - - the target set — the three clubs - - the Cartesian product — every possible pairing of one kid with one club + - 'R: selected student–club pairs' + - 'A: domain, the three students' + - 'B: codomain, the three clubs' + - '×: forms all possible ordered pairs' --- ## Try it -1. Tap the line from Amir to Football to draw an arrow, then tap it again to erase it — each tap flips that one arrow on or off. -2. Build a diagram where every kid has exactly one arrow out, and watch the "is it a function?" readout turn to yes. -3. Now send two arrows out of the same kid, or leave one kid with none, and watch it turn back to no. +1. Set code = 273. Each student has one arrow to a different club. The readouts identify a function that is one-to-one and onto. +2. Tap the line from Amir to Football to remove that arrow. Amir now has no output, so the relation is no longer a function. Tap again to restore it. +3. Set code = 137. Each student still has one output, but two choose Football. It is a function, though neither one-to-one nor onto. ## Real-life examples -1. **A tidy roster.** Amir joins Football, Bella joins Chess, Chen joins Art — one arrow per kid, no club shared: a function that is both one-to-one and onto. -2. **Sign-ups gone wrong.** Amir signs up for both Football and Chess while Chen signs up for nothing at all: this is a relation, but it fails to be a function on both counts. -3. **A popular club.** Amir and Bella both join Football, and Chen joins Chess, while Art gets no one: a function, since every kid has exactly one club, but not one-to-one, and not onto. +1. **One different club each.** With code = 273, Amir chooses Football, Bella chooses Chess and Chen chooses Art. Each student has one club, and each club is chosen once. +2. **Missing and extra choices.** With code = 35, Amir chooses Football and Chess, Bella chooses Art, and Chen has no choice. This is a valid relation but not a function assigning one club to every student. +3. **A shared choice.** With code = 137, Amir and Bella choose Football and Chen chooses Chess. Every student has one club, but Football is shared and Art is unused. ## Test yourself -1. Draw a diagram where every kid has exactly one arrow out. -2. Draw a function where two kids share a club, so the diagram is a function but not one-to-one. -3. Draw a diagram that fails to be a function, by giving some kid either no arrow or two arrows. +1. Draw exactly one outgoing arrow for each student. +2. Draw a function in which at least two students share a club. +3. Draw a relation that is not a function by leaving a student without an arrow or giving a student more than one. ## Intuition -Three kids, Amir, Bella and Chen, sit on the left; three after-school clubs, Football, Chess and Art, sit on the right. Tap any of the nine possible connecting lines to draw or erase an arrow from a kid to a club. A relation is simply this whole picture: any set of arrows at all, even a messy one where a kid signs up for two clubs or for none. +An arrow records a pair: one student and one club. Any collection of these pairs is a relation. A student may have several arrows or none; that is allowed for a relation. Tapping a connecting line adds or removes its pair. -The picture becomes a function the moment every single kid has exactly one arrow leaving them — no more, no fewer, since a function must assign each input exactly one output. Once it is a function, two more questions become worth asking: is it one-to-one, does every club get at most one kid, and is it onto, does every club get picked by someone? A function that is both at once, like the tidy roster where every kid gets a different club and no club is left empty, is called a bijection. +A function has a stricter rule: every input must have exactly one output. Here each student must choose exactly one club. Several students may choose the same club without breaking this rule. “One-to-one” adds a separate requirement: different students must choose different clubs. “Onto” means every club is chosen by someone. ## Formal -For sets $A$ and $B$, a relation $R$ from $A$ to $B$ is any subset of the Cartesian product $A \times B$, the set of all ordered pairs $(a,b)$ with $a \in A$ and $b \in B$. Drawing an arrow from $a$ to $b$ exactly when $(a,b) \in R$ turns any relation into a picture like the one above. +The Cartesian product $A\times B$ is the set of all ordered pairs with a first member from A and a second from B. A relation $R\subseteq A\times B$ selects some of those pairs. The diagram has three inputs and three possible outputs, so there are nine possible pairs. -$R$ is a function from $A$ to $B$ when every $a \in A$ appears in exactly one pair of $R$ — every kid gets exactly one arrow. A function is injective, or one-to-one, when no two different elements of $A$ share the same image in $B$; it is surjective, or onto, when every element of $B$ is the image of some element of $A$. A function that is both injective and surjective is a bijection, pairing up $A$ and $B$ perfectly. +A relation is a function from A to B when every input in A appears in exactly one pair. A is its domain and B its codomain; the outputs actually reached form its range. A function is injective (one-to-one) when distinct inputs have distinct outputs, and surjective (onto) when its range equals B. A function with both properties is bijective. ## Advanced -When $A$ and $B$ are both finite with the same number of elements, as here with three kids and three clubs, a function from $A$ to $B$ is injective exactly when it is surjective — there is no way to hit every club without using every kid exactly once, and no way to use every kid without covering every club. That shortcut fails the moment the two sets have different sizes: a function from four kids into three clubs can never be injective, since some club must be shared, by the pigeonhole principle. +For finite sets of the same size, a function is injective exactly when it is surjective. Here three different outputs from three inputs must use all three clubs. Conversely, reaching all three clubs with only three arrows leaves no room for a shared output. Different-sized or infinite sets require more care; do not apply this shortcut to them automatically. ## Derivation -1. A relation $R \subseteq A \times B$ pairs each element of $A$ with zero, one, or several elements of $B$, however the arrows happen to be drawn. -2. $R$ counts as a function precisely when every element of $A$ has one and only one arrow leaving it, never zero and never two or more. -3. That function is one-to-one exactly when, in addition, no two different elements of $A$ ever point to the same element of $B$. +1. Start with any selection of the nine possible student–club pairs. This is a relation, regardless of the number of arrows per student. +2. Check every input. Exactly one outgoing arrow from each is necessary and sufficient for a function. +3. Once it is a function, check incoming arrows. At most one per output makes it one-to-one; at least one per output makes it onto. ## Real world -### Assigning seats, lockers or ID numbers -Handing out one locker per student, or one seat per passenger, only works cleanly if the assignment is a function, every student gets exactly one locker, and one-to-one, no two students share a locker. +### Assigning lockers -### Looking up a word in a dictionary -A dictionary is a function from words to definitions: every word you look up has exactly one entry to jump to, even though several different words can share the same definition. +Giving every student one locker defines a function. If lockers cannot be shared, the function must also be one-to-one. Unused lockers are allowed unless the assignment must be onto. -### Database keys -A database table's primary key is built to be an injective function from rows to key values, so that key alone can always find its way back to exactly one row, never two. +### Recording several interests -### Computer programs as functions -Every pure function in a computer program takes an input and produces exactly one output, the same idea as this lesson's arrows, and testing whether two different inputs could ever produce clashing outputs is exactly a question about injectivity. +A student may list several interests, or none. Student–interest pairs form a relation, but generally not a function with individual interests as outputs. A function could instead assign each student one whole list of interests; that uses a different output set. From d144635e9a4a36fad41b1c1a0cd46527dd58762d Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:44:21 +0300 Subject: [PATCH 023/124] content: rewrite sequences-and-recurrences for first-time learners in both languages --- .../discrete/sequences-and-recurrences/ar.md | 55 ++++++++---------- .../discrete/sequences-and-recurrences/en.md | 57 ++++++++----------- 2 files changed, 50 insertions(+), 62 deletions(-) diff --git a/content/lessons/discrete/sequences-and-recurrences/ar.md b/content/lessons/discrete/sequences-and-recurrences/ar.md index c5a1bfba..babfd0a2 100644 --- a/content/lessons/discrete/sequences-and-recurrences/ar.md +++ b/content/lessons/discrete/sequences-and-recurrences/ar.md @@ -1,64 +1,59 @@ --- title: 'المتتاليات والعلاقات التكرارية' -summary: >- - كل عدد في فيبوناتشي مجموع العددين قبله. صيغة واحدة تقفز بك إلى الحد الخمسين مباشرة. +summary: 'كوّن أعداد فيبوناتشي بجمع الحدين السابقين، ثم قارنها بصيغة تقرّب قيمة أي حد تختاره.' parameters: - x: n — أي حد من المتتالية + x: 'n — فهرس الحد، وهو عدد صحيح غير سالب' variables: - - F_n — الحد رقم n من فيبوناتشي - - '$\varphi$ — النسبة الذهبية، تساوي تقريبًا 1.618' + - 'F_n: قيمة حد فيبوناتشي ذي الفهرس n' + - 'φ: النسبة الذهبية، وتساوي نحو 1.618' --- ## Try it -1. حرّك x خطوة خطوة من 0 وراقب المنحنى يرسم 0، 1، 1، 2، 3، 5، 8، 13… بالضبط عند كل عدد صحيح. -2. اقفز بـx مباشرة إلى 8 واقرأ قيمة المنحنى، 21، وهو عدد قصة زوج الأرانب نفسه أدناه. -3. ادفع x إلى 20 وشاهد كم نما المنحنى بسرعة عند الطرف البعيد من مداه. +1. اضبط x على 0 ثم 1 ثم 2. يعطي المنحنى نحو 0.447 و0.724 و1.171. بتقريبها لأقرب عدد صحيح تحصل على قيم فيبوناتشي 0 و1 و1؛ فالمنحنى نفسه تقريب. +2. اضبط x = 8. يعطي المنحنى نحو 21.010، وهي قريبة من القيمة الدقيقة 21. +3. اضبط x = 20. يصبح التقدير قريبًا جدًا من 6765. قارن هذا النمو بالحدود الأولى التي حسبتها بالجمع. ## Real-life examples -1. **أزواج الأرانب بعد 8 أشهر.** في لغز التكاثر الكلاسيكي غير الواقعي، ينتج زوج الأرانب F8 يساوي 21 زوجًا بعد 8 أشهر، كل جيل مبني من الجيلين قبله. -2. **عدد الحلزونات في رأس عباد الشمس.** كثيرًا ما تُظهر رؤوس عباد الشمس الكبيرة 144 حلزونًا، وهو F12 في المتتالية، مرتبة بزوايا متعلقة بالنسبة الذهبية. -3. **سرعة نمو المتتالية عند الحد 20.** عند الحد العشرين تكون المتتالية قد بلغت 6765 بالفعل، مبيّنة كيف يمكن لقاعدة بهذه البساطة، اجمع آخر حدين، أن تتضخم بسرعة. +1. **صعود سبع درجات.** إذا صعدت درجة أو درجتين في كل حركة، فهناك 21 ترتيبًا ممكنًا للحركات. هذا العدد هو F8؛ ففهرس عدّ طرق الصعود يزيد واحدًا على عدد الدرجات. +2. **صعود إحدى عشرة درجة.** بالقاعدة نفسها، يوجد F12 = 144 ترتيبًا للحركات. نعدّ ترتيب الحركات، لا عدد الحركات من كل نوع فقط. +3. **صعود تسع عشرة درجة.** عدد الترتيبات هو F20 = 6765. يقرّب الرسم هذا العدد دون سرد جميع الترتيبات. ## Test yourself -1. جد الحد الذي يبلغ عنده المنحنى 21، وهو الحد الثامن من فيبوناتشي نفسه في قصة الأرانب أعلاه. -2. جد الحد الذي يبلغ عنده المنحنى 144، وهو عدد الحلزونات نفسه في رأس عباد الشمس الكبير. -3. جد حدًا يكون فيه المنحنى قد تجاوز 1000 بالفعل. +1. أوجد قيمة صحيحة لـx يكون عندها ارتفاع المنحنى نحو 21. +2. أوجد قيمة صحيحة لـx يكون عندها ارتفاع المنحنى نحو 144. +3. أوجد قيمة صحيحة لـx يتجاوز عندها ارتفاع المنحنى 1000. ## Intuition -يتكاثر زوج أرانب بحيث يصل عدد الأزواج بعد 8 أشهر إلى 21 زوجًا، وكل عدد جديد يُبنى من الشهرين قبله بالقاعدة نفسها في كل خطوة تالية. حرّك المنزلق x خطوة خطوة من 0 وراقب المنحنى يقفز صاعدًا أسرع فأسرع، فيصل إلى 21 عند x يساوي 8، ثم 34 عند x يساوي 9، ثم 55 عند x يساوي 10، متتبّعًا المتتالية المألوفة 0، 1، 1، 2، 3، 5، 8، 13… بالضبط. +المتتالية قائمة مرتبة من القيم. ابدأ بـ0 و1، ثم اجمع آخر حدين في كل مرة: 0، 1، 1، 2، 3، 5، 8. بعد 3 و5 يأتي 8، وبعد 5 و8 يأتي 13. نسمي القاعدة التي تحسب حدودًا جديدة من حدود سابقة علاقة تكرارية. -لهذه القاعدة خطوة بخطوة اختصار. منحنى ناعم واحد، مبني من قوى النسبة الذهبية $\varphi$، تساوي تقريبًا 1.618، يقع تقريبًا عند كل عدد صحيح من الأعداد نفسها دون أن يجمع حدين سابقين أبدًا. حساب الحد رقم 50 بهذه الطريقة يحتاج عملية واحدة، بينما تحتاج القاعدة خطوة بخطوة حساب كل حد من 1 حتى 49 أولًا. +يستخدم المنحنى طريقة أخرى: يرفع عددًا يسمى النسبة الذهبية إلى قوة، ثم يقسم على الجذر التربيعي للعدد 5. تعطي هذه الطريقة تقديرًا للحد من فهرسه مباشرة. المنحنى متصل، لكن متتالية فيبوناتشي لها قيم عند الفهارس الصحيحة غير السالبة فقط. وحتى عند هذه الفهارس، ليست القيمة المرسومة مساوية تمامًا لحد المتتالية. ## Formal -المتتالية المعرّفة بعلاقة تكرارية تعطي كل حد من الحدود السابقة، وهنا $F_n = F_{n-1} + F_{n-2}$ بقيمتي بداية $F_0 = 0$ و$F_1 = 1$. أما الصيغة المغلقة فتعطي $F_n$ مباشرة كدالة في n وحدها، دون الرجوع إلى حدود سابقة. +علاقة فيبوناتشي التكرارية هي $F_n = F_{n-1} + F_{n-2}$ للأعداد الصحيحة n التي لا تقل عن 2، مع $F_0 = 0$ و$F_1 = 1$. نحتاج إلى قيمتي البداية؛ فقاعدة الجمع وحدها لا تحدد متتالية واحدة. -صيغة بينيه هي هذه الصيغة المغلقة لفيبوناتشي، وجزؤها المهيمن هو $F_n \approx \varphi^n/\sqrt5$، مقرّبًا إلى أقرب عدد صحيح. أما الحد الثاني المتقلص في الصيغة الدقيقة فيصبح صغيرًا جدًا ليهم بمجرد أن يتجاوز n بضع خطوات. +لتكن $\varphi = (1+\sqrt5)/2$ و$\psi = (1-\sqrt5)/2$. الصيغة المباشرة الدقيقة هي $F_n=(\varphi^n-\psi^n)/\sqrt5$. يهمل الرسم الحد الثاني ويعرض $\varphi^n/\sqrt5$. لكل n صحيح غير سالب، يعطي تقريب هذا التقدير إلى أقرب عدد صحيح عدد فيبوناتشي الدقيق، إذا كانت العمليات الحسابية دقيقة تمامًا. ## Advanced -نسبة الحدود المتتالية في فيبوناتشي تؤول إلى النسبة الذهبية، $F_{n+1}/F_n \to \varphi$، وهذا ينتج مباشرة من تعويض الصيغة المغلقة في النسبة وترك الحد المتقلص يتلاشى. والثابت نفسه $\varphi = (1+\sqrt5)/2$ يحل المعادلة $\varphi^2 = \varphi + 1$، البصمة الجبرية لفكرة «كل خطوة هي مجموع الخطوتين قبلها» منقولة من متتالية إلى عدد واحد. +يصغر الحد المحذوف لأن القيمة المطلقة لـψ أقل من 1. كذلك تقترب نسبة كل حد فيبوناتشي إلى سابقه غير الصفري من φ، أي نحو 1.618. لكن تقريب الأعداد داخل الحاسوب يحد من دقة حساب القوى الكبيرة. استخدام العلاقة التكرارية بأعداد صحيحة دقيقة يتجنب هذه المشكلة العددية. ## Derivation -1. ابدأ المتتالية بقيمتي البداية، $F_0 = 0$ و$F_1 = 1$، وهما ما تحتاجه أي علاقة تكرارية قبل أن تبدأ العمل. -2. طبّق العلاقة التكرارية نفسها. كل حد لاحق هو مجموع الحدين اللذين قبله مباشرة. -3. مع تزايد n، تستقر نسبة الحدين المتتاليين عند النسبة الذهبية φ، ولهذا تقرّب قوة صرفة من φ المتتالية كلها بدقة عالية. +1. نحدد قيمتي البداية 0 و1. من دونهما، يمكن أن تنتج قاعدة الجمع متتاليات مختلفة كثيرة. +2. نجمع آخر حدين للحصول على الحد الجديد. مثلًا، 8 + 13 يعطي 21. +3. تحتوي الصيغة الدقيقة على قوة متزايدة لـφ وأخرى متناقصة المقدار لـψ. عند الفهارس الكبيرة، يهيمن الجزء المتزايد، وهذا يفسر التقريب المرسوم والنسبة التي تقترب منها الحدود المتتالية. ## Real world -### نماذج نمو السكان -لغز تكاثر الأرانب الكلاسيكي غير الواقعي، الذي أنتج هذه المتتالية أول مرة، يبني حجم كل جيل من الجيلين قبله. +### عدّ طرق صعود الدرج -### الخوارزميات التكرارية والذاكرة -حساب أعداد فيبوناتشي بإعادة اشتقاق كل استدعاء من الصفر بسذاجة بطيء مؤلم، لأن المسائل الفرعية نفسها تُحل مرارًا وتكرارًا. انظر كيف يصلح التخزين المؤقت لهذه النتائج المشكلة في درس تعقيد الخوارزميات. +لتكن S(n) عدد طرق صعود n درجات بحركات من درجة أو درجتين. تبدأ الحركة الأخيرة من الدرجة n − 1 أو n − 2، لذا S(n) = S(n − 1) + S(n − 2). وبالبداية S(0) = S(1) = 1 نحصل على S(n) = F(n + 1). -### الأنماط الحلزونية في الطبيعة -كثيرًا ما تترتب رؤوس بذور عباد الشمس وأكواز الصنوبر في حلزونات أعدادها متتالية من فيبوناتشي، أثر جانبي لزوايا نمو مرتبطة بالنسبة الذهبية. +### تجنب تكرار الحساب -### التوقعات المالية ونماذج النمو -أي كمية تعتمد قيمتها التالية على قيمتين سابقتين، كبعض نماذج السكان أو الموارد المبسّطة، تتبع منطق العلاقة التكرارية والصيغة المغلقة نفسه الموضح هنا. +يستطيع برنامج حساب المتتالية بالاحتفاظ بآخر قيمتين فقط. لا يحتاج إلى إعادة حساب الحدود السابقة كلما أراد إضافة حد جديد. diff --git a/content/lessons/discrete/sequences-and-recurrences/en.md b/content/lessons/discrete/sequences-and-recurrences/en.md index 15bc7c25..5a0d9f8e 100644 --- a/content/lessons/discrete/sequences-and-recurrences/en.md +++ b/content/lessons/discrete/sequences-and-recurrences/en.md @@ -1,66 +1,59 @@ --- title: 'Sequences and recurrences' -summary: >- - Fibonacci numbers are defined by looking backward, each one built from the - two before it, yet a single formula lets you jump straight to term 50 - without computing the 49 before it. +summary: 'Build Fibonacci numbers from the previous two terms, then compare them with a formula that estimates any chosen term.' parameters: - x: n — which term of the sequence + x: 'n — whole-number index of the term' variables: - - F_n — the nth Fibonacci number - - '$\varphi$ — the golden ratio, about 1.618' + - 'F_n: Fibonacci value at index n' + - 'φ: golden ratio, approximately 1.618' --- ## Try it -1. Drag x forward one step at a time from 0 and watch the curve trace 0, 1, 1, 2, 3, 5, 8, 13… exactly at each whole number. -2. Jump x straight to 8 and read the curve's value, 21 — the same count as the rabbit-pair story below. -3. Push x to 20 and see how fast the curve has grown by the far end of its range. +1. Set x = 0, then 1, then 2. The curve gives about 0.447, 0.724 and 1.171. Rounding gives the Fibonacci values 0, 1 and 1; the curve itself is an approximation. +2. Set x = 8. The curve gives about 21.010, close to the exact value 21. +3. Set x = 20. The estimate is very close to 6765. Compare this growth with the early terms you calculated by addition. ## Real-life examples -1. **Rabbit pairs after 8 months.** In the classic (unrealistic) breeding puzzle, a pair of rabbits produces F8 = 21 pairs after 8 months, each generation built from the two before it. -2. **Spiral counts in a sunflower head.** Large sunflower heads often show 144 spirals, F12 in the sequence, arranged at angles related to the golden ratio. -3. **How fast the sequence grows by term 20.** By the 20th term the sequence has already reached 6765, showing how quickly a rule this simple, add the last two terms, can snowball. +1. **Climbing seven steps.** If each move climbs one or two steps, there are 21 possible sequences of moves. This count is F8: the staircase count is shifted by one index from Fibonacci. +2. **Climbing eleven steps.** Under the same rule, there are F12 = 144 sequences of moves. Count sequences, not just the total number of one-step and two-step moves. +3. **Climbing nineteen steps.** The count is F20 = 6765. The graph estimates this count without listing every sequence of moves. ## Test yourself -1. Find the term where the curve reaches 21, the same 8th Fibonacci number as the rabbit-pair example above. -2. Find the term where the curve reaches 144, the same spiral count seen in a large sunflower head. -3. Find a term where the curve has already climbed past 1000. +1. Find the integer x where the curve is approximately 21. +2. Find the integer x where the curve is approximately 144. +3. Find an integer x where the curve exceeds 1000. ## Intuition -A pair of rabbits breeds so that its population after 8 months reaches 21 pairs, each new count built from the two months before it, using the same building rule for every step after. Drag the slider x forward one step at a time and watch the curve leap upward faster and faster, landing on 21 the moment x reaches 8, then on 34 at x = 9, then 55 at x = 10, tracking the familiar sequence 0, 1, 1, 2, 3, 5, 8, 13… exactly. +A sequence is an ordered list of values. Start with 0 and 1, then repeatedly add the last two: 0, 1, 1, 2, 3, 5, 8. For example, after 3 and 5 comes 8, and after 5 and 8 comes 13. A rule that uses earlier terms to find later ones is called a recurrence. -That step-by-step rule has a shortcut: a single smooth curve, built from powers of the golden ratio $\varphi$, about 1.618, lands almost exactly on every one of those same whole numbers without ever adding two previous terms together. Computing term 50 this way takes one calculation, while the step-by-step rule would first need every term from 1 through 49. +The curve uses a different method: it raises the number called the golden ratio to a power and divides by the square root of 5. This estimates a term directly from its index. The curve is smooth, but the Fibonacci sequence consists only of values at whole-number indices. Even there, the plotted estimate is not exactly the sequence value. ## Formal -A sequence defined by a recurrence gives each term from earlier ones, here $F_n = F_{n-1} + F_{n-2}$ with seed values $F_0 = 0$ and $F_1 = 1$. A closed form instead gives $F_n$ directly as a function of n alone, with no reference to earlier terms. +The Fibonacci recurrence is $F_n = F_{n-1} + F_{n-2}$ for integers n at least 2, with $F_0 = 0$ and $F_1 = 1$. The two initial values are necessary: the recurrence alone does not determine a unique sequence. -Binet's formula is that closed form for Fibonacci, and its dominant part is $F_n \approx \varphi^n/\sqrt5$, rounded to the nearest whole number; the second, shrinking term of the exact formula becomes too small to matter once n is more than a few steps in. +Let $\varphi = (1+\sqrt5)/2$ and $\psi = (1-\sqrt5)/2$. The exact closed form is $F_n=(\varphi^n-\psi^n)/\sqrt5$. The diagram omits the second term and plots $\varphi^n/\sqrt5$. For nonnegative integer n, rounding this estimate to the nearest integer gives the exact Fibonacci number in exact arithmetic. ## Advanced -The ratio of consecutive Fibonacci terms converges to the golden ratio, $F_{n+1}/F_n \to \varphi$, which follows directly from substituting the closed form into the ratio and letting the shrinking term vanish. This same constant $\varphi = (1+\sqrt5)/2$ solves $\varphi^2 = \varphi + 1$, the algebraic fingerprint of "each step is the sum of the two before it" carried over from a sequence to a single number. +The omitted term shrinks because the magnitude of ψ is less than 1. Also, the ratio of consecutive nonzero Fibonacci terms approaches φ, about 1.618. Computer rounding eventually limits the accuracy of calculations with large powers; a recurrence using exact integers avoids that numerical issue. ## Derivation -1. Start the sequence with the two seed values, $F_0 = 0$ and $F_1 = 1$, which any recurrence needs before it can run. -2. Apply the recurrence itself: every later term is just the sum of the two immediately before it. -3. As n grows, the ratio between consecutive terms settles down to the golden ratio φ, which is why a pure power of φ approximates the whole sequence so well. +1. Specify the starting values 0 and 1. Without them, the addition rule could produce many different sequences. +2. Add the last two terms to obtain each new term. For instance, 8 + 13 gives 21. +3. The exact formula contains a growing power of φ and a shrinking power of ψ. For large indices, the growing part dominates, explaining both the plotted approximation and the limiting ratio. ## Real world -### Population growth models -The classic (unrealistic) rabbit-breeding puzzle that first produced this sequence models each generation's size from the two before it. +### Counting ways to climb stairs -### Recursive algorithms and memory -Computing Fibonacci numbers by naively re-deriving each call from scratch is painfully slow because the same subproblems get solved over and over — see how caching those results fixes it in the lesson on algorithm complexity. +Let S(n) count ways to climb n steps using moves of size 1 or 2. The last move comes from step n − 1 or n − 2, so S(n) = S(n − 1) + S(n − 2). With S(0) = S(1) = 1, this gives S(n) = F(n + 1). -### Spiral patterns in nature -Sunflower seed heads and pinecones often arrange in spirals whose counts are consecutive Fibonacci numbers, a side effect of growth angles related to the golden ratio. +### Avoiding repeated calculations -### Financial and growth projections -Any quantity whose next value depends on a couple of previous values, like some simplified population or resource models, follows the same recurrence-to-closed-form logic shown here. +A program can compute the sequence by keeping the latest two values. It does not need to recompute the earlier terms each time it adds a new one. From a93bcbf86a159f6414f28650ea45812d991321c2 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:44:21 +0300 Subject: [PATCH 024/124] content: rewrite sets-and-venn-diagrams for first-time learners in both languages --- .../discrete/sets-and-venn-diagrams/ar.md | 63 +++++++++--------- .../discrete/sets-and-venn-diagrams/en.md | 65 +++++++++---------- 2 files changed, 58 insertions(+), 70 deletions(-) diff --git a/content/lessons/discrete/sets-and-venn-diagrams/ar.md b/content/lessons/discrete/sets-and-venn-diagrams/ar.md index b9ec9ada..2c8a3480 100644 --- a/content/lessons/discrete/sets-and-venn-diagrams/ar.md +++ b/content/lessons/discrete/sets-and-venn-diagrams/ar.md @@ -1,68 +1,63 @@ --- title: 'المجموعات ومخططات فن' -summary: >- - حين تجمع مجموعتين متداخلتين تعدّ المشترك مرتين. اطرحه مرة. +summary: 'تعلّم كيف تجمع عناصر مجموعتين، مع عدّ كل عنصر مشترك مرة واحدة.' parameters: - N: N — أكبر رقم في الكون - p: p — A هي كل مضاعفات p - q: q — B هي كل مضاعفات q - op: op — العملية المضاءة حاليًا + N: 'N — نعرض الأعداد الصحيحة من 1 إلى N' + p: 'p — نضع مضاعفات هذا العدد في A' + q: 'q — نضع مضاعفات هذا العدد في B' + op: 'op — الاتحاد (0)، التقاطع (1)، الفرق (2)، متممة A (3)' variables: - - 'المجموعة A: الدائرة اليسرى، كل مضاعفات p حتى N' - - 'المجموعة B: الدائرة اليمنى، كل مضاعفات q حتى N' - - 'الكون U: كل رقم من 1 إلى N، وهو المستطيل الكبير' + - 'A: مضاعفات p من 1 إلى N' + - 'B: مضاعفات q من 1 إلى N' + - 'U: جميع الأعداد الصحيحة من 1 إلى N' --- ## Try it -1. اجعل N يساوي 20 وp يساوي 2 وq يساوي 3، واضغط «الاتحاد»، فتضيء كل تذكرة تقبل القسمة على 2 أو 3. -2. اضغط «التقاطع» بدلًا منه وراقب التذاكر المضيئة تتقلص إلى ما يقبل القسمة على 2 و3 معًا فقط. -3. اضغط «الفرق» ثم «المتمم» وقارن أي التذاكر تبقى مضيئة في كل مرة. +1. اضبط N = 20 وp = 2 وq = 3، واختر الاتحاد (op = 0). يحتوي الناتج على 13 عددًا. +2. اختر التقاطع (op = 1). تبقى الأعداد 6 و12 و18 محددة، لأن كلًا منها ينتمي إلى المجموعتين. +3. اختر الفرق (op = 2)، ثم المتممة (op = 3). الفرق يحدد عناصر A التي ليست في B، أما المتممة فتحدد كل ما في المجموعة الشاملة خارج A. ## Real-life examples -1. **تذاكر يانصيب تقبل القسمة على 2 أو 3.** من بين 20 تذكرة يانصيب، بجعل p يساوي 2 وq يساوي 3، يضيء الاتحاد كل رقم تذكرة يقبل القسمة على 2 أو على 3 أو الاثنين معًا. هذه هي التذاكر المؤهلة لجائزة «الرقم المحظوظ». -2. **تذاكر تقبل القسمة على 4 و6 معًا.** من بين 30 تذكرة، بجعل p يساوي 4 وq يساوي 6، يضيء التقاطع فقط الأرقام التي تقبل القسمة على الاثنين معًا، أي مضاعفات 12. هذه فئة جائزة أصغر وأندر. -3. **تذاكر تقبل القسمة على 5 وليس 7.** من بين 40 تذكرة، بجعل p يساوي 5 وq يساوي 7، يضيء الفرق الأرقام التي تقبل القسمة على 5 ولا تقبل القسمة على 7. هذه تذاكر مؤهلة لجائزة لكنها مستبعدة من سحب إضافي. +1. **بطاقات تخضع لشرطين.** بين الأعداد من 1 إلى 20، يوجد 10 مضاعفات للعدد 2 و6 مضاعفات للعدد 3. ثلاثة أعداد تحقق الشرطين، لذا عدد البطاقات التي تحقق أحدهما على الأقل هو 10 + 6 − 3 = 13. +2. **بطاقات تحقق الشرطين معًا.** عند N = 30 وp = 4 وq = 6، يحتوي التقاطع على 12 و24. كلاهما يقبل القسمة على 4 وعلى 6. +3. **شرط مع استثناء.** عند N = 40 وp = 5 وq = 7، تضم A ثمانية أعداد. نستبعد 35 لأنه ينتمي أيضًا إلى B، فيبقى سبعة أعداد في الفرق بين A وB. ## Test yourself -1. جد N وp وq بحيث يحتوي الاتحاد A∪B على 15 رقمًا بالضبط. -2. جد N وp وq بحيث يحتوي التداخل A∩B على أكثر من 5 أرقام، وهو المقدار الذي تعده مرتين لو جمعت |A| و|B| مباشرة. -3. جد N وp وq صغيرة ومتنافرة بحيث لا تتداخل A وB إطلاقًا. +1. اختر N وp وq بحيث يحتوي الاتحاد على 15 عددًا بالضبط. +2. اختر N وp وq بحيث يحتوي التقاطع على أكثر من 5 أعداد. +3. اختر N وp وq بحيث يكون التقاطع خاليًا من العناصر. ## Intuition -تخيّل 20 تذكرة يانصيب مرقّمة من 1 إلى 20، حيث تضم المجموعة A كل تذكرة تقبل القسمة على 2 وتضم المجموعة B كل تذكرة تقبل القسمة على 3. اضغط زر الاتحاد فتضيء كل تذكرة مضاعف لـ2 أو لـ3 أو للاثنين معًا. اضغط التقاطع بدلًا منه فلا يضيء إلا ما يقبل القسمة على الاثنين معًا، في العدسة حيث تتداخل الدائرتان. +المجموعة هي تجمّع من عناصر نستطيع تحديدها. في هذا الرسم، يحتوي المستطيل على الأعداد الصحيحة من 1 إلى N. تضم الدائرة اليسرى مضاعفات p، وتضم اليمنى مضاعفات q. إذا انتمى عدد إلى المجموعتين، نضعه مرة واحدة في منطقة التداخل. -اجعل N يساوي 20 وp يساوي 2 وq يساوي 3 في المنزلقات. تحتوي A على 10 تذاكر، وB على 6، والتذاكر التي تقبل القسمة على الاثنين، أي التداخل A∩B، تحتوي على 3. جمع 10 و6 يعطي 16، لكن الصورة تضيء 13 تذكرة فقط للاتحاد، لأن التذاكر الثلاث التي تقبل القسمة على الاثنين كانت على وشك أن تُعدّ مرتين، مرة في كل دائرة. +عند N = 20 وp = 2 وq = 3، تحتوي القائمتان على 10 عناصر و6 عناصر. لكن جمع العددين يحسب 6 و12 و18 مرتين. نطرح هذه الزيادة، فنحصل على 13 عنصرًا مختلفًا. نسمي المجموعة التي تضم هذه العناصر الاتحاد، ونسمي مجموعة العناصر الثلاثة المشتركة التقاطع. ## Formal -تضم المجموعة عناصر بلا تكرار وبلا ترتيب. $x \in A$ تعني أن x عنصر من A. لمجموعتين منتهيتين، $|A \cup B| = |A| + |B| - |A \cap B|$. اجمع الحجمين، ثم اطرح التداخل الذي عددته مرتين. +يعني $x \in A$ أن x عنصر في A. يضم الاتحاد $A \cup B$ عناصر أي من المجموعتين، بما فيها العناصر المشتركة. أما التقاطع $A \cap B$ فيضم العناصر المشتركة فقط. إذا رمزنا لعدد عناصر مجموعة منتهية بالرمز $|A|$، فإن $|A \cup B| = |A| + |B| - |A \cap B|$. -تنتج عن هذا حالتان خاصتان. إن كان $A \cap B$ خاليًا فالمجموعتان منفصلتان، ويصبح $|A \cup B| = |A| + |B|$. وإن كانت $B \subseteq A$ فإن $A \cup B = A$ و$A \cap B = B$، والصيغة تصح في الحالتين معًا. +يضم الفرق $A \setminus B$ عناصر A التي لا تنتمي إلى B. وتضم المتممة $A^c = U \setminus A$ عناصر المجموعة الشاملة U التي لا تنتمي إلى A. لذلك يتوقف تحديد المتممة على المجموعة الشاملة التي اخترناها. ## Advanced -تمتد الفكرة نفسها إلى ثلاث مجموعات بقاعدة الشمول والاستبعاد. $|A \cup B \cup C| = |A|+|B|+|C| - |A\cap B| - |A\cap C| - |B\cap C| + |A\cap B\cap C|$. نعيد هنا جمع التداخل الثلاثي الذي طرحناه ثلاث مرات، ويمتد هذا النمط إلى أي عدد من المجموعات، وهو أساس حجج العدّ في التوافيق والاحتمال. +إذا انتمى كل عنصر في B إلى A، نقول إن B مجموعة جزئية من A. يكون الاتحاد حينها هو A، والتقاطع هو B. وإذا لم توجد عناصر مشتركة، فالمجموعتان متباينتان، ونجمع عددي عناصرهما دون طرح شيء. لا يتغير شكل الدائرتين في الرسم؛ اعتمد على الأعداد داخلهما لمعرفة العلاقة بين المجموعتين. ## Derivation -1. قسّم الاتحاد إلى المناطق الثلاث التي يظهرها مخطط فن، وهي ما في A فقط، وما في B فقط، والتداخل بينهما. -2. حين تجمع $|A|$ و$|B|$ منفصلين، يُعدّ كل عنصر في التداخل مرتين. -3. اطرح التداخل مرة واحدة فيزول هذا التكرار بالضبط، ويبقى كل عنصر معدودًا مرة واحدة. +1. نقسم الاتحاد إلى عناصر في A وحدها، وعناصر في B وحدها، وعناصر مشتركة بينهما. +2. عند جمع عددي عناصر A وB، نعدّ كل عنصر مشترك مرتين، ونعدّ بقية العناصر مرة واحدة. +3. نطرح عدد عناصر التقاطع، فيصبح كل عنصر في الاتحاد محسوبًا مرة واحدة. ## Real world -### استعلامات قواعد البيانات -عمليات SQL مثل UNION وINTERSECT وEXCEPT تجمع نتائج الاستعلامات تمامًا كعمليات المجموعات هنا، ويجب أن تتجنب قواعد البيانات عدّ الصفوف التي تحقق شرطين مرتين. +### إجابات الاستبيانات -### فلاتر البحث والوسوم -فلترة الصور الموسومة بـ«شاطئ» أو «غروب» اتحاد، وفلترتها بـ«شاطئ» و«غروب» معًا تقاطع بين مجموعتي الوسوم. +إذا أحب 12 طالبًا الرسم و9 طلاب الموسيقى، فلا تكفي هاتان المعلومتان لمعرفة عدد من يحبون واحدة منهما على الأقل. نحتاج أيضًا إلى عدد من يحبون الاثنين. -### قواعد الحماية والبريد المزعج -تُحجب الرسالة إذا طابقت أي قاعدة في قائمة الحظر، وهذا اتحاد قواعد التنبيه، لكنها تمر إن طابقت أيضًا قائمة استثناء، وهذا فرق. +### تصنيف الصور -### الاستطلاعات والاحتمال -سؤال كم شخصًا يحب القهوة أو الشاي يحتاج صيغة الاتحاد، لأن من يحب الاثنين سيُعدّ مرتين لولاها. +الصور التي تحمل وسم الشاطئ أو الغروب تمثل اتحاد مجموعتين. والصور التي تحمل الوسمين معًا تمثل التقاطع. أما صور الشاطئ التي لا تحمل وسم الغروب فتمثل الفرق. diff --git a/content/lessons/discrete/sets-and-venn-diagrams/en.md b/content/lessons/discrete/sets-and-venn-diagrams/en.md index 67bb9ad4..bb7b308d 100644 --- a/content/lessons/discrete/sets-and-venn-diagrams/en.md +++ b/content/lessons/discrete/sets-and-venn-diagrams/en.md @@ -1,70 +1,63 @@ --- title: 'Sets and Venn diagrams' -summary: >- - Counting two overlapping sets means subtracting what you double-counted, - the same fix behind counting search results, guest lists, or survey - answers that satisfy either of two conditions. +summary: 'Learn how to combine two collections without counting their shared elements twice.' parameters: - N: N — largest number in the universe - p: p — A is every multiple of p - q: q — B is every multiple of q - op: op — which operation is highlighted + N: 'N — include the integers from 1 to N' + p: 'p — A contains multiples of this number' + q: 'q — B contains multiples of this number' + op: 'op — union (0), intersection (1), difference (2), complement of A (3)' variables: - - 'set A: the left circle, every multiple of p up to N' - - 'set B: the right circle, every multiple of q up to N' - - 'the universe U: every number from 1 to N, the big rectangle' + - 'A: multiples of p from 1 to N' + - 'B: multiples of q from 1 to N' + - 'U: all integers from 1 to N' --- ## Try it -1. Set N to 20, p to 2 and q to 3, and tap "union" — every ticket divisible by 2 or 3 lights up. -2. Tap "intersection" instead and watch the lit tickets shrink to just the ones divisible by both 2 and 3. -3. Tap "difference" and then "complement" and compare which tickets stay lit each time. +1. Set N = 20, p = 2, q = 3 and choose union (op = 0). The result contains 13 numbers. +2. Choose intersection (op = 1). Only 6, 12 and 18 remain selected: each belongs to both sets. +3. Choose difference (op = 2), then complement (op = 3). Difference selects members of A outside B; complement selects everything in the universe outside A. ## Real-life examples -1. **Raffle tickets divisible by 2 or 3.** Out of 20 raffle tickets, the union with p = 2 and q = 3 lights up every ticket number divisible by 2 or by 3 (or both), the tickets eligible for a "lucky number" prize. -2. **Tickets divisible by both 4 and 6.** Out of 30 tickets, the intersection with p = 4 and q = 6 lights up only the numbers divisible by both, the multiples of 12, a smaller and rarer prize category. -3. **Tickets divisible by 5 but not 7.** Out of 40 tickets, the difference with p = 5 and q = 7 lights up numbers divisible by 5 that are not also divisible by 7, tickets that qualify for one prize but are excluded from a bonus draw. +1. **Two rules for numbered cards.** Among cards 1–20, ten numbers are multiples of 2 and six are multiples of 3. Three satisfy both rules, so 10 + 6 − 3 = 13 satisfy at least one. +2. **Cards satisfying both rules.** With N = 30, p = 4 and q = 6, the intersection contains 12 and 24. Each is divisible by both 4 and 6. +3. **One rule with an exclusion.** With N = 40, p = 5 and q = 7, A has eight numbers. Remove 35 because it also belongs to B: seven remain in A minus B. ## Test yourself -1. Find N, p and q so that the union A∪B contains exactly 15 numbers. -2. Find N, p and q so that the overlap A∩B has more than 5 numbers, the amount you'd double-count by just adding |A| and |B|. -3. Find N, p and q so small and mismatched that A and B never overlap at all. +1. Choose N, p and q so that the union contains exactly 15 numbers. +2. Choose N, p and q so that the intersection contains more than 5 numbers. +3. Choose N, p and q so that the intersection is empty. ## Intuition -Imagine 20 raffle tickets numbered 1 to 20, where set A is every ticket divisible by 2 and set B is every ticket divisible by 3. Tap the union button and every ticket that is a multiple of 2 or of 3 (or both) lights up. Tap intersection instead and only the tickets divisible by both light up, sitting in the lens where the two circles overlap. +A set is a collection whose members we can identify. Here the rectangle contains the integers from 1 to N. The left circle groups multiples of p; the right groups multiples of q. A number in both sets appears in their overlap, once rather than twice. -Set N to 20, p to 2 and q to 3 on the sliders: A has 10 tickets, B has 6, and the tickets divisible by both, the overlap A∩B, has 3. Adding 10 and 6 gives 16, but the picture lights up only 13 tickets for the union, because the 3 tickets divisible by both were about to be counted twice, once in each circle. +For N = 20, p = 2 and q = 3, the two lists have 10 and 6 members. Adding their sizes counts 6, 12 and 18 twice. Subtract those three extra counts to get 13 distinct members. This combined set is the union. The three shared members form the intersection. ## Formal -A set is a collection of elements with no repeats and no order; $x \in A$ means x belongs to A. For finite sets, $|A \cup B| = |A| + |B| - |A \cap B|$: add the two sizes, then subtract the overlap you counted twice. +$x \in A$ means that x belongs to A. The union $A \cup B$ contains members of either set, including members of both. The intersection $A \cap B$ contains only shared members. Writing $|A|$ for the number of members of a finite set, we have $|A \cup B| = |A| + |B| - |A \cap B|$. -Two useful special cases follow directly: if $A \cap B$ is empty the sets are disjoint and $|A \cup B| = |A| + |B|$; if $B \subseteq A$ then $A \cup B = A$ and $A \cap B = B$, so the formula still checks out. +The difference $A \setminus B$ contains members of A that are not in B. The complement $A^c = U \setminus A$ contains members of the chosen universe U that are not in A. A complement therefore depends on which universe we choose. ## Advanced -The same idea extends to three sets by inclusion–exclusion: $|A \cup B \cup C| = |A|+|B|+|C| - |A\cap B| - |A\cap C| - |B\cap C| + |A\cap B\cap C|$, adding back the triple overlap that got subtracted three times. This pattern generalises to any number of sets and underlies counting arguments across combinatorics and probability. +If every member of B belongs to A, B is a subset of A. The union is then A and the intersection is B. If no member is shared, the sets are disjoint and their sizes can be added without subtracting an overlap. The drawn circles keep the same shape; use the numbered members to determine these relationships. ## Derivation -1. Split the union into the three regions a Venn diagram shows: only A, only B, and the overlap. -2. Adding $|A|$ and $|B|$ separately means every element of the overlap gets counted in both sums. -3. Subtracting the overlap once removes exactly that duplicate, leaving each element counted a single time. +1. Separate the union into members only in A, members only in B, and members in both. +2. Adding the sizes of A and B counts each shared member twice, but every other member once. +3. Subtract the size of the intersection. Each member of the union is now counted once. ## Real world -### Database queries -SQL's UNION, INTERSECT and EXCEPT operators combine query results exactly like the set operations here, and databases must avoid double-counting rows that satisfy two conditions at once. +### Survey answers -### Search filters and tags -Filtering photos tagged "beach" or "sunset" is a union; filtering by "beach" and "sunset" together is an intersection of the two tag sets. +If 12 students like drawing and 9 like music, we need to know how many like both before finding how many like at least one. -### Spam and security rules -A message is blocked if it matches any rule in a blocklist (a union of trigger sets) but allowed through if it also matches an exemption list (a difference). +### Photo tags -### Surveys and probability -Asking how many people like coffee or tea needs the union formula, since some people who like both would otherwise be counted twice. +Photos tagged beach or sunset form a union. Photos with both tags form an intersection. Beach photos without the sunset tag form a difference. From 206bed1bad73943bea28ac3c98fe380f6bfc0d03 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:44:21 +0300 Subject: [PATCH 025/124] content: rewrite trees-and-spanning-trees for first-time learners in both languages --- .../discrete/trees-and-spanning-trees/ar.md | 57 ++++++++---------- .../discrete/trees-and-spanning-trees/en.md | 59 ++++++++----------- 2 files changed, 52 insertions(+), 64 deletions(-) diff --git a/content/lessons/discrete/trees-and-spanning-trees/ar.md b/content/lessons/discrete/trees-and-spanning-trees/ar.md index 8e1d045f..c2f53f20 100644 --- a/content/lessons/discrete/trees-and-spanning-trees/ar.md +++ b/content/lessons/discrete/trees-and-spanning-trees/ar.md @@ -1,65 +1,60 @@ --- title: 'الأشجار والأشجار الممتدة: الربط بأقل تكلفة' -summary: >- - ثماني مزارع تحتاج أنابيب. أرخص شبكة تصل الجميع بلا حلقة زائدة هي شجرة ممتدة. +summary: 'صل جميع الرؤوس دون تكوين دورات، ثم استخدم تكاليف الحواف لإيجاد شجرة ممتدة بأقل مجموع تكلفة.' parameters: - step: الأنابيب المدروسة — إلى أي مدى في قائمة الأنابيب الممكنة المرتبة وصلت العملية - town: المزرعة — أي مزرعة تريد فحص اتصالاتها (اضغط مزرعة) + step: 'step — نسبة ما فُحص من الحواف المرشحة الأربع عشرة بعد ترتيبها' + town: 'town — المزرعة التي نحدد مجموعتها المتصلة: من A = 0 إلى H = 7' variables: - - الأضلاع، الأنابيب التي تنتهي داخل الشجرة - - الرؤوس، المزارع التي يجري ربطها + - 'E: الحواف المقبولة في الشجرة' + - 'V: الرؤوس التي تمثل المزارع الثماني' --- ## Try it -1. اترك «الأنابيب المدروسة» عند 1، واقرأ مؤشر التكلفة الإجمالية، فهذه هي أرخص طريقة ممكنة لربط المزارع الثماني كلها بالأنابيب. -2. اضغط المزرعة G، ثم حرّك «الأنابيب المدروسة» ببطء من 0، وراقب بالضبط متى تنضم دائرتها إلى المجموعة المظلّلة من المزارع المتصلة بها بالفعل. -3. تابع التحريك بعد منتصف الطريق وراقب أنبوبًا متقطعًا أحمر يظهر، وهو أول رفض من الخوارزمية، لأن كل مزرعة متصلة بالفعل حينها، وذلك الأنبوب لن يضيف سوى حلقة زائدة. +1. اضبط step = 0 ثم ارفعه إلى 0.14. تُفحص حافتان وتُقبلان، فتتصل B بـC وتتصل D بـE. +2. اضبط step = 0.5. تصل سبع حواف مقبولة المزارع الثماني كلها، ويبلغ مجموع أوزانها 25. +3. اضبط step = 0.57. تُرفض الحافة الثامنة لأن طرفيها متصلان مسبقًا. انقر مزارع مختلفة لفحص المجموعة المتصلة بكل منها؛ اختيار المزرعة لا يغيّر عمل الخوارزمية. ## Real-life examples -1. **الشبكة المكتملة.** كل الأنابيب الأربعة عشر الممكنة قيد الاعتبار، والفحص على المزرعة A. التصميم الأرخص إجمالًا مكتمل، وكل مزرعة متصلة بلا أي أنبوب مهدور. -2. **عند الاكتمال بالضبط.** أوقف عند منتصف الطريق بالضبط، والفحص على المزرعة G. كل مزرعة، وG أيضًا، متصلة بالفعل، مع أن سبعة من الأنابيب الأربعة عشر الممكنة لم تُبحث إطلاقًا بعد. -3. **الأرخصان فقط.** أوقف مبكرًا جدًا، والفحص على المزرعة B. مُدّ الأنبوبان الأرخصان فقط، وB متصلة بمزرعة واحدة أخرى حتى الآن. +1. **الشبكة المكتملة.** عند step = 1 وtown = 0، تكون الأنابيب المرشحة الأربعة عشر قد فُحصت. قُبلت سبعة ورُفضت سبعة، ومجموع الأوزان 25. +2. **اكتمال الاتصال قبل نهاية القائمة.** عند step = 0.5 وtown = 6، تكون المزارع الثماني متصلة. لا يمكن للأنابيب المرشحة الباقية وصل مجموعتين منفصلتين بعد ذلك. +3. **وصلتان في البداية.** عند step = 0.14 وtown = 1، تكون الحافتان المقبولتان B–C وD–E. لا تضم المجموعة المتصلة بـB إلا B وC. ## Test yourself -1. أوقف العملية عند النقطة الدقيقة التي تتصل فيها المزارع الثماني كلها للمرة الأولى بشكل كامل. -2. تابع قليلًا، إلى نحو أربعة أسباع الطريق، وجد أول أنبوب يُرفض لأنه يُغلق حلقة. -3. اضغط المزرعة G وراقب المنزلق لترى أي أنبوب يربطها أخيرًا بالبقية. +1. اضبط step = 0.5 لفحص الشجرة المكتملة بعد النظر في سبع حواف مرشحة. +2. اضبط step قرب 8/14، أي نحو 0.57، لرؤية أول حافة مرفوضة. +3. اختر المزرعة G، أي town = 6، وافحص مجموعتها المتصلة في مراحل مختلفة. ## Intuition -ثماني مزارع، من A إلى H، يمكن ربطها بأي من أربعة عشر أنبوبًا ممكنًا تحت الأرض، لكل منها تكلفة حفر ومد خاصة به، وهو الرقم المكتوب على الخط. رتّب هذه الأنابيب الأربعة عشر من الأرخص إلى الأغلى، ومُدّها واحدًا تلو الآخر بهذا الترتيب، لكن تجاوَز أي أنبوب لن يفعل سوى إعادة وصل مزرعتين متصلتين بالفعل عبر طريق آخر، فمدّه سيهدر المال على حلقة زائدة. تحدد «الأنابيب المدروسة» إلى أي مدى في تلك القائمة المرتبة نظرت. +تمثل المزارع الثماني رؤوسًا، وكل أنبوب مرشح حافة ذات تكلفة. نبدأ دون أنابيب، فتكون لدينا ثماني مجموعات منفصلة. إضافة أنبوب بين مجموعتين تدمجهما. أما إضافته داخل مجموعة متصلة فتكوّن دورة، أي طريقًا بديلًا بين طرفيه. -اضغط أي مزرعة لترى، بتظليل خفيف، بالضبط أي مزارع أخرى يمكن الوصول إليها منها عبر الأنابيب المُمدّة حتى الآن. شغّل العملية حتى النهاية، وينجو بالضبط سبعة أنابيب، أقل بواحد من عدد المزارع، تصل كل مزرعة بأقل تكلفة إجمالية ممكنة. أنابيب أقل من ذلك، وتبقى مزرعة معزولة. أنابيب أكثر، ويكون واحد منها على الأقل مالًا مهدورًا في حلقة لا تضيف أي اتصال جديد. +يفحص الرسم الأنابيب من الأقل تكلفة إلى الأعلى، ولا يقبل أنبوبًا إلا إذا وصل مجموعتين منفصلتين. تسمى هذه الطريقة خوارزمية كروسكال. تقلل سبعة أنابيب مقبولة عدد المجموعات من ثمانٍ إلى واحدة. تصل النتيجة كل المزارع دون دورة، فتكون شجرة ممتدة. وفي هذا المثال، مجموع تكلفتها هو الأصغر بين جميع الأشجار الممتدة التي تستخدم الحواف المرشحة. ## Formal -الشجرة مخطط متصل بلا دورات. الشجرة الممتدة لمخطط متصل تصل كل رأس مستخدمة بعض أضلاعه فقط، مختارة بحيث لا تظهر أي دورة. إزالة أي ضلع واحد من الشجرة يفصلها، وإضافة أي ضلع إليها يخلق دورة واحدة بالضبط. مقابل $|V|$ رأسًا، لكل شجرة ممتدة بالضبط $|E| = |V| - 1$ ضلعًا، لا أكثر ولا أقل أبدًا. +الشجرة رسم بياني غير موجّه ومتصل لا يحتوي على دورات. تضم الشجرة الممتدة كل رؤوس الرسم الأصلي وبعض حوافه. إذا كان عدد الرؤوس $|V|$، فإن عدد حوافها $|E|=|V|-1$. حذف أي حافة منها يفصلها، وإضافة حافة بين رأسين منها تكوّن دورة. -حين يحمل كل ضلع تكلفة، أو وزنًا، فإن الشجرة الممتدة الصغرى هي الشجرة الممتدة التي يكون مجموع أضلاعها أصغر مجموع ممكن. تبني خوارزمية كروسكال واحدة مباشرة. رتّب كل الأضلاع حسب الوزن، ثم أضف كل ضلع بدوره ما لم يُغلق دورة مع أضلاع مُختارة بالفعل، وتوقف بعد إضافة $|V|-1$ ضلعًا. +الشجرة الممتدة الصغرى تقلل مجموع أوزان الحواف. في رسم متصل وغير موجّه وذي أوزان، ترتب خوارزمية كروسكال الحواف حسب الوزن وتقبل كل حافة لا تكوّن دورة. يمكنها التوقف بعد قبول $|V|-1$ حافة. يواصل العرض فحص بقية المرشحات لإظهار رفضها. ## Advanced -الشجرة الممتدة الصغرى فريدة كلما لم يتشارك أي ضلعين الوزن نفسه بالضبط. ومع التعادل، يمكن أن توجد أكثر من شجرة ممتدة صغرى واحدة، وإن كانت جميعها تتشارك التكلفة الإجمالية نفسها. طريقة كروسكال واحدة من نهجين كلاسيكيين. تنمّي خوارزمية بريم بدلًا منها شجرة واحدة نحو الخارج، ضلعًا أرخص فأرخص في كل مرة، بدءًا دائمًا من رأس واحد مختار. وكلتا الطريقتين مضمونتان لإيجاد صغرى حقيقية، لا مجرد إجابة جيدة محليًا. +يثبت عدّ المجموعات لماذا نحتاج إلى سبع حواف هنا، لكنه لا يثبت وحده أقل تكلفة. تبرر حجة الاستبدال الاختيار الجشع: يمكن لحافة من الأرخص بين مجموعتين منفصلتين أن تحل محل حافة تعبر الفصل نفسه في شجرة صغرى، دون زيادة التكلفة. اختلاف أوزان جميع الحواف يضمن وجود شجرة صغرى وحيدة؛ أما تساوي بعضها فقد يسمح بأكثر من شجرة صغرى. ## Derivation -1. ابدأ بالمزارع الـ$|V|$ كنقاط معزولة ولا أنابيب على الإطلاق. يُحسب ذلك $|V|$ مجموعة منفصلة. -2. كل أنبوب تقبله الخوارزمية يصل مزرعتين من مجموعتين مختلفتين في واحدة، فكل أنبوب مقبول يقلل عدد المجموعات المنفصلة بمقدار واحد بالضبط. -3. دمج $|V|$ مجموعة منفصلة في مجموعة متصلة واحدة يتطلب لذلك دائمًا بالضبط $|V| - 1$ أنبوبًا مقبولًا، لذا $|E| = |V| - 1$. +1. في البداية يشكل كل رأس مجموعة مستقلة، فيساوي عدد المجموعات عدد الرؤوس. +2. تدمج كل حافة مقبولة مجموعتين بالضبط، فينقص عدد المجموعات واحدًا. +3. للوصول من ثماني مجموعات إلى مجموعة واحدة نحتاج إلى سبع عمليات دمج. وبوجه عام، يقل عدد الحواف المطلوبة واحدًا عن عدد الرؤوس. ## Real world -### كهربة الريف وشبكات المياه -شركات الكهرباء والمياه تربط القرى أو المزارع باستخدام أشجار ممتدة صغرى لإبقاء إجمالي طول الكابل أو الأنبوب، والتكلفة، منخفضًا قدر الإمكان مع الوصول إلى الجميع. +### مقارنة تكاليف الوصلات -### شبكات الحواسيب الأساسية -مهندسو الشبكات يخططون العمود الفقري من الألياف الضوئية بالطريقة نفسها، فيربطون مراكز البيانات أو المكاتب بأقل كابل إجمالي مع الوصول إلى كل موقع. +يقارن نموذج الشجرة الممتدة تكلفة ربط مواقع باستخدام قائمة محددة من الوصلات المرشحة. يفترض أن الهدف هو تقليل مجموع التكلفة؛ وقد تتطلب السعة أو تحمل الأعطال إضافة وصلات في شبكة فعلية. -### منع الحلقات في شبكات المكاتب -مفاتيح الإيثرنت تشغّل بروتوكول الشجرة الممتدة، الذي يعطّل تلقائيًا وصلات الكابل الزائدة التي قد تكوّن حلقات، لأن الشبكة الحلقية تُغرق نفسها بحركة مرور تدور إلى ما لا نهاية. +### تجميع النقاط -### خوارزميات التجميع ورسم الخرائط -بعض طرق التجميع تبني شجرة ممتدة صغرى فوق مجموعة نقاط ثم تقطع أغلى أضلاعها لتقسيم النقاط إلى مجموعات طبيعية، ويستخدم راسمو الخرائط أشجارًا مشابهة لتخطيط خطوط النقل بأقل مسار إجمالي. +يمكن تجميع نقاط بيانات ببناء شجرة ممتدة صغرى تستخدم المسافات أوزانًا، ثم حذف بعض الحواف الطويلة. تصبح الأجزاء المتصلة الباقية مجموعات منفصلة. diff --git a/content/lessons/discrete/trees-and-spanning-trees/en.md b/content/lessons/discrete/trees-and-spanning-trees/en.md index 8b87db03..d0b0ccfe 100644 --- a/content/lessons/discrete/trees-and-spanning-trees/en.md +++ b/content/lessons/discrete/trees-and-spanning-trees/en.md @@ -1,67 +1,60 @@ --- title: 'Trees and spanning trees: connecting for less' -summary: >- - Eight farms need irrigation pipe: find the cheapest set of pipes that - connects every farm with no wasted loops, and you have built a minimum - spanning tree. +summary: 'Connect all vertices without cycles, then use edge costs to find a spanning tree with the smallest total.' parameters: - step: pipes considered — how far through the sorted list of possible pipes the process has gone - town: farm — which farm to check the connections of (tap a farm) + step: 'step — fraction of the 14 sorted candidate edges considered' + town: 'town — farm whose connected group is highlighted: A = 0 through H = 7' variables: - - the edges — the pipes that end up in the tree - - the vertices — the farms being connected + - 'E: edges accepted into the tree' + - 'V: vertices, represented by the eight farms' --- ## Try it -1. Leave "pipes considered" at 1 and read the total-cost readout — that is the cheapest possible way to link all eight farms with pipe. -2. Tap farm G, then drag "pipes considered" up slowly from 0 and watch exactly when its circle joins the shaded group of farms already linked to it. -3. Keep dragging past halfway and watch a dashed red pipe appear — the algorithm's first rejection, because every farm is already connected by then and that pipe would only create a loop. +1. Set step = 0, then increase it to 0.14. Two edges have been considered and accepted, joining B to C and D to E. +2. Set step = 0.5. Seven accepted edges connect all eight farms, with total weight 25. +3. Set step = 0.57. The eighth considered edge is rejected because its endpoints are already connected. Tap different farms to inspect their connected group; the selected farm does not change the algorithm. ## Real-life examples -1. **The finished network.** All fourteen possible pipes considered, checking on farm A: the cheapest total layout is complete, every farm linked with no wasted pipe. -2. **Exactly at completion.** Stop right at the halfway point, checking farm G: every farm, including G, is already linked, even though seven of the fourteen possible pipes were never even considered. -3. **Just the cheapest two.** Stop very early, checking farm B: only the two cheapest pipes have been laid, and B is linked to just one other farm so far. +1. **Completed network.** With step = 1 and town = 0, all 14 candidate pipes have been considered. Seven are accepted, seven rejected, and the total weight is 25. +2. **Connected before the list ends.** With step = 0.5 and town = 6, all eight farms are already connected. The remaining candidates cannot add a new connection between separate groups. +3. **Two early connections.** With step = 0.14 and town = 1, the accepted edges are B–C and D–E. B's connected group contains only B and C. ## Test yourself -1. Stop the process at the exact point where all eight farms first become fully connected. -2. Push a little further, to about four-sevenths of the way through, and find the very first pipe that gets rejected for closing a loop. -3. Tap farm G and watch the slider to see which pipe finally links it to the rest. +1. Set step = 0.5 to inspect the completed tree after seven candidates have been considered. +2. Set step close to 8/14, about 0.57, to see the first rejected edge. +3. Select farm G, corresponding to town = 6, and inspect its connected group at different stages. ## Intuition -Eight farms, A to H, could be linked by any of fourteen possible underground pipes, each with its own cost to dig and lay, shown as the number on the line. Sort those fourteen pipes from cheapest to priciest and lay them down one at a time in that order, but skip any pipe that would only reconnect two farms already linked through some other route — laying it would waste money on a redundant loop. "Pipes considered" controls how far down that sorted list you have looked. +The eight farms are vertices, and each candidate pipe is an edge with a cost. Start with no pipes: there are eight separate groups. Adding a pipe between two groups merges them. Adding a pipe inside an already connected group creates a cycle instead, giving an alternative route between its endpoints. -Tap any farm to see, in a soft highlight, exactly which other farms are already reachable from it through the pipes laid so far. Run the process to the end and exactly seven pipes survive — one fewer than the number of farms — connecting every farm for the lowest total cost possible. Any fewer pipes and some farm is stranded; any more, and at least one pipe is wasted money forming a loop that adds no new connection. +The diagram considers pipes from cheapest to most expensive and accepts a pipe only when it merges separate groups. This is Kruskal's algorithm. Seven accepted pipes reduce eight groups to one. The result connects every farm without a cycle, so it is a spanning tree. Here its total cost is the smallest possible among all spanning trees using the candidate edges. ## Formal -A tree is a connected graph with no cycles. A spanning tree of a connected graph reaches every vertex using only some of its edges, chosen so that no cycle appears; removing any single edge from a tree would disconnect it, and adding any edge to it would create exactly one cycle. For $|V|$ vertices, every spanning tree has exactly $|E| = |V| - 1$ edges, never more and never fewer. +A tree is a connected undirected graph with no cycles. A spanning tree includes every vertex of the original graph and a subset of its edges. For $|V|$ vertices, it has $|E|=|V|-1$ edges. Removing any tree edge disconnects it; adding an edge between two of its vertices creates a cycle. -When each edge carries a cost, or weight, a minimum spanning tree is the spanning tree whose edges sum to the smallest possible total. Kruskal's algorithm builds one directly: sort all edges by weight, then add each edge in turn unless it would close a cycle with edges already chosen, stopping once $|V|-1$ edges have been added. +A minimum spanning tree minimizes the sum of its edge weights. For a connected weighted undirected graph, Kruskal's algorithm sorts edges by weight and accepts each unless it creates a cycle. It can stop after accepting $|V|-1$ edges. The visualization continues through the remaining candidates to show their rejection. ## Advanced -A minimum spanning tree is unique whenever no two edges share exactly the same weight; with ties, more than one minimum spanning tree can exist, though they all share the same total cost. Kruskal's method is one of two classic approaches — Prim's algorithm instead grows a single tree outward one cheapest connecting edge at a time, always starting from one chosen vertex — and both are guaranteed to find a true minimum, not just a locally good answer. +The edge-count argument proves why a tree needs seven edges here; it does not by itself prove minimum cost. The greedy choice is justified by an exchange argument: a cheapest edge joining separate components can replace an edge crossing the same separation in a minimum tree without increasing cost. Distinct weights guarantee a unique minimum spanning tree; ties may allow several. ## Derivation -1. Start with the $|V|$ farms as isolated points and no pipes at all: that counts as $|V|$ separate groups. -2. Every pipe accepted by the algorithm joins two farms from different groups into one, so each accepted pipe reduces the number of separate groups by exactly one. -3. Merging $|V|$ separate groups down to a single connected group therefore always takes exactly $|V| - 1$ accepted pipes, so $|E| = |V| - 1$. +1. Initially every vertex forms a separate group, so there are as many groups as vertices. +2. Each accepted edge merges exactly two groups and reduces the group count by one. +3. Reaching one connected group from eight needs seven merges. In general, the required edge count is one less than the number of vertices. ## Real world -### Rural electrification and water networks -Power and water utilities connect villages or farms using minimum spanning trees to keep total cable or pipe length, and cost, as low as possible while still reaching everyone. +### Comparing connection costs -### Computer network backbones -Network engineers plan fibre-optic backbones the same way, linking data centres or offices with the least total cable while still reaching every site. +A spanning-tree model compares the total cost of connecting sites using a fixed set of candidate links. It assumes total link cost is the objective; capacity and failure tolerance may call for extra connections in an actual network. -### Preventing loops in office networks -Ethernet switches run the Spanning Tree Protocol, which automatically disables extra cable connections that would form loops, because a looping network floods itself with endlessly circulating traffic. +### Grouping points -### Clustering and map-drawing algorithms -Some clustering methods build a minimum spanning tree over a set of points and then cut its most expensive edges to split the points into natural groups, and mapmakers use similar trees to lay out transit lines with minimal total track. +One way to group data points is to build a minimum spanning tree with distances as weights, then remove selected long edges. The remaining connected components form groups. From 2670b97e944683cdd957c8999a3fe2302ff9b110 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 10:44:21 +0300 Subject: [PATCH 026/124] docs: record completed bilingual Discrete review --- content/lessons/EDITORIAL_REVIEW.md | 30 ++++++++++++++--------------- content/lessons/STYLE.en.md | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/content/lessons/EDITORIAL_REVIEW.md b/content/lessons/EDITORIAL_REVIEW.md index 6e1a0633..3749f436 100644 --- a/content/lessons/EDITORIAL_REVIEW.md +++ b/content/lessons/EDITORIAL_REVIEW.md @@ -1,6 +1,6 @@ # Bilingual editorial review -37 of 390 lessons reviewed. 353 remain. +49 of 390 lessons reviewed. 341 remain. A checked lesson has had both language files rewritten or reviewed against its configuration and visualization source. Automated validation alone does not mark a lesson reviewed. Browser interaction and independent learner review remain separate checks. @@ -179,20 +179,20 @@ Scope: every lesson, including summaries, parameter labels, examples, exercises, - [ ] [sampling-big-data](data/sampling-big-data/en.md) · [Arabic](data/sampling-big-data/ar.md) - [ ] [tables-and-filtering](data/tables-and-filtering/en.md) · [Arabic](data/tables-and-filtering/ar.md) -## discrete (0/12) - -- [ ] [graph-colouring](discrete/graph-colouring/en.md) · [Arabic](discrete/graph-colouring/ar.md) -- [ ] [graphs-and-euler-paths](discrete/graphs-and-euler-paths/en.md) · [Arabic](discrete/graphs-and-euler-paths/ar.md) -- [ ] [implication-and-equivalence](discrete/implication-and-equivalence/en.md) · [Arabic](discrete/implication-and-equivalence/ar.md) -- [ ] [modular-patterns-and-clocks](discrete/modular-patterns-and-clocks/en.md) · [Arabic](discrete/modular-patterns-and-clocks/ar.md) -- [ ] [pigeonhole-and-counting](discrete/pigeonhole-and-counting/en.md) · [Arabic](discrete/pigeonhole-and-counting/ar.md) -- [ ] [proof-by-induction](discrete/proof-by-induction/en.md) · [Arabic](discrete/proof-by-induction/ar.md) -- [ ] [propositional-logic](discrete/propositional-logic/en.md) · [Arabic](discrete/propositional-logic/ar.md) -- [ ] [quantifiers](discrete/quantifiers/en.md) · [Arabic](discrete/quantifiers/ar.md) -- [ ] [relations-and-functions](discrete/relations-and-functions/en.md) · [Arabic](discrete/relations-and-functions/ar.md) -- [ ] [sequences-and-recurrences](discrete/sequences-and-recurrences/en.md) · [Arabic](discrete/sequences-and-recurrences/ar.md) -- [ ] [sets-and-venn-diagrams](discrete/sets-and-venn-diagrams/en.md) · [Arabic](discrete/sets-and-venn-diagrams/ar.md) -- [ ] [trees-and-spanning-trees](discrete/trees-and-spanning-trees/en.md) · [Arabic](discrete/trees-and-spanning-trees/ar.md) +## discrete (12/12) + +- [x] [graph-colouring](discrete/graph-colouring/en.md) · [Arabic](discrete/graph-colouring/ar.md) +- [x] [graphs-and-euler-paths](discrete/graphs-and-euler-paths/en.md) · [Arabic](discrete/graphs-and-euler-paths/ar.md) +- [x] [implication-and-equivalence](discrete/implication-and-equivalence/en.md) · [Arabic](discrete/implication-and-equivalence/ar.md) +- [x] [modular-patterns-and-clocks](discrete/modular-patterns-and-clocks/en.md) · [Arabic](discrete/modular-patterns-and-clocks/ar.md) +- [x] [pigeonhole-and-counting](discrete/pigeonhole-and-counting/en.md) · [Arabic](discrete/pigeonhole-and-counting/ar.md) +- [x] [proof-by-induction](discrete/proof-by-induction/en.md) · [Arabic](discrete/proof-by-induction/ar.md) +- [x] [propositional-logic](discrete/propositional-logic/en.md) · [Arabic](discrete/propositional-logic/ar.md) +- [x] [quantifiers](discrete/quantifiers/en.md) · [Arabic](discrete/quantifiers/ar.md) +- [x] [relations-and-functions](discrete/relations-and-functions/en.md) · [Arabic](discrete/relations-and-functions/ar.md) +- [x] [sequences-and-recurrences](discrete/sequences-and-recurrences/en.md) · [Arabic](discrete/sequences-and-recurrences/ar.md) +- [x] [sets-and-venn-diagrams](discrete/sets-and-venn-diagrams/en.md) · [Arabic](discrete/sets-and-venn-diagrams/ar.md) +- [x] [trees-and-spanning-trees](discrete/trees-and-spanning-trees/en.md) · [Arabic](discrete/trees-and-spanning-trees/ar.md) ## earth-space (0/19) diff --git a/content/lessons/STYLE.en.md b/content/lessons/STYLE.en.md index b0c7f330..020ce3ac 100644 --- a/content/lessons/STYLE.en.md +++ b/content/lessons/STYLE.en.md @@ -37,6 +37,6 @@ Run `pnpm check` after editing. It validates structure, formulas and challenge s ## Reviewed examples and remaining work -See [the lesson-by-lesson review checklist](EDITORIAL_REVIEW.md) for coverage. The Numbers, Functions and Algebra sections and the derivative lesson have received a complete bilingual editorial pass under this guide. +See [the lesson-by-lesson review checklist](EDITORIAL_REVIEW.md) for coverage. The Numbers, Functions, Algebra and Discrete sections and the derivative lesson have received a complete bilingual editorial pass under this guide. The remaining lessons still need individual review of their summaries, controls, explanations, examples and challenges. Do not treat a global phrase replacement or a successful build as an editorial review. From 70132d137700f4d54809d5279779b523ff143561 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:01:31 +0300 Subject: [PATCH 027/124] content: rewrite angles-and-parallel-lines for first-time learners in both languages --- .../geometry/angles-and-parallel-lines/ar.md | 56 +++++++++--------- .../geometry/angles-and-parallel-lines/en.md | 57 +++++++++---------- .../angles-and-parallel-lines/lesson.yaml | 6 +- 3 files changed, 57 insertions(+), 62 deletions(-) diff --git a/content/lessons/geometry/angles-and-parallel-lines/ar.md b/content/lessons/geometry/angles-and-parallel-lines/ar.md index 7e4ab457..7304d5fe 100644 --- a/content/lessons/geometry/angles-and-parallel-lines/ar.md +++ b/content/lessons/geometry/angles-and-parallel-lines/ar.md @@ -1,62 +1,60 @@ --- title: الزوايا والخطوط المتوازية -summary: >- - طريق يقطع سكة حديد يصنع الزاوية نفسها عند كل قضيب. ثلاثة أزواج من الزوايا تشرح السبب. +summary: 'حدد موضع الزاويتين لتعرف هل تتساويان أم يكون مجموعهما 180° عندما يقطع مستقيم خطين متوازيين.' parameters: - theta: زاوية القاطع θ - pair: العلاقة + theta: 'θ — زاوية القاطع بالدرجات' + pair: 'pair — متناظرتان (0)، متبادلتان داخليًا (1)، متحالفتان (2)' variables: - - الزاوية المظلّلة عند التقاطع الأول - - الزاوية المظلّلة عند التقاطع الثاني + - 'α: الزاوية المحددة الأولى' + - 'β: الزاوية المحددة الثانية' --- ## Try it -1. حرّك المقبض الرمادي في الأعلى. يميل الخط المائل (القاطع)، وتتغيّر الزاويتان المظلّلتان معًا. -2. اضغط «متناظرتان». تقع الزاويتان المظلّلتان في الموضع نفسه عند كل تقاطع، وهما متساويتان دائمًا. -3. اضغط «متحالفتان». الآن تقع الزاويتان بين الخطين المتوازيين وعلى الجهة نفسها، ومجموعهما يبقى 180° مهما كانت قيمة θ. +1. اضبط theta = 65 وpair = 0 لاختيار الزاويتين المتناظرتين. قياس كل منهما 65°. +2. أبقِ theta = 65 واختر pair = 1 للزاويتين المتبادلتين داخليًا. يتغير موضع التحديد، لكن القياسين يظلان 65°. +3. اختر pair = 2 للزاويتين الداخليتين على جهة واحدة من القاطع. قياساهما 65° و115°. غيّر theta وتحقق من بقاء المجموع 180°. ## Real-life examples -1. **سلّم مستند إلى حائط.** عند θ = 65° تصنع كل درجة من درجات السلّم الزاوية نفسها 65° مع ذراعي السلّم، لأن الدرجات متوازية وذراعا السلّم قاطع واحد مستقيم. -2. **درج ودرابزينه.** عند θ = 50° يقطع الدرابزين حواف الدرجات المتوازية، فتساوي زاوية إحدى الدرجات الزاوية المتبادلة لها عند درجة أبعد. -3. **معبر سكة حديد.** عند θ = 100° يقطع طريق خطّي سكة متوازيين، وتجمع الزاويتان على جهة الطريق نفسها إلى 180° كاملة. +1. **دعامة قطرية.** نمثل عارضتين أفقيتين متوازيتين تقطعهما دعامة مستقيمة بزاوية 65°. الزاويتان المتناظرتان عند التقاطعين تساويان 65°. +2. **قطع مستقيم عبر شرائط.** إذا كانت حواف الشرائط متوازية وكان القطع بزاوية 50°، فالزاويتان المحددتان المتبادلتان داخليًا تساويان 50°. +3. **تقاطع في مخطط.** عند theta = 100° وpair = 2، تكون الزاويتان الداخليتان على جهة واحدة 100° و80°، ومجموعهما 180°. ## Test yourself -1. اجعل الزاويتين المتناظرتين 40°. -2. اجعل الزاويتين المتبادلتين 100°. -3. اجعل الزاويتين المتحالفتين بحيث تكون إحداهما 130° (والأخرى تصبح 50° تلقائيًا، لأن مجموعهما يبلغ 180° دائمًا). +1. اختر الزاويتين المتناظرتين، واضبط theta قرب 40°. +2. اختر الزاويتين المتبادلتين داخليًا، واضبط theta قرب 100°. +3. اختر الزاويتين الداخليتين على جهة واحدة، واضبط theta قرب 130°، فتكون الثانية قريبة من 50°. ## Intuition -تخيّل سلّمًا مستندًا إلى حائط، ودرجاته كلها متوازية مع الأرض. السلّم نفسه قضيب مستقيم واحد يعبر كل درجة، وهذا القضيب يسمى قاطعًا. ولأن كل درجة توازي الأخرى، يلتقي السلّم بكل درجة بالميل نفسه بالضبط. حرّك المقبض الرمادي وراقب الزاوية عند التقاطع العلوي والزاوية المقابلة لها عند التقاطع السفلي تتحركان معًا، متساويتين على الدوام. +الخطان الأفقيان متوازيان؛ لهما الاتجاه نفسه ولا يلتقيان. يقطعهما المستقيم المائل، ونسميه القاطع. تتكون أربع زوايا عند كل تقاطع. تغيير ميل القاطع يغيّر قياساتها، لكن العلاقة بين مواضعها المتناظرة تبقى ثابتة. -لثلاثة أزواج من الزوايا أسماء خاصة بحسب موضعها. الزوايا «المتناظرة» تقع في الركن نفسه عند كل تقاطع، مثل أعلى اليمين عند الاثنين معًا، وهي متساوية دائمًا. الزوايا «المتبادلة» تقع بين الخطين المتوازيين لكن على جهتين متقابلتين من القاطع، وهي متساوية أيضًا. أما الزوايا «المتحالفة» فتقع بين الخطين المتوازيين على الجهة نفسها من القاطع، وبدل أن تتساوى يجمع مجموعها خطًّا مستقيمًا كاملًا مقداره 180°. +تحتل الزاويتان المتناظرتان الموضع نفسه عند التقاطعين، وهما متساويتان. وتقع الزاويتان المتبادلتان داخليًا بين المتوازيين وعلى جهتين مختلفتين من القاطع، وهما متساويتان أيضًا. أما الزاويتان الداخليتان على جهة واحدة من القاطع فتسميان متحالفتين، ومجموعهما 180°؛ إذا كبرت إحداهما صغرت الأخرى. ## Formal -حين يقطع قاطع خطين متوازيين، تكون الزوايا المتناظرة متساوية، أي $\alpha = \beta$. وتنطبق المساواة نفسها على الزوايا المتبادلة، لأن انزلاق أحد التقاطعين على طول القاطع حتى يقع على التقاطع الآخر يحوّل زوجًا متناظرًا إلى زوج متبادل دون أن يتغيّر مقدار أي منهما. +إذا قطع مستقيم خطين متوازيين، تحقق الزاويتان المتناظرتان $\alpha=\beta$، وتصح المساواة نفسها للمتبادلتين داخليًا. وتتساوى الزاويتان المتقابلتان بالرأس عند تقاطع واحد لأن كلًا منهما تكمل الزاوية المجاورة نفسها إلى زاوية مستقيمة. -أما الزوايا المتحالفة فتكون متكاملة لا متساوية. فإذا كانت إحداهما $\alpha$ فالأخرى $180^\circ - \alpha$، لأن مجموعهما يملأ الزاوية المستقيمة الناتجة عند تقاطع القاطع مع أحد الخطين المتوازيين. +تحقق الزاويتان المتحالفتان $\alpha+\beta=180^\circ$، أي $\beta=180^\circ-\alpha$. نسمي الزاويتين اللتين مجموعهما 180° متكاملتين. لا تتساوى المتحالفتان إلا في الحالة الخاصة التي تكون فيها كل منهما 90°. ## Advanced -هذه الحقائق تكافئ مسلّمة التوازي. فافتراض تساوي الزوايا المتناظرة لقاطع واحد يكفي لإجبار الخطين على البقاء على المسافة نفسها إلى الأبد. وبالعكس، إذا لم يكن الخطان متوازيين فإن زوايا القاطع «المتناظرة» تختلف بمقدار الزاوية بين الخطين بالضبط. +تصح اختبارات العكس أيضًا: تساوي المتناظرتين، أو تساوي المتبادلتين داخليًا، أو تكامل المتحالفتين، يثبت توازي الخطين في المستوى الإقليدي. حدد الموضع أولًا ثم طبق القاعدة؛ فتساوي أي زاويتين كيفما اتفق لا يثبت التوازي. ## Derivation -1. درجات السلّم متوازية، وذراعا السلّم نفسهما يشكّلان قاطعًا مستقيمًا واحدًا يعبر كل درجة. -2. تخيّل نسخة من السلّم تنزلق أعلى الحائط أو أسفله دون أن تدور، فتظل تعبر كل درجة متوازية بالميل نفسه، لأن الخطوط المتوازية لا تلتقي أبدًا. -3. فالزاوية التي يصنعها السلّم مع درجة تساوي الزاوية التي يصنعها مع أي درجة أخرى، أي $\alpha = \beta$. +1. ننقل أحد التقاطعين إلى الآخر بإزاحة على امتداد القاطع. تحافظ الخطوط المتوازية على اتجاهها، فتتساوى الزوايا في المواضع المتناظرة. +2. تتساوى الزوايا المتقابلة بالرأس عند التقاطع. بضم هذه الحقيقة إلى تساوي المتناظرات نحصل على قاعدة المتبادلتين داخليًا. +3. تجاور الزاوية الداخلية المتبقية زاوية مساوية للمتبادلة على خط مستقيم، لذلك يكون مجموع المتحالفتين 180°. ## Real world -### العمارة -تُبنى أعمدة النوافذ وعوارض الأرضية متوازية عن قصد، فيعبرها دعامة قطرية واحدة بزاوية واحدة يمكن التنبؤ بها، مما يبقي زاوية القطع نفسها لكل قطعة. +### عارضتان متوازيتان ودعامة -### تصميم الطرق -عند معبر يقطع فيه طريق عدة خطوط سكة حديد متوازية، يستخدم المهندسون قاعدة الزوايا المتحالفة للتأكد أن المعبر واسع بما يكفي لعبور مركبة كل الخطوط دفعة واحدة. +تصنع دعامة مستقيمة تقطع عارضتين متوازيتين زوايا متناظرة متساوية. يتيح ذلك نقل قياس زاوية من تقاطع إلى الآخر في المخطط. -### البصريات -الضوء المرتد بين مرآتين متوازيتين يصطدم بكل واحدة بالزاوية نفسها مرارًا، وهذه هي قاعدة الزوايا المتناظرة مطبّقة على شعاع الضوء بوصفه قاطعًا. +### البراهين الهندسية + +إذا رسمنا من رأس مثلث خطًا موازيًا للضلع المقابل، أمكن نقل زاويتي الرأسين الآخرين إليه باستعمال الزوايا المتبادلة داخليًا. تتجاور الزوايا الثلاث على خط مستقيم، فيثبت أن مجموع زوايا المثلث 180°. diff --git a/content/lessons/geometry/angles-and-parallel-lines/en.md b/content/lessons/geometry/angles-and-parallel-lines/en.md index 44b9bc73..b5e53915 100644 --- a/content/lessons/geometry/angles-and-parallel-lines/en.md +++ b/content/lessons/geometry/angles-and-parallel-lines/en.md @@ -1,63 +1,60 @@ --- title: Angles and parallel lines -summary: >- - A ladder crossing parallel rungs, or a road crossing railway tracks, makes - the same angle over and over — three named angle pairs explain why. +summary: 'Use the positions of angle pairs to find which are equal and which add to 180° when a line crosses parallel lines.' parameters: - theta: transversal angle θ - pair: relationship + theta: 'θ — transversal angle in degrees' + pair: 'pair — corresponding (0), alternate interior (1), same-side interior (2)' variables: - - the highlighted angle on one crossing - - the highlighted angle on the other crossing + - 'α: first highlighted angle' + - 'β: second highlighted angle' --- ## Try it -1. Drag the grey handle at the top. The diagonal line (the transversal) tilts, and both highlighted angles change together. -2. Tap "corresponding". The two highlighted angles sit in the same spot at each crossing, and they always match. -3. Tap "co-interior". Now the two highlighted angles sit between the parallel lines on the same side, and their sum stays 100°, 150°, 180° — always 180°, whatever θ is. +1. Set theta = 65 and pair = 0 for corresponding angles. Both highlighted angles are 65°. +2. Keep theta = 65 and choose pair = 1 for alternate interior angles. Their positions change, but both still measure 65°. +3. Choose pair = 2 for same-side interior angles. They measure 65° and 115°. Change theta and check that their sum remains 180°. ## Real-life examples -1. **A ladder against a wall.** θ = 65°: every rung of the ladder makes the same 65° angle with the ladder's rails, because the rungs are parallel and the rails are one straight transversal. -2. **A staircase and its handrail.** θ = 50°: the handrail crosses the parallel edges of the steps, and the angle on one step matches the alternate angle on a step further along. -3. **A level crossing.** θ = 100°: a road crosses two parallel railway tracks, and the two angles on the same side of the road add up to a straight 180°. +1. **A diagonal brace.** Model two parallel horizontal beams crossed by a straight brace at 65°. Corresponding angles at the two crossings are both 65°. +2. **A straight cut across strips.** With parallel strip edges and a cut at 50°, the highlighted alternate interior angles are both 50°. +3. **A crossing on a plan.** With theta = 100° and pair = 2, the same-side interior angles are 100° and 80°, adding to 180°. ## Test yourself -1. Set the corresponding angles to 40°. -2. Set the alternate angles to 100°. -3. Set the co-interior angles so one of them is 130° (the other is then 50°, since together they always reach 180°). +1. Choose corresponding angles and set theta close to 40°. +2. Choose alternate interior angles and set theta close to 100°. +3. Choose same-side interior angles and set theta close to 130°, giving a second angle close to 50°. ## Intuition -Picture a ladder leant against a wall, its rungs all parallel to the ground. The ladder itself is one straight bar crossing every rung — that straight bar is called a transversal. Because every rung is parallel to every other rung, the ladder meets each one at exactly the same tilt: drag the grey handle and watch the angle at the top crossing and the matching angle at the bottom crossing move together, always equal. +The horizontal lines are parallel: they have the same direction and never meet. The sloping line crosses both and is called a transversal. At each crossing there are four angles. Changing the transversal's tilt changes their sizes, while the relationship between matching positions stays the same. -Three pairs of angles get their own names depending on where they sit. "Corresponding" angles sit in the same corner at each crossing — top-right and top-right, say — and they are always equal. "Alternate" angles sit between the two parallel lines but on opposite sides of the transversal, and they are also always equal. "Co-interior" angles sit between the parallel lines on the same side of the transversal, and instead of being equal they always add up to a straight line: 180°. +Corresponding angles occupy matching positions at the two crossings, and are equal. Alternate interior angles lie between the parallels on opposite sides of the transversal, and are also equal. Same-side interior angles lie between the parallels on the same side of the transversal. They add to 180°, so if one increases, the other decreases. ## Formal -When a transversal crosses two parallel lines, corresponding angles are equal: $\alpha = \beta$. The same equality holds for alternate angles, because sliding one crossing along the transversal until it lands on the other turns a corresponding pair into an alternate pair without changing either angle. +For two parallel lines cut by a transversal, corresponding angles satisfy $\alpha=\beta$, as do alternate interior angles. Opposite angles at a single crossing are equal because each is supplementary to the same adjacent angle. -Co-interior angles are supplementary rather than equal: if one of the pair is $\alpha$, the other is $180^\circ - \alpha$, because together they fill the straight angle formed where the transversal crosses one of the parallel lines. +Same-side interior angles satisfy $\alpha+\beta=180^\circ$, or $\beta=180^\circ-\alpha$. These angles are called supplementary. They are equal only in the special case where both are 90°. ## Advanced -These facts are equivalent to the parallel postulate: assuming corresponding angles are equal for one transversal is enough to force the two lines to stay the same distance apart forever, and conversely, if two lines are not parallel a transversal's "corresponding" angles differ by exactly the angle between the lines. +The converse tests are useful too: equal corresponding angles, equal alternate interior angles, or supplementary same-side interior angles imply that the two lines are parallel in a Euclidean plane. Identify the positions before applying a rule; equality of two arbitrary angles does not establish parallelism. ## Derivation -1. A step ladder's rungs are parallel, and the ladder's own rails form one straight transversal crossing every rung. -2. Slide an imaginary copy of the ladder up or down along the wall without turning it, and it still crosses each parallel rung at the same tilt, because parallel lines never converge. -3. So the angle the ladder makes with one rung equals the angle it makes with every other rung: $\alpha = \beta$. +1. Move one crossing to the other by a translation along the transversal. Parallel lines keep their direction, so matching angle positions have equal measures. +2. At a crossing, opposite angles are equal. Combining this with corresponding-angle equality gives the alternate interior angle rule. +3. The remaining interior angle is adjacent to an equal alternate angle on a straight line, so the same-side interior pair sums to 180°. ## Real world -### Architecture -Window mullions and floor beams are built parallel on purpose, so a single diagonal brace crosses them all at one predictable angle, which keeps the cutting angle the same for every piece. +### Parallel beams and a brace -### Road design -Where a road crosses several parallel lanes of railway track at a level crossing, engineers use the co-interior angle rule to check the crossing is wide enough for a vehicle to clear all the tracks at once. +A straight diagonal brace crossing parallel beams makes equal corresponding angles at each intersection. This lets us transfer an angle from one crossing to another in a drawing. -### Optics -Light bouncing between two parallel mirrors keeps hitting each one at the same angle, which is exactly the corresponding-angle rule applied to the light ray as a transversal. +### Geometric proofs + +Drawing a line through a triangle's vertex parallel to its opposite side lets us move the two other angles to that vertex using alternate interior angles. Together they form a straight angle, proving the triangle-angle sum. diff --git a/content/lessons/geometry/angles-and-parallel-lines/lesson.yaml b/content/lessons/geometry/angles-and-parallel-lines/lesson.yaml index 3186566b..c59ffa1c 100644 --- a/content/lessons/geometry/angles-and-parallel-lines/lesson.yaml +++ b/content/lessons/geometry/angles-and-parallel-lines/lesson.yaml @@ -30,9 +30,9 @@ variables: - \alpha - \beta derivation: - - \text{a step ladder's rungs are parallel; the ladder itself is a straight transversal crossing every rung} - - \text{slide the ladder along the wall without turning it, and it still crosses each parallel rung at the same tilt} - - \alpha = \beta \text{ — the angle the ladder makes with one rung equals the angle it makes with every other rung} + - '\text{parallel lines have equal corresponding angles under a translation along the transversal}' + - '\text{vertically opposite angles are equal, so alternate interior angles are equal too}' + - '\alpha + \beta = 180^\circ \text{ for same-side interior angles}' charts: [] primary: pair presets: From f24a22829cb287e92a714e4a3bbb6349b8aff58c Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:01:31 +0300 Subject: [PATCH 028/124] content: rewrite area-and-perimeter for first-time learners in both languages --- .../lessons/geometry/area-and-perimeter/ar.md | 61 +++++++++--------- .../lessons/geometry/area-and-perimeter/en.md | 63 +++++++++---------- 2 files changed, 56 insertions(+), 68 deletions(-) diff --git a/content/lessons/geometry/area-and-perimeter/ar.md b/content/lessons/geometry/area-and-perimeter/ar.md index d80a806f..8bdd384f 100644 --- a/content/lessons/geometry/area-and-perimeter/ar.md +++ b/content/lessons/geometry/area-and-perimeter/ar.md @@ -1,67 +1,62 @@ --- title: المساحة والمحيط -summary: >- - السياج نفسه يحيط بأرض أكبر إذا كان مربعًا لا مستطيلًا نحيلًا، وأكبر إذا كان دائرة. +summary: 'قارن أشكالًا لها طول الحد نفسه، لتفهم لماذا لا يعني تساوي المحيطات تساوي المساحات.' parameters: - P: طول السياج P - f: شكل المستطيل f + P: 'P — المحيط المشترك بالمتر' + f: 'f — العرض بوصفه جزءًا من نصف المحيط؛ تعطي 0.5 مربعًا' variables: - - المساحة المحاطة - - المحيط الكلي (طول السياج)، وهو مشترك بين الأشكال الثلاثة - - عرض المستطيل - - ارتفاع المستطيل + - 'A: المساحة المحصورة بالمتر المربع' + - 'P: طول الحد المشترك للأشكال الثلاثة' + - 'w: عرض المستطيل، ويساوي fP/2' + - 'h: ارتفاع المستطيل، ويساوي (1 − f)P/2' --- ## Try it -1. اسحب المقبض الصغير على الحافة اليمنى للمستطيل. يكبر العرض كلما صغر الارتفاع، أو العكس، لكن محيطه لا يتغيّر أبدًا، والمساحة وحدها هي التي تتغيّر. -2. اسحب المستطيل حتى يصبح نحيلًا وطويلًا. تهبط قراءة مساحته إلى ما دون نصف مساحة المربع، رغم استخدام السياج نفسه بالضبط. -3. أعد المستطيل مربعًا (العرض يساوي الارتفاع). قارن الآن مساحة المربع بمساحة الدائرة. تفوز الدائرة دائمًا بالسياج نفسه. +1. اضبط P = 24 وf = 0.5. يكون المستطيل مربعًا أبعاده 6 م و6 م، ومساحته 36 م². +2. أبقِ P = 24 واجعل f = 0.15. يصبح الضلعان 1.8 م و10.2 م. يبقى المحيط 24 م، لكن المساحة تنخفض إلى 18.36 م². +3. قارن المربع والدائرة. عند P = 24، تحيط الدائرة بمساحة تقارب 45.84 م². تغيير f يغيّر أبعاد المستطيل وحده، أما تغيير P فيؤثر في الأشكال الثلاثة. ## Real-life examples -1. **قطعة أرض طويلة نحيلة.** 24 م من السياج ممدودة على شكل شريط 1.8 م × 10.2 م تحيط بنحو 18 م²، أي نصف ما يعطيه المربع تقريبًا. -2. **الطول نفسه 24 م، لكن مربعًا.** مربع 6 م × 6 م يحيط بـ 36 م²، وهذا أقصى ما يستطيعه أي مستطيل بالسياج نفسه. -3. **32 م، ممدودة في اتجاه واحد غالبًا.** مستطيل 11.2 م × 4.8 م يستخدم سياجًا أطول إجمالًا لكنه يبقى دون مساحة المربع المرسوم بالطول نفسه. +1. **قطعة أرض ضيقة.** عند P = 24 م وf = 0.15، تكون الأبعاد 1.8 م و10.2 م، والمساحة 18.36 م². +2. **قطعة أرض مربعة.** المحيط نفسه، 24 م، مع f = 0.5 يعطي مربعًا أبعاده 6 م و6 م، ومساحته 36 م². +3. **محيط أكبر.** عند P = 32 م وf = 0.7، تكون أبعاد المستطيل 11.2 م و4.8 م، ومساحته 53.76 م². أما المربع ذو المحيط نفسه فمساحته 64 م². ## Test yourself -1. أعد المستطيل إلى مربع. -2. اجعل مساحة المستطيل أقل من نصف مساحة المربع. -3. اجعل نصف قطر الدائرة أكبر من 4 م. +1. اضبط f قرب 0.5 ليصبح المستطيل قريبًا من مربع. +2. اجعل مساحة المستطيل أقل من نصف مساحة المربع، مع بقاء محيطهما المشترك ثابتًا. +3. زد P حتى يتجاوز نصف قطر الدائرة 4 م. استخدم نصف القطر = P/(2π). ## Intuition -تخيّل أنك أُعطيت طولًا ثابتًا من السياج وطُلب منك أن تحيط بأكبر قدر ممكن من الأرض. اسحب حافة المستطيل، وسترى الشكل يبادل العرض بالارتفاع بينما يبقى طول السياج، أي المحيط، ثابتًا تمامًا، لكن قراءة المساحة تستمر في التغيّر، فترتفع كلما اقترب الضلعان من التساوي وتهبط كلما تمدد أحدهما نحيلًا. الشريط الطويل الضيق يهدر معظم سياجه على ضلعين طويلين يواجهان بعضهما بقرب لا فائدة منه. +يقيس المحيط طول الحد الذي يحيط بالشكل، وتقيس المساحة مقدار السطح داخله. مربع أبعاده 6 م و6 م محيطه 24 م ومساحته 36 م². ومستطيل أبعاده 2 م و10 م له المحيط نفسه، لكن مساحته 20 م² فقط. إذن طول السياج نفسه لا يضمن مساحة الأرض نفسها. -أفضل مستطيل لطول سياج معين هو المربع دائمًا، لأنه النقطة الوحيدة التي يتوازن فيها العرض والارتفاع تمامًا. لكن المربع ليس أفضل شكل على الإطلاق. استبدل الزوايا بمنحنى ناعم، والطول نفسه من السياج، مطويًا دائرة، يحيط بمساحة أكبر. الزوايا هي حيث «يهدر» الشكل سياجه بالانثناء إلى الداخل، والدائرة لا زوايا فيها. +عند تثبيت المحيط، تجبرنا زيادة عرض المستطيل على إنقاص ارتفاعه بالمقدار نفسه. تبلغ المساحة أكبر قيمة عندما يتساوى البعدان. وتحيط الدائرة ذات المحيط نفسه بمساحة أكبر منهما. هذه نتيجة رياضية مستقلة؛ فمقارنة بعض الرسوم وحدها لا تثبتها لكل شكل ممكن. ## Formal -لمستطيل محيطه $P$ وعرضه $w$، تكون مساحته $A = w\left(\dfrac{P}{2} - w\right)$، وهذه تبلغ أقصاها عند $w = \dfrac{P}{4}$، أي المربع، فتعطي $A = \left(\dfrac{P}{4}\right)^2$. +يحقق المستطيل ذو العرض w والارتفاع h والمحيط P العلاقة $P=2(w+h)$، لذا $h=P/2-w$ و$A=w(P/2-w)$. بإكمال المربع نحصل على $A=P^2/16-(w-P/4)^2$. المربع المطروح غير سالب، فتتحقق أكبر مساحة عند $w=h=P/4$. -ومن بين كل شكل مغلق محيطه $P$، لا يحيط أي شكل بمساحة أكبر من الدائرة، أي $A \le \dfrac{P^2}{4\pi}$، وتتحقق المساواة فقط حين يكون الشكل دائرة. +لمنحنى مستوٍ مغلق لا يتقاطع مع نفسه، طوله P ويحيط بمساحة A، تنص متباينة تساوي المحيط على $A\le P^2/(4\pi)$، وتتحقق المساواة للدائرة. نصف قطرها $r=P/(2\pi)$. تفترض النتيجة منطقة محصورة وحدًا ذا طول منتهٍ. ## Advanced -هذه هي متراجحة القياس المحيطي، وهي صحيحة في أي بُعد. فمن بين كل الأجسام المصمتة بمساحة سطح معينة، تحيط الكرة بأكبر حجم، ولهذا تكون فقاعات الصابون كروية. فالتوتر السطحي يشد الغشاء نحو الشكل الذي يكلّف أقل مساحة سطح مقابل الهواء الذي يحبسه. +تثبت الصيغة أن المربع أفضل المستطيلات لهذه المسألة. أما إثبات أن الدائرة أفضل جميع المناطق المستوية التي تنطبق عليها الشروط فيحتاج إلى برهان مستقل. لا يكفي نعومة الحد أو غياب الزوايا لضمان أكبر مساحة؛ فالقطع الناقص الطويل والضيق ناعم أيضًا. وفي ثلاثة أبعاد، تقارن النتيجة المناظرة الحجم المحصور بمساحة السطح. ## Derivation -1. لمستطيل محيطه P وعرضه w، يكون الارتفاع هو P/2 ناقص w، فتكون مساحته w مضروبة في ذلك الارتفاع. -2. هذه المساحة تتغيّر مع w على شكل قطع مكافئ ينحني إلى الأسفل، وتبلغ ذروتها في المنتصف تمامًا، عند w = P/4، أي المربع. -3. بمقارنة كل شكل ممكن لا المستطيلات وحدها، السياج نفسه بطول P يحيط دائمًا بمساحة لا تتجاوز P² ÷ (4π)، ولا يبلغ هذا الحد فعليًا إلا الدائرة. +1. تثبيت P يثبت w + h عند P/2. نعوض h = P/2 − w في A = wh. +2. نكتب المساحة على صورة P²/16 ناقص مربع w − P/4. تبلغ أكبر قيمة عندما يساوي ذلك المربع صفرًا، فيكون المستطيل مربعًا. +3. للدائرة، نعوض r = P/(2π) في πr² فنحصل على P²/(4π). وتثبت متباينة تساوي المحيط أن أي شكل آخر تنطبق عليه الشروط لا يتجاوزها؛ لا يثبت حساب المستطيل وحده هذه النتيجة العامة. ## Real world -### الزراعة -المزارع الذي يسيّج حظيرة بلفة سلك ثابتة الطول يحصل على أكبر مساحة رعي بتسييجها مربعة لا شريطًا طويلًا، دون أن ينفق مترًا إضافيًا من السلك. +### تسوير أرض مستطيلة -### التغليف -يستخدم الأنبوب الدائري مادة أقل من مجرى مربع بالمساحة المقطعية نفسها، وهذا أحد أسباب تفضيل السباكة ومجاري الهواء للأشكال الدائرية على حادة الزوايا. +إذا احتاج الحد كله إلى سياج ولم توجد قيود أخرى، أعطى المربع أكبر مساحة بين المستطيلات ذات المحيط المحدد. اشتراط طول معين لأحد الأضلاع، أو وجود جدار يغني عن جزء من السياج، يغيّر المسألة. -### التخطيط الحضري -الساحات الدائرية أو المربعة تحتوي مساحة أكبر قابلة للاستخدام لكل متر من السور أو الدرابزين المحيط بها مقارنة بالساحات الطويلة النحيلة، ولهذا كثير من الساحات العامة مربعة الشكل تقريبًا فعلًا. +### تكبير تصميم -### الأحياء -تُقلّل أغشية الخلايا وأفلام الصابون كلتاهما مساحة السطح مقابل الحجم الذي تحيطان به، وهذا هو النظير الثلاثي الأبعاد لتفوّق الدائرة على كل مستطيل في المستوى. +مضاعفة كل الأطوال تضاعف المحيط وتجعل المساحة أربعة أمثالها. لذلك يمكن لتصميم له ضعف طول الحد أن يحيط بأربعة أمثال المساحة، إذا حافظنا على الشكل نفسه. diff --git a/content/lessons/geometry/area-and-perimeter/en.md b/content/lessons/geometry/area-and-perimeter/en.md index 12927400..a6a43d38 100644 --- a/content/lessons/geometry/area-and-perimeter/en.md +++ b/content/lessons/geometry/area-and-perimeter/en.md @@ -1,69 +1,62 @@ --- title: Area and perimeter -summary: >- - The same length of fence encloses far more land as a square than as a thin - rectangle, and even more as a circle — perimeter fixes a budget, and shape - decides what you get for it. +summary: 'Compare shapes with the same boundary length to see why equal perimeters need not enclose equal areas.' parameters: - P: fence length P - f: rectangle shape f + P: 'P — common perimeter in metres' + f: 'f — width as a fraction of half the perimeter; 0.5 gives a square' variables: - - the area enclosed - - the total perimeter (the fence length), shared by all three shapes - - the rectangle's width - - the rectangle's height + - 'A: enclosed area, measured in square metres' + - 'P: common boundary length of the three shapes' + - 'w: rectangle width, equal to fP/2' + - 'h: rectangle height, equal to (1 − f)P/2' --- ## Try it -1. Drag the little handle on the rectangle's right edge. Its width and height trade off, but its perimeter never changes — only its area does. -2. Pull the rectangle thin and long. Its area readout drops well below the square's, even though both used exactly the same fence. -3. Bring the rectangle back to a square (width equals height). Now compare the square's area to the circle's: the circle, with the same fence, always wins. +1. Set P = 24 and f = 0.5. The rectangle is a 6 m by 6 m square with area 36 m². +2. Keep P = 24 and set f = 0.15. The sides become 1.8 m and 10.2 m. The perimeter stays 24 m, but the area falls to 18.36 m². +3. Compare the fixed square and circle. At P = 24, the circle encloses about 45.84 m². Changing f changes only the rectangle's dimensions; changing P changes all three shapes. ## Real-life examples -1. **A long, thin plot.** 24 m of fence stretched into a 1.8 m by 10.2 m strip encloses about 18 m² — barely half of what a square would give. -2. **The same 24 m, squared off.** A 6 m by 6 m square encloses 36 m², the most any rectangle can manage with that fence. -3. **32 m, mostly one direction.** An 11.2 m by 4.8 m rectangle uses more fence overall but still falls short of the square drawn with the same length. +1. **A narrow plot.** With P = 24 m and f = 0.15, the plot measures 1.8 m by 10.2 m and covers 18.36 m². +2. **A square plot.** The same 24 m boundary with f = 0.5 encloses a 6 m by 6 m square, covering 36 m². +3. **A larger boundary.** With P = 32 m and f = 0.7, the rectangle is 11.2 m by 4.8 m and covers 53.76 m². The square with that same perimeter covers 64 m². ## Test yourself -1. Bring the rectangle back to a square. -2. Make the rectangle's area less than half the square's area. -3. Make the circle's radius bigger than 4 m. +1. Set f close to 0.5 so that the rectangle is nearly square. +2. Make the rectangle's area less than half the square's area while keeping their common perimeter. +3. Increase P until the circle's radius exceeds 4 m. Use radius = P/(2π). ## Intuition -Imagine you're given a fixed length of fence and asked to enclose as much land as possible. Drag the rectangle's edge and you'll see the shape trade width for height while the fence length (the perimeter) stays exactly the same — but the area readout keeps changing, rising as the two sides get closer to equal and falling as one stretches out thin. A very long, narrow strip wastes most of its fence on two long sides that face each other uselessly close together. +Perimeter measures the distance around a boundary, while area measures the surface inside it. A 6 m by 6 m square has perimeter 24 m and area 36 m². A 2 m by 10 m rectangle also has perimeter 24 m, but area only 20 m². Equal fence lengths do not imply equal enclosed areas. -The best rectangle for a given amount of fence is always the square, because that's the one point where width and height are perfectly balanced. But the square still isn't the best shape overall — swap the corners for a smooth curve and the same length of fence, bent into a circle, encloses even more. Corners are where a shape "wastes" fence pinching inward; a circle has none. +With the perimeter fixed, increasing a rectangle's width forces its height to decrease by the same amount. The area is greatest when the two are equal. The circle with that perimeter encloses still more area. This is a separate mathematical result; comparing a few pictures alone does not prove it for every possible shape. ## Formal -For a rectangle of perimeter $P$ and width $w$, the area is $A = w\left(\dfrac{P}{2} - w\right)$, which is maximised at $w = \dfrac{P}{4}$ — the square — giving $A = \left(\dfrac{P}{4}\right)^2$. +A rectangle with width w, height h and perimeter P satisfies $P=2(w+h)$, so $h=P/2-w$ and $A=w(P/2-w)$. Completing the square gives $A=P^2/16-(w-P/4)^2$. The subtracted square is nonnegative, so the maximum occurs at $w=h=P/4$. -Among every closed shape with perimeter $P$, none encloses more area than the circle: $A \le \dfrac{P^2}{4\pi}$, with equality only when the shape is a circle. +For a simple closed plane curve of length P enclosing area A, the isoperimetric inequality is $A\le P^2/(4\pi)$, with equality for a circle. Its radius is $r=P/(2\pi)$. The statement assumes an ordinary enclosed region and a boundary with finite length. ## Advanced -This is the isoperimetric inequality, and it holds in any dimension: among all solids with a given surface area, the sphere encloses the most volume, which is why soap bubbles are round — surface tension pulls the film toward the shape that costs the least surface for the volume of air it traps. +The formula proves the square is best among rectangles. Proving the circle is best among all eligible plane regions takes a separate argument. Smoothness or the absence of corners alone does not guarantee maximum area: a long thin ellipse is smooth too. In three dimensions, the related result compares enclosed volume with surface area. ## Derivation -1. For a rectangle of perimeter P and width w, the height is P/2 minus w, so its area is w times that height. -2. That area is a downward-curving parabola in w, and it peaks exactly halfway, at w = P/4 — a square. -3. Comparing every possible shape rather than just rectangles, the same fence length P always encloses at most P² ⁄ (4π) of area, and only a circle actually reaches that limit. +1. Fixing P fixes w + h at P/2. Substitute h = P/2 − w into A = wh. +2. Rewrite the area as P²/16 minus the square of w − P/4. It is largest when that square is zero, making the rectangle a square. +3. For the circle, substitute r = P/(2π) into πr² to get P²/(4π). The isoperimetric theorem establishes that no other eligible shape exceeds it; the rectangle calculation alone does not prove that theorem. ## Real world -### Farming -Farmers fencing a paddock with a fixed roll of wire get the most grazing land by fencing a square rather than a long strip, without spending a metre more of wire. +### Fencing a rectangular plot -### Packaging -A circular pipe uses less material than a square duct of the same cross-sectional area, which is one reason plumbing and ductwork favour round shapes over sharp-cornered ones. +If the entire boundary needs fencing and there are no other restrictions, a square gives the most area among rectangles of fixed perimeter. A required side length or a boundary already supplied by a wall changes the problem. -### Urban planning -Round or square plazas pack more usable space per metre of surrounding wall or railing than long thin ones, which is why many public squares are, in fact, roughly square. +### Scaling a design -### Biology -Cell membranes and soap films both minimise surface for the volume they enclose, which is the three-dimensional cousin of a circle beating every rectangle in the plane. +Doubling every length doubles perimeter and quadruples area. A design with twice as much boundary can therefore enclose four times the area when its shape is preserved. From 7a2b2a23d5483bb2ea242ea5005a161dfb8875b0 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:01:31 +0300 Subject: [PATCH 029/124] content: rewrite circle for first-time learners in both languages --- content/lessons/geometry/circle/ar.md | 57 ++++++++++++-------------- content/lessons/geometry/circle/en.md | 58 ++++++++++++--------------- 2 files changed, 52 insertions(+), 63 deletions(-) diff --git a/content/lessons/geometry/circle/ar.md b/content/lessons/geometry/circle/ar.md index 055fdf58..f51456ca 100644 --- a/content/lessons/geometry/circle/ar.md +++ b/content/lessons/geometry/circle/ar.md @@ -1,65 +1,60 @@ --- title: 'الدائرة: المحيط والمساحة' -summary: >- - كل نقطة على الدائرة تبعد المسافة نفسها عن المركز. هذه المسافة تحدد المحيط والمساحة. +summary: 'استخدم نصف القطر لحساب طول محيط الدائرة ومساحة المنطقة داخلها.' parameters: - r: r — نصف القطر + r: 'r — نصف القطر، من المركز إلى الحد الدائري' variables: - - نصف القطر، اسحب المقبض على الحافة لتغييره - - المحيط، المسافة التي تقطعها دورة واحدة حول الدائرة - - المساحة التي تحصرها الدائرة + - 'r: نصف القطر؛ اسحب النقطة على الدائرة أو استخدم المنزلق' + - 'C: المحيط، أي طول الحد الدائري' + - 'A: مساحة القرص داخل الدائرة' --- ## Try it -1. اسحب المقبض على الحافة لتكبير الدائرة وتصغيرها. -2. انظر إلى الخط المستقيم تحت الدائرة، فهو الحافة نفسها مفرودة. يدخل فيها نحو 6.28 من طول نصف القطر دائمًا. -3. اقرأ «النسبة C/d» تحت الرسم. لا تتغير أبدًا، وهذا العدد الثابت هو π. +1. اضبط r = 1. اقرأ محيطًا يقارب 6.28 ومساحة تقارب 3.14. يقيس كل منهما شيئًا مختلفًا، وله وحدة مختلفة. +2. اضبط r = 2. يتضاعف المحيط إلى نحو 12.57، وتصبح المساحة أربعة أمثالها، أي نحو 12.57 أيضًا. تساوي العددين هنا لا يجعل الطول والمساحة كمية واحدة. +3. قارن C/d عند أنصاف أقطار مختلفة. تبقى النسبة نحو 3.141593. يضبط الرسم مقياسه تلقائيًا، لذا تابع القيم المكتوبة بدل حجم الدائرة على الشاشة. ## Real-life examples -1. **ترامبولين في الفناء.** ترامبولين نصف قطره 1.8 متر تبلغ مساحة سطح القفز فيه نحو 10 أمتار مربعة. -2. **غطاء بالوعة.** غطاء بالوعة نصف قطره 0.5 متر يبلغ محيطه أكثر بقليل من 3 أمتار. -3. **طبق استقبال صغير.** طبق استقبال نصف قطره 3 أمتار يجمع الإشارة على مساحة نحو 28 مترًا مربعًا. +1. **بساط دائري.** يغطي بساط نصف قطره 1.8 م مساحة تقارب 10.18 م²، لأن المساحة = π × 1.8². +2. **غطاء دائري.** لغطاء نصف قطره 0.5 م محيط طوله نحو 3.14 م ومساحة تقارب 0.79 م². +3. **حوض زراعة دائري.** يغطي حوض نصف قطره 3 م مساحة تقارب 28.27 م²، ويحتاج إلى نحو 18.85 م من الحواف المحيطة به. ## Test yourself -1. اجعل مساحة الدائرة نحو 12 مترًا مربعًا. -2. اصنع دائرة نصف قطرها أكبر من 3 أمتار ومحيطها يتجاوز 25 مترًا. -3. أبقِ نصف القطر دون متر واحد والمساحة دون مترين مربعين. +1. اختر نصف قطر يعطي مساحة تقارب 12. +2. اجعل r أكبر من 3 والمحيط أكبر من 25. +3. أبقِ r أقل من 1 والمساحة أقل من 2. ## Intuition -اسحب المقبض على الحافة، فيتمدد خط نصف القطر وتكبر الدائرة أو تصغر حوله. وفي الأسفل تُقطع تلك الحافة نفسها وتُفرد على شكل قطعة مستقيمة. راقب كيف يتطابق طولها دائمًا مع نحو $6.28$ نسخة من نصف القطر، خطوة بخطوة. وذلك الرقم، $2\pi$، ليس مصادفة تخص هذه الدائرة وحدها، بل هو نفسه لكل دائرة يمكنك رسمها. +نصف القطر هو المسافة من المركز إلى الحد الدائري. يمر القطر بالمركز من جانب إلى الجانب المقابل، لذا يساوي ضعفي نصف القطر. أما المحيط فهو طول دورة كاملة حول الحد. يمثل الخط أسفل الدائرة هذا الحد بعد فرده، وتمثل المسافة بين كل علامتين طول نصف قطر واحد. -ولأن $C$ يتغيّر بتناسب مع $r$، فإن النسبة $C/r$ لا تتغيّر أبدًا وأنت تسحب، فهي دائمًا $2\pi$. وهذا في الحقيقة تعريف $\pi$، أي النسبة الثابتة بين طول محيط الدائرة واتساعها. +يساوي المحيط أكثر قليلًا من ستة أنصاف أقطار، أو أكثر قليلًا من ثلاثة أقطار. النسبة الثابتة بين المحيط والقطر هي π، وتساوي تقريبًا 3.14159. أما المساحة فتقيس مقدار السطح داخل الدائرة. مضاعفة نصف القطر تضاعف الأطوال، لكنها تجعل المساحة أربعة أمثالها. ## Formal -الدائرة التي نصف قطرها $r$ ومركزها النقطة $O$ هي مجموعة النقاط التي تبعد مسافة $r$ بالضبط عن $O$. ومحيطها هو $C = 2\pi r$. +لنصف قطر موجب r، تتكون الدائرة من النقاط التي تبعد r عن مركزها. قطرها $d=2r$، ومحيطها $C=\pi d=2\pi r$. نستخدم وحدة الطول نفسها للكميات r وd وC. -والقرص الذي تحصره الدائرة مساحته $A = \pi r^2$. ولكل دائرة، نسبة $C/d$ بين المحيط والقطر تساوي الثابت $\pi$. +مساحة القرص المحصور داخلها هي $A=\pi r^2$. إذا قسنا r بالمتر، قسنا C بالمتر وA بالمتر المربع. ضرب r في عامل موجب k يضرب C في k ويضرب A في $k^2$. ## Advanced -يربط التفاضل والتكامل بين المساحة والمحيط، إذ $\frac{d}{dr}\pi r^2 = 2\pi r$. فزيادة نصف القطر بمقدار $dr$ تضيف حلقة رقيقة طولها $2\pi r$. وتكامل هذه الحلقات، $\int_0^r 2\pi s\,ds$، يعيد بناء المساحة. +زيادة نصف القطر بمقدار صغير h تضيف حلقة مساحتها الدقيقة 2πrh + πh². إذا كان h صغيرًا مقارنة بـr، كان الحد الثاني صغيرًا، وأصبحت المساحة المضافة تقريبًا حاصل ضرب المحيط في السمك. يفسر هذا لماذا تساوي مشتقة المساحة بالنسبة إلى نصف القطر قيمة المحيط. ## Derivation -1. قسّم القرص إلى $n$ قطاعًا رقيقًا من المركز. كل قطاع يقارب مثلثًا ارتفاعه $r$ وقاعدته $C/n$، وهي شريحة من المحيط. -2. رتّب القطاعات جنبًا إلى جنب، بالتناوب بين الاتجاهين لتتشابك. وعندما $n\to\infty$ تستقيم الحافة المسننة لتصبح مستطيلًا ارتفاعه $r$ وعرضه $C/2$، وهو نصف المحيط المفرود. -3. اضرب ضلعي المستطيل وعوّض $C = 2\pi r$، فتنتج مساحة القرص $\pi r^2$. +1. نقسم القرص إلى قطاعات ضيقة كثيرة. يشبه كل منها مثلثًا ارتفاعه r وقاعدته قوس صغير من المحيط. +2. نرتب القطاعات بالتناوب، أحدها لأعلى والآخر لأسفل. كلما ضاقت القطاعات، اقترب الشكل من مستطيل ارتفاعه r وعرضه C/2. +3. مساحته rC/2. بتعويض C = 2πr نحصل على πr². وتصبح النتيجة دقيقة بأخذ النهاية مع تضييق القطاعات أكثر فأكثر. ## Real world -### العجلات والتروس -محيط العجلة يخبرك بالمسافة التي تقطعها في دورة كاملة واحدة، وهذا هو أساس حساب عدادات المسافة ونسب التروس. +### إحاطة سطح وتغطيته -### الأنابيب والكابلات -مساحة المقطع العرضي للأنبوب، $\pi r^2$، تحدد كمية الماء أو الكابل التي يمكن أن تمر عبره. +لحساب طول حافة تحيط بحوض دائري نستخدم المحيط. ولتغطية سطحه نستخدم المساحة. يحدد نصف القطر الإجابتين، لكن لكل منهما صيغة ووحدة مختلفة. -### المدارات -بتقريب جيد، يرسم الكوكب أو القمر الصناعي دائرة، فتعطي $C = 2\pi r$ المسافة التي يقطعها في كل دورة. +### دوران عجلة -### اقتصاديات البيتزا -المساحة تنمو مع $r^2$ بينما السعر غالبًا ما يتناسب بصورة أقرب إلى $r$، ولهذا فإن بيتزا كبيرة واحدة تكون عادة أفضل قيمة من بيتزتين صغيرتين. +تقطع عجلة مثالية تتدحرج دون انزلاق مسافة تساوي محيطها في كل دورة كاملة. مضاعفة نصف قطرها تضاعف هذه المسافة لكل دورة. diff --git a/content/lessons/geometry/circle/en.md b/content/lessons/geometry/circle/en.md index 140e7c67..4a79d90f 100644 --- a/content/lessons/geometry/circle/en.md +++ b/content/lessons/geometry/circle/en.md @@ -1,66 +1,60 @@ --- title: 'Circle: circumference and area' -summary: >- - Every point on a circle sits the same distance from its centre — that one - distance alone fixes how far around it is and how much area it encloses. +summary: 'Use the radius to calculate a circle’s boundary length and the area inside it.' parameters: - r: r — radius + r: 'r — radius, from centre to boundary' variables: - - the radius — drag the handle on the rim to change it - - 'the circumference, the distance once around the circle' - - the area enclosed by the circle + - 'r: radius; drag the boundary handle or use the slider' + - 'C: circumference, the boundary length' + - 'A: area of the enclosed disk' --- ## Try it -1. Drag the handle on the rim to make the circle bigger and smaller. -2. Look at the straight line under the circle: it is the rim unrolled. About 6.28 radius-lengths fit along it, always. -3. Read «ratio C/d» under the picture. It never changes: that fixed number is π. +1. Set r = 1. Read circumference about 6.28 and area about 3.14. These measure different things and use different units. +2. Set r = 2. The circumference doubles to about 12.57, while the area quadruples to about 12.57. Their numerical agreement here does not make length and area interchangeable. +3. Compare C/d at different radii. It remains about 3.141593. The picture automatically rescales, so follow the numerical values rather than the circle's screen size. ## Real-life examples -1. **Backyard trampoline.** A trampoline with a 1.8 m radius has a jumping surface of about 10 square metres. -2. **Manhole cover.** A manhole cover with a 0.5 m radius has a rim just over 3 metres around. -3. **Small satellite dish.** A satellite dish with a 3 m radius collects signal over an area of roughly 28 square metres. +1. **A circular mat.** A mat with radius 1.8 m covers about 10.18 m², using area = π × 1.8². +2. **A circular cover.** A cover with radius 0.5 m has a boundary about 3.14 m long and area about 0.79 m². +3. **A circular garden bed.** A bed with radius 3 m covers about 28.27 m² and needs about 18.85 m of edging around its boundary. ## Test yourself -1. Size the circle so its area is about 12 square metres. -2. Make a circle bigger than 3 m in radius whose circumference tops 25 m. -3. Keep the radius under 1 m yet the area below 2 square metres. +1. Choose a radius giving an area of about 12. +2. Make r greater than 3 and the circumference greater than 25. +3. Keep r below 1 and the area below 2. ## Intuition -Drag the handle on the rim: the radius line stretches, and the circle grows or shrinks around it. Below, that same rim gets cut and laid out flat as a straight segment — watch how its length always lines up with about $6.28$ copies of the radius, tick by tick. That number, $2\pi$, is not a coincidence of this one circle; it is the same for every circle you could draw. +The radius is the distance from the centre to the boundary. A diameter crosses the centre from one side to the other, so it is twice the radius. The circumference is the length of one trip around the boundary. The segment under the circle represents that boundary laid straight; its tick spacing represents one radius. -Because $C$ scales with $r$, the ratio $C/r$ never changes as you drag — it is always $2\pi$. That is really the definition of $\pi$: the fixed proportion between how far around a circle is and how big it is across. +The circumference is a little more than six radii, or a little more than three diameters. The fixed ratio of circumference to diameter is π, approximately 3.14159. The area measures how much flat surface lies inside the circle. Doubling the radius doubles all lengths but multiplies the area by four. ## Formal -A circle of radius $r$ centred at a point $O$ is the set of points at distance exactly $r$ from $O$; its circumference is $C = 2\pi r$. +For positive radius r, a circle consists of points at distance r from its centre. Its diameter is $d=2r$, and its circumference is $C=\pi d=2\pi r$. Lengths such as r, d and C use the same unit. -The disk it encloses has area $A = \pi r^2$, and for every circle the ratio $C/d$ of circumference to diameter equals the constant $\pi$. +The enclosed disk has area $A=\pi r^2$. If r is measured in metres, C is measured in metres and A in square metres. Scaling r by a positive factor k scales C by k and A by $k^2$. ## Advanced -Area and circumference are linked by calculus: $\frac{d}{dr}\pi r^2 = 2\pi r$. Growing the radius by $dr$ adds a thin ring of length $2\pi r$ — and integrating those rings, $\int_0^r 2\pi s\,ds$, rebuilds the area. +Increasing the radius by a small amount h adds an annulus with exact area 2πrh + πh². When h is small compared with r, the second term is small and the added area is approximately circumference × thickness. This explains why the derivative of area with respect to radius equals circumference. ## Derivation -1. Slice the disk into $n$ thin wedges from the centre. Each wedge is nearly a triangle of height $r$ and base $C/n$, a sliver of the circumference. -2. Lay the wedges side by side, alternating direction so they interlock. As $n\to\infty$ the zig-zag edge straightens into a rectangle of height $r$ and width $C/2$ — half the unrolled circumference. -3. Multiply the rectangle's two sides and substitute $C = 2\pi r$: the disk's area falls out as $\pi r^2$. +1. Cut the disk into many narrow sectors. Each is approximately a triangle with height r and base a small arc of the circumference. +2. Arrange them alternately pointing up and down. As the sectors become narrower, the arrangement approaches a rectangle of height r and width C/2. +3. Its area is rC/2. Substituting C = 2πr gives πr². Taking the limit of increasingly narrow sectors makes the result exact. ## Real world -### Wheels and gears -A wheel's circumference tells you how far it travels in one full turn, which is how odometers and gear ratios are calculated. +### Edging and covering -### Pipes and cable -A pipe's cross-sectional area, $\pi r^2$, determines how much water or cable can pass through it. +To border a round bed, use circumference to calculate edging length. To cover its surface, use area. The same radius answers both questions, but with different formulas and units. -### Orbits -To a good approximation a planet or satellite traces a circle, so $C = 2\pi r$ gives the distance it covers each revolution. +### Rolling a wheel -### Pizza economics -Area grows with $r^2$ while price often scales closer to $r$, which is why one large pizza usually beats two small ones. +An ideal wheel rolling without slipping travels one circumference per full rotation. Doubling its radius doubles that distance per rotation. From 9d0ed9999c624d4617efe1454419751d0730e2fd Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:01:31 +0300 Subject: [PATCH 030/124] content: rewrite circle-theorems for first-time learners in both languages --- .../lessons/geometry/circle-theorems/ar.md | 62 +++++++++--------- .../lessons/geometry/circle-theorems/en.md | 63 +++++++++---------- .../geometry/circle-theorems/lesson.yaml | 6 +- 3 files changed, 59 insertions(+), 72 deletions(-) diff --git a/content/lessons/geometry/circle-theorems/ar.md b/content/lessons/geometry/circle-theorems/ar.md index 45937abe..3944f881 100644 --- a/content/lessons/geometry/circle-theorems/ar.md +++ b/content/lessons/geometry/circle-theorems/ar.md @@ -1,68 +1,62 @@ --- title: 'مبرهنات الدائرة' -summary: >- - قف حيث شئت على حافة الدائرة وانظر إلى النقطتين نفسيهما: زاوية نظرك لا تتغير أبدًا، - وهي دائمًا نصف الزاوية عند المركز. +summary: 'قارن الزوايا التي تقابل القوس نفسه، وافهم لماذا تكون الزاوية المقابلة لقطر قائمة.' parameters: - arc: الزاوية المركزية AOB - pos: موضع C على القوس البعيد + arc: 'arc — قياس الزاوية المركزية AOB بالدرجات' + pos: 'pos — موضع C على القوس البعيد، من قرب A عند 0 نحو B عند 1' variables: - - مركز الدائرة - - أحد طرفي الوتر، وموضعه ثابت - - الطرف الآخر للوتر، وموضعه ثابت - - نقطة تسحبها حول القوس البعيد + - 'O: مركز الدائرة' + - 'A: طرف ثابت على الدائرة' + - 'B: طرف يتغير موضعه بأداة arc' + - 'C: نقطة على القوس البعيد؛ اسحبها أو غيّر pos' --- ## Try it -1. حرّك المنزلق «الزاوية المركزية AOB». القطاع البرتقالي عند المركز والقطاع الأخضر عند C يكبران معًا، لكن زاوية C تبقى دائمًا نصف زاوية المركز. -2. حرّك المنزلق «موضع C على القوس البعيد» من طرف القوس إلى الطرف الآخر. زاوية C الخضراء لا تتغيّر أبدًا رغم أن C انتقلت مسافة طويلة. -3. ارفع «الزاوية المركزية AOB» إلى أقصاها، 180°. الآن تصبح A و B طرفي قطر واحد، وتستقر زاوية C الخضراء عند 90° بالضبط أينما كانت C. الخط المتقطع عند A يبقى طوال الوقت عموديًا على نصف القطر OA. وهذا الخط هو المماس. +1. اضبط arc = 100 وpos = 0.5. الزاوية المركزية 100°، والزاوية عند C تساوي 50°. +2. أبقِ arc = 100 وحرّك pos من 0.05 إلى 0.95. تبقى C على القوس المقابل، وتظل زاويتها 50°. +3. اضبط arc = 180. يصبح AB قطرًا، والزاوية عند C قائمة. يظل المماس المتقطع عند A عموديًا على OA في جميع الحالات. ## Real-life examples -1. **تحديد موقع السفينة بالمنارتين.** كان البحّارة يقيسون بسدّاسي القياس الزاوية بين منارتين من على متن السفينة، وكل سفينة تسير على المسار الدائري نفسه المار بالمنارتين تقرأ الزاوية نفسها، وهي نصف الزاوية التي تصنعها المنارتان عند مركز ذلك المسار. -2. **اختبار النجّار للزاوية القائمة.** ارسم نصف دائرة فوق حافة لوح مستقيمة. أي نقطة تضعها على القوس ترى طرفي تلك الحافة بزاوية قائمة، وهذه طريقة سريعة للتحقق من زاوية الركن دون مسطرة زاوية. -3. **تأطير الصور البانورامية.** المصوّر الذي يمشي على قوس ليبقي عرض معلم أثري ثابتًا في كل لقطة يحافظ في الحقيقة على زاوية النظر إليه ثابتة. +1. **زاوية رؤية ثابتة.** عند arc = 100 وpos = 0.5، يصنع الخطان من C إلى النقطتين A وB زاوية 50°. يحافظ تحريك C على القوس البعيد نفسه على هذا القياس. +2. **إنشاء مثلث قائم.** عند arc = 180 وpos = 0.5، يشكل القطر AB مع أي نقطة ثالثة C على نصف الدائرة، عدا طرفيه، مثلثًا قائمًا. +3. **الابتعاد عن المنتصف.** عند arc = 60 وpos = 0.8، تقترب C من B، لكن الزاوية ACB تظل 30°. لا يلزم أن تتساوى المسافتان من C إلى الطرفين. ## Test yourself -1. اضبط الزاوية المركزية بحيث ترى النقطة C زاوية قائمة. -2. اضبط الزاوية المركزية على 80°، لتقرأ زاوية C بالضبط 40°. -3. ارفع الزاوية المركزية فوق 130° وحرّك C لتقترب من B، وتحقّق أن زاوية C ما زالت تساوي نصف «الزاوية المركزية AOB». +1. اختر arc بحيث تكون الزاوية عند C مساوية 90°. +2. اضبط arc = 80 لجعل الزاوية عند C مساوية 40°. +3. اجعل arc أكبر من 130 وpos أكبر من 0.85. تقترب C من B مع بقاء علاقة النصف بين الزاويتين. ## Intuition -تخيّل المركز O ونقطتين ثابتتين A و B على الحافة، موصولتين بـ O بضلعين كأنهما مقص. حرّك «الزاوية المركزية AOB» فيفتح هذان الضلعان وينغلقان كالمقص، وهذه هي الزاوية المركزية، القطاع البرتقالي. الآن حرّك النقطة C إلى أي مكان آخر على الحافة وانظر إلى الخطين من C إلى A وإلى B. يرسمان القطاع الأخضر، وهي الزاوية التي تراها C وهي تنظر إلى A و B. +يصل نصفا القطر OA وOB المركز O بالطرفين A وB. نسمي الزاوية بينهما زاوية مركزية. وتقع C على القوس الآخر، ويصلها الخطان CA وCB بالطرفين نفسيهما. رأس هذه الزاوية على الدائرة، ولذلك نسميها زاوية محيطية. -مهما أبعدت C على القوس البعيد، يبقى القطاع الأخضر دائمًا نصف عرض القطاع البرتقالي بالضبط. ارفع «الزاوية المركزية AOB» إلى 180° فتصبح A و B طرفي قطر واحد، فيتقلّص القطاع الأخضر إلى ربع دورة بالضبط، 90°، أيًّا كان موضع C. راقب أيضًا الخط المتقطع عند A. لا يلامس الدائرة إلا في تلك النقطة الواحدة، ويبقى دائمًا قائمًا على الضلع OA، مهما حرّكت المنزلقات الأخرى. +ثبّت A وB وحرّك C على القوس البعيد. يتغير شكل المثلث، لكن زاويته عند C تظل نصف الزاوية المركزية. موضع C شرط مهم: يجب ألا تتطابق مع A أو B، وأن تبقى على القوس المقابل. عندما يصبح AB قطرًا، تكون الزاوية المركزية مستقيمة، ونصفها 90°. ## Formal -الزاوية التي يصنعها وتر عند مركز الدائرة تساوي ضعف الزاوية التي يصنعها الوتر نفسه عند أي نقطة على القوس البعيد، أي $\angle AOB = 2\,\angle ACB$، حيث $O$ مركز الدائرة، و$A$ و$B$ و$C$ نقاط على الدائرة. +ليكن O المركز، ولتكن A وB وC نقاطًا مختلفة على الدائرة. إذا وقعت C على القوس المقابل للزاوية المركزية AOB المعروضة، فإن $\angle AOB=2\angle ACB$. وبوجه عام، قياس الزاوية المحيطية نصف قياس القوس الذي تقابله ولا يحتوي على رأسها. -تنتج عن هذا حالتان خاصتان مباشرة. عندما يكون $AB$ قطرًا، تبلغ $\angle AOB$ 180°، فتبلغ $\angle ACB$ 90° أيًّا كان موضع $C$، وهذه هي الزاوية في نصف الدائرة، وهي دائمًا قائمة. وعند أي نقطة $A$ على الدائرة يكون المماس عموديًا على نصف القطر $OA$. +إذا كان AB قطرًا، فإن $\angle ACB=90^\circ$. وتنص نظرية أخرى على أن المماس عند A عمودي على نصف القطر OA. يمس هذا المستقيم الدائرة عند A ولا يتقاطع معها في نقطة ثانية. ## Advanced -تثبت النظرية أيضًا أن كل الزوايا المحيطية القائمة على القوس نفسه متساوية، لأنها كلها تساوي نصف الزاوية المركزية نفسها، وهذا سبب انقسام زوايا الرباعي الدائري الأربع إلى زوجين متساويين. وزاوية المماس مع الوتر عند $A$ تساوي الزاوية المحيطية في القطعة المقابلة، وهي حقيقة تُستخدم لإثبات التعامد أعلاه دون حساب التفاضل. +تتساوى الزوايا المحيطية التي تقابل القوس نفسه. وإذا كوّنت أربع نقاط مختلفة رباعيًا محدبًا رؤوسه على دائرة، فإن مجموع كل زاويتين متقابلتين فيه 180°، ولا يلزم تساويهما. تقابل كل منهما أحد القوسين اللذين يكملان الدائرة، ومجموع قياسيهما 360°. ## Derivation -1. $O$ هو المركز، فـ $OA$ و$OB$ و$OC$ كلها أنصاف أقطار الدائرة نفسها، أي متساوية الطول. هذا يجعل المثلث $OAC$ متساوي الساقين، والمثلث $OBC$ متساوي الساقين أيضًا. -2. في المثلث متساوي الساقين تتساوى الزاويتان المقابلتان للضلعين المتساويين، فـ $\angle OAC = \angle OCA$ في المثلث الأول، و$\angle OBC = \angle OCB$ في الثاني. ومجموع هاتين الزاويتين القاعديتين يكوّن الزاوية $\angle ACB$ كاملة. -3. ما يتبقّى من 180° عند $O$ في كل مثلث، بعد طرح زاويتيه القاعديتين المتساويتين، يساوي بالضبط ضعف تلك الزاوية القاعدية. وجمع الجزأين الباقيين عند $O$ يعطي $\angle AOB$، وتكون النتيجة ضعف $\angle ACB$ بالضبط. +1. في الوضع المتماثل pos = 0.5، ارسم OC. المثلثان OAC وOBC متساويا الساقين، لأن أنصاف الأقطار الثلاثة متساوية. +2. سمّ الزاوية ACB بالرمز γ. يقسمها التماثل إلى زاويتين γ/2. لذلك تكون زاوية كل مثلث متساوي الساقين عند O مساوية 180° − γ. +3. مجموع الزوايا حول O هو 360°، لذا AOB = 360° − 2(180° − γ) = 2γ. يثبت ذلك الحالة المتماثلة. وللمواضع الأخرى، نمد OC ليكوّن قطرًا، ثم نجمع أو نطرح علاقات زوايا المثلثات المتساوية الساقين المناسبة، فنحصل على النتيجة نفسها. ## Real world -### الرياضة -اللاعب الباحث عن أوسع زاوية تسديد نحو المرمى يقف على الدائرة المارة بالقائمتين، حيث تعطيه نظرية الزاوية المحيطية أوسع رؤية ممكنة للفتحة بينهما. +### إنشاء زاوية قائمة -### الملاحة -قبل نظام تحديد المواقع، كان البحّارة يحدّدون موقع السفينة بقياس الزاوية بين معلمين بريين، وكل النقاط التي تعطي الزاوية نفسها تقع على دائرة واحدة، تُوجد بهذه النظرية بالضبط. +اختر طرفي قطر ونقطة ثالثة على الدائرة، ثم صل النقاط الثلاث. تكون الزاوية عند النقطة الثالثة قائمة، بشرط اختلافها عن طرفي القطر. -### الهندسة والتصميم -رسم زاوية قائمة داخل نصف دائرة أسرع طريقة للتحقق من استقامة ركن في الموقع، والحقيقة نفسها تحدّد مقاسات مقاييس وكامات يجب أن تدور بزاوية قائمة تمامًا. +### المحل الهندسي -### الفلك -خط النظر من مبنى مرتفع نحو الأفق يكون مماسًا لسطح الأرض، فيلتقي نصف قطرها عند تلك النقطة بزاوية قائمة، وهذه هي الهندسة التي تُحسب بها المسافة التي تراها من ارتفاع معيّن. +لطرفين ثابتين وزاوية رؤية محددة، تقع مواضع الرؤية الممكنة على أقواس دائرية. يجب اختيار القوس الصحيح للحفاظ على تلك الزاوية، لا على الزاوية المكملة لها إلى 180°. diff --git a/content/lessons/geometry/circle-theorems/en.md b/content/lessons/geometry/circle-theorems/en.md index 83044c25..dd0e0ce8 100644 --- a/content/lessons/geometry/circle-theorems/en.md +++ b/content/lessons/geometry/circle-theorems/en.md @@ -1,69 +1,62 @@ --- title: Circle theorems -summary: >- - Stand anywhere on the rim of a circle and look at the same two points — your - viewing angle never changes, and it is always exactly half the angle those - two points make at the centre. +summary: 'Compare angles standing on the same arc, and see why an angle opposite a diameter is a right angle.' parameters: - arc: arc — central angle AOB - pos: pos — point C's place on the far arc + arc: 'arc — central angle AOB in degrees' + pos: 'pos — C along the far arc, from near A (0) toward B (1)' variables: - - the centre of the circle - - one end of the chord, fixed - - the other end of the chord, fixed - - a point you drag around the far arc + - 'O: centre of the circle' + - 'A: fixed endpoint on the circle' + - 'B: endpoint moved by the arc control' + - 'C: point on the far arc; drag it or change pos' --- ## Try it -1. Drag the slider «arc — central angle AOB». The orange wedge at the centre and the green wedge at C both grow, but C's angle is always half the centre's. -2. Drag «pos — point C's place on the far arc» all the way from one side to the other. The green angle at C does not change at all, even though C moves a long way. -3. Push «arc» to its maximum, 180°. Now A and B sit at opposite ends of a diameter, and the green angle at C locks onto exactly 90° — no matter where C is. The dashed line at A stays perpendicular to the radius OA the whole time: that line is the tangent. +1. Set arc = 100 and pos = 0.5. The central angle is 100° and the angle at C is 50°. +2. Keep arc = 100 and move pos from 0.05 to 0.95. C stays on the opposite arc, and its angle remains 50°. +3. Set arc = 180. AB is now a diameter and the angle at C is 90°. The dashed tangent at A is perpendicular to OA throughout. ## Real-life examples -1. **Lighthouse fix.** Sailors once measured the angle between two lighthouses from the ship with a sextant; every ship on the same circular path through the lighthouses reads the same angle, which is exactly half the angle the lighthouses make at that circle's centre. -2. **Carpenter's right-angle test.** Draw a semicircle over a board's straight edge. Any point you mark on the curve sees the two ends of that edge at a right angle — a quick way to check a corner without a set square. -3. **Panorama framing.** A photographer walking along an arc so a monument keeps filling the same width in every shot is really keeping the inscribed angle constant. +1. **A fixed viewing angle.** With arc = 100 and pos = 0.5, the lines from C to two marked points A and B form 50°. Moving C along the same far arc preserves that angle. +2. **Constructing a right triangle.** With arc = 180 and pos = 0.5, the diameter AB and any third point C on the open semicircle form a right triangle. +3. **Moving off the middle.** With arc = 60 and pos = 0.8, C is nearer B, but the angle ACB remains 30°. The two distances from C to the endpoints need not be equal. ## Test yourself -1. Set the central angle so that point C sees a right angle. -2. Set the central angle to 80°, so C's angle reads exactly 40°. -3. Push the central angle above 130° and drag C close to B; check that the angle at C still matches half of «arc». +1. Choose arc so that the angle at C is 90°. +2. Set arc = 80 to make the angle at C equal 40°. +3. Make arc greater than 130 and pos greater than 0.85, placing C near B while preserving the half-angle relationship. ## Intuition -Picture the centre O and two fixed points A and B on the rim, joined to O by two spokes. Drag «arc» and those two spokes open and close like scissors — that is the central angle, the orange wedge. Now drag point C anywhere else on the rim and look at the lines from C to A and to B: they trace out the green wedge, the angle C sees looking at A and B. +The centre O sees endpoints A and B through the two radii OA and OB. Their angle is the central angle. Point C lies on the other arc of the circle and sees the same endpoints through CA and CB. This angle has its vertex on the circle, so it is called an inscribed angle. -However far you drag C around the far arc, the green wedge stays exactly half the width of the orange one. Push «arc» up to 180° and A, B become opposite ends of a diameter — the green wedge shrinks to exactly a quarter turn, 90°, wherever C sits. Watch the dashed line at A too: it only ever touches the circle at that one point, and it always stands at a right angle to the spoke OA, however you move the other sliders. +Hold A and B fixed and move C along that far arc. The triangle changes shape, but its angle at C stays equal to half the central angle. The condition on C matters: it must stay distinct from A and B and on the opposite arc. When AB becomes a diameter, half of the straight central angle is 90°. ## Formal -The angle a chord subtends at the centre is twice the angle it subtends at any point on the far arc: $\angle AOB = 2\,\angle ACB$, where $O$ is the centre and $A$, $B$, $C$ lie on the circle. +Let O be the centre, with A, B and C distinct points on the circle. If C lies on the arc opposite the central angle AOB shown here, then $\angle AOB=2\angle ACB$. More generally, an inscribed angle measures half the intercepted arc that does not contain its vertex. -Two special cases follow directly. When $AB$ is a diameter, $\angle AOB$ measures 180°, so $\angle ACB$ measures 90° for every position of $C$ — the angle in a semicircle is a right angle. And at any point $A$ on the circle, the tangent line is perpendicular to the radius $OA$. +If AB is a diameter, then $\angle ACB=90^\circ$. A separate circle theorem states that the tangent at A is perpendicular to the radius OA. The tangent touches the circle at A and has no second intersection with it. ## Advanced -The theorem also proves that every inscribed angle standing on the same arc is equal, since they all equal half the same central angle — this is why the four angles of a cyclic quadrilateral split into two equal pairs. The tangent-chord angle at $A$ equals the inscribed angle in the alternate segment, a fact used to prove the perpendicularity above without calculus. +Angles standing on the same arc are equal. If four distinct points form a convex cyclic quadrilateral, opposite angles add to 180°, rather than being equal in general. Each opposite angle intercepts one of the two complementary arcs, whose measures add to 360°. ## Derivation -1. $O$ is the centre, so $OA$, $OB$ and $OC$ are all radii of the same circle — equal in length. That makes triangle $OAC$ isosceles, and triangle $OBC$ isosceles too. -2. In an isosceles triangle the two angles opposite the equal sides match, so $\angle OAC = \angle OCA$ in the first triangle and $\angle OBC = \angle OCB$ in the second. Together those two base angles make up the whole of $\angle ACB$. -3. What's left of 180° at $O$ in each triangle, once its two equal base angles are taken out, is exactly twice that triangle's base angle. Adding both leftover pieces at $O$ gives $\angle AOB$, and it comes to exactly twice $\angle ACB$. +1. For the symmetric position pos = 0.5, draw OC. The triangles OAC and OBC are isosceles because all three radii are equal. +2. Let the angle ACB be γ. Symmetry splits it into two angles γ/2. Each isosceles triangle therefore has angle 180° − γ at O. +3. The angles around O total 360°, so AOB = 360° − 2(180° − γ) = 2γ. This proves the symmetric case. For other positions, extending OC to a diameter and adding or subtracting the corresponding isosceles-triangle angle relations gives the same result. ## Real world -### Sports -A striker looking for the widest shooting angle on goal is standing on the circle through both goalposts where the inscribed angle theorem gives the largest possible view of the gap. +### Constructing a right angle -### Navigation -Before GPS, sailors fixed a ship's position by measuring the angle between two landmarks; every point giving that same angle lies on one circle, found using exactly this theorem. +Choose the endpoints of a diameter and a third point on the circle. Joining the three gives a right angle at that third point, provided it differs from the endpoints. -### Engineering and design -A right angle drawn inside a semicircle is the quickest way to test a square corner on site, and the same fact sizes gauges and cams that must swing through a true 90°. +### Loci in geometry -### Astronomy -The line of sight from a tall building to the horizon is tangent to the Earth, so it meets the Earth's radius at that point at a right angle — the geometry used to work out how far you can see from a height. +For two fixed endpoints and a fixed angle, possible observation points lie on circular arcs. Points must be chosen on the correct arc to preserve that angle rather than its supplement. diff --git a/content/lessons/geometry/circle-theorems/lesson.yaml b/content/lessons/geometry/circle-theorems/lesson.yaml index 8c4bdbda..1231fe0a 100644 --- a/content/lessons/geometry/circle-theorems/lesson.yaml +++ b/content/lessons/geometry/circle-theorems/lesson.yaml @@ -33,9 +33,9 @@ variables: - B - C derivation: -- \text{OA = OB = OC = r, so triangle OAC and triangle OBC are both isosceles} -- \text{the base angles of an isosceles triangle are equal, so } \angle OAC=\angle OCA \text{ and } \angle OBC=\angle OCB -- \angle AOB = 2\,\angle ACB \text{ follows once the two triangles' angles at } O \text{ are added together} + - '\text{at pos = 0.5, draw OC; OA = OB = OC, so OAC and OBC are isosceles}' + - '\angle ACB=\gamma,\quad \angle ACO=\angle OCB=\gamma/2,\quad \angle AOC=\angle COB=180^\circ-\gamma' + - '\angle AOB=360^\circ-2(180^\circ-\gamma)=2\gamma\quad\text{(symmetric case)}' charts: [] primary: arc presets: From d7bf34e3186241bb5bb05f7ff0207ca7f5fe7df1 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:01:31 +0300 Subject: [PATCH 031/124] content: rewrite congruence-and-similarity for first-time learners in both languages --- .../geometry/congruence-and-similarity/ar.md | 60 +++++++++--------- .../geometry/congruence-and-similarity/en.md | 62 +++++++++---------- 2 files changed, 58 insertions(+), 64 deletions(-) diff --git a/content/lessons/geometry/congruence-and-similarity/ar.md b/content/lessons/geometry/congruence-and-similarity/ar.md index d99b75f6..f6929a46 100644 --- a/content/lessons/geometry/congruence-and-similarity/ar.md +++ b/content/lessons/geometry/congruence-and-similarity/ar.md @@ -1,65 +1,63 @@ --- title: التطابق والتشابه -summary: >- - شكلان متشابهان: الشكل نفسه بحجمين. بهذا تقيس عصا قصيرة ارتفاع شجرة. +summary: 'قارن الأطوال المتناظرة لتميّز بين نسخة مكبّرة أو مصغّرة، ونسخة لها الشكل والحجم نفسيهما.' parameters: - sun: زاوية الشمس - hStick: ارتفاع العصا - hTree: ارتفاع الشجرة + sun: 'sun — زاوية ارتفاع الشمس عن الأرض المستوية بالدرجات' + hStick: 'hStick — ارتفاع العصا المرجعية بالمتر' + hTree: 'hTree — ارتفاع الشجرة بالمتر' variables: - - ارتفاع العصا - - طول ظل العصا - - ارتفاع الشجرة - - طول ظل الشجرة + - 'h₁: ارتفاع العصا' + - 's₁: طول ظل العصا' + - 'h₂: ارتفاع الشجرة' + - 's₂: طول ظل الشجرة' --- ## Try it -1. اسحب رأس المثلث البرتقالي الصغير لتغيير ارتفاع العصا. يمتد ظلها (قاعدة المثلث) أو يقصر تبعًا لذلك. -2. اسحب رأس المثلث الأزرق الكبير لتغيير ارتفاع الشجرة، وراقب ظلها يفعل الشيء نفسه، متوافقًا دومًا مع ظل العصا. -3. ارفع «hTree» حتى يساوي «hStick» تمامًا. يصبح المثلثان متطابقين، لا متشابهين في الشكل فقط بل متساويين في الحجم أيضًا. +1. اضبط sun = 40 وhStick = 1.2 وhTree = 6. ارتفاع الشجرة خمسة أمثال ارتفاع العصا، وطول ظلها خمسة أمثال طول ظل العصا. +2. ثبّت الارتفاعين واجعل sun = 60. يقصر الظلان، لكن نسبتهما تظل 5، رغم تغير نسبة الارتفاع إلى الظل لكل منهما. +3. اضبط hStick = 1.5 وhTree = 1.5. يصبح للمثلثين الشكل والحجم نفسيهما، فيكونان متطابقين. ## Real-life examples -1. **عصا طولها 1.2 م عند الظهيرة.** والشمس على ارتفاع 40° فوق الأفق، تلقي العصا ظلًا طوله 1.4 م، وتلقي شجرة قريبة ارتفاعها 6 م ظلًا بالنسبة نفسها بالضبط. -2. **عصر يوم متأخر وشجرة طويلة.** والشمس منخفضة عند 60°، تشترك عصا قصيرة طولها 1 م وشجرة طولها 10 م في نسبة الارتفاع إلى الظل نفسها، مهما طال الظلان. -3. **سارية علمين متساويتين.** عصا طولها 1.5 م بجانب عمود طوله 1.5 م: الارتفاع نفسه، والظل نفسه، والزاوية نفسها، فالمثلثان هنا متطابقان لا متشابهان فقط. +1. **تكبير خمسة أمثال.** عند sun = 40°، يكون ظل عصا ارتفاعها 1.2 م نحو 1.43 م، وظل شجرة ارتفاعها 6 م نحو 7.15 م. ضُرب كل من الارتفاع وطول الظل في 5. +2. **زاوية شمس أعلى.** عند sun = 60°، يكون ظل عصا ارتفاعها 1 م نحو 0.58 م، وظل شجرة ارتفاعها 10 م نحو 5.77 م. معامل التشابه بين المثلثين 10. +3. **ارتفاعان متساويان.** عند sun = 25°، يلقي جسمان ارتفاع كل منهما 1.5 م ظلين طول كل منهما نحو 3.22 م. المثلثان متطابقان رغم أن نسبة الارتفاع إلى الظل ليست 1. ## Test yourself -1. اجعل مثلث العصا ومثلث الشجرة متطابقين. +1. اجعل الارتفاعين متساويين. يقبل الفاحص فرقًا أقل من 0.05 م لمطابقة حجمي المثلثين. 2. اجعل ظل الشجرة أطول من 15 م. -3. اضبط زاوية الشمس بحيث يساوي الارتفاع مقسومًا على الظل الرقم 2 بالضبط. +3. اضبط sun لتصبح نسبة الارتفاع إلى طول الظل قريبة من 2 قدر ما تسمح به أداة الزاوية. ## Intuition -مثلثان متشابهان حين يكون أحدهما نسخة مكبّرة أو مصغّرة من الآخر. الزوايا نفسها، والشكل نفسه، لكن الحجم يختلف. العصا والشجرة هنا كلتاهما مثلث قائم الزاوية يقف على الأرض المستوية نفسها، وتضيئه الشمس نفسها، فزاوية سقوط الشمس على الأرض واحدة بالنسبة لكلتيهما. هذه الزاوية المشتركة، مع الزاوية القائمة حيث يلتقي كل جسم بالأرض، تكفي لضمان أن المثلثين لهما الشكل نفسه، مهما اختلف حجما العصا والشجرة. +للأشكال المتشابهة زوايا متناظرة متساوية وأطوال متناظرة متناسبة. هنا يشكل الجسم الرأسي وظله على أرض مستوية وشعاع الشمس مثلثًا قائمًا. نفترض أن أشعة الشمس الواصلة إلى الجسمين متوازية. يشترك المثلثان في زاوية الشمس والزاوية القائمة، ولذلك لهما الشكل نفسه. -أما «متطابق» فكلمة أدقّ. فلا يكون الشكلان متطابقين إلا إذا كانا متشابهين وبالحجم نفسه معًا، بحيث تستطيع أن ترفع أحدهما وتضعه فوق الآخر تمامًا. ارفع «hTree» حتى يساوي «hStick» فترى القراءة تتحول من «متشابهان» إلى «متطابقان»، لأن مثلث الشجرة الآن لا يشبه مثلث العصا في الشكل فحسب بل يطابقه تمامًا. +إذا كان ارتفاع الشجرة خمسة أمثال ارتفاع العصا، كان مثلثها تكبيرًا بمعامل 5، فيصبح ظلها خمسة أمثال ظل العصا أيضًا. أما الشكلان المتطابقان فيتساويان في الحجم كذلك؛ أي يكون معامل التشابه 1. هذه مقارنة بين المثلثين، ولا تعني أن ارتفاع المثلث الواحد يجب أن يساوي طول ظله. ## Formal -يتشابه مثلثان حين تتساوى زواياهما المتناظرة، وهذا يفرض على أضلاعهما المتناظرة أن تشترك في نسبة واحدة، أي $\dfrac{h_1}{s_1} = \dfrac{h_2}{s_2}$، حيث $h$ ارتفاع و$s$ ظله. +للمثلثين المتشابهين، لتكن $h_1,s_1$ ارتفاع العصا وطول ظلها، ولتكن $h_2,s_2$ ارتفاع الشجرة وطول ظلها. معامل التشابه هو $k=h_2/h_1=s_2/s_1$. ويمكن كتابة العلاقة أيضًا $h_1/s_1=h_2/s_2$، ومنها $h_2=h_1s_2/s_1$. جميع الأطوال موجبة. -ويكونان متطابقين حين تساوي تلك النسبة الواحد أيضًا. فكل ضلع متناظر يساوي الآخر بالطول تمامًا، لا بالتناسب فقط. +يتطابق المثلثان عند $k=1$، أي عندما تتساوى الأضلاع المتناظرة. أما النسبة داخل المثلث $h_1/s_1$ فتعتمد على زاوية الشمس؛ تساوي ظل تلك الزاوية، ولا يلزم أن تساوي 1 كي يتطابق المثلثان. ## Advanced -اختبار التشابه هذا («زاوية-زاوية») واحد من عدة اختبارات. فيتحقق تشابه «ضلع-ضلع-ضلع» من تطابق النسب بين الأضلاع الثلاثة كلها، ويتحقق تشابه «ضلع-زاوية-ضلع» من زاوية واحدة متساوية محصورة بين ضلعين بالنسبة نفسها. وللتطابق قائمة موازية خاصة به: ضلع-ضلع-ضلع، وضلع-زاوية-ضلع، وزاوية-ضلع-زاوية، وكل منها أقل مجموعة قياسات تحدد المثلث بالكامل. +يكفي تساوي زاويتين متناظرتين لإثبات تشابه مثلثين. ويمكن إثبات التشابه أيضًا بتناسب الأضلاع الثلاثة، أو بتناسب ضلعين وتساوي الزاوية المحصورة بينهما. أما اختبارات التطابق فتستخدم أطوالًا متساوية وزوايا مناسبة متساوية. تسمح عبارة التطابق في العرض بفارق عددي صغير، لكن التطابق الدقيق يشترط تساوي الأطوال. ## Derivation -1. أشعة الشمس متوازية، فتسقط على العصا والشجرة بالزاوية نفسها فوق الأرض. -2. لكل من المثلثين أيضًا زاوية قائمة حيث يلتقي الجسم بالأرض، فيتشابه المثلثان: الشكل نفسه، وأضلاعهما المتناظرة بنسبة واحدة ثابتة. -3. كتابة تلك النسبة ارتفاعًا على ظل لكل جسم، ثم الضرب التبادلي، يعطيان ارتفاع الشجرة من ظلين مقيسين فقط. +1. تصنع أشعة الشمس المتوازية زوايا متساوية مع الأرض المستوية نفسها. +2. يلتقي كل جسم رأسي بالأرض بزاوية قائمة أيضًا. تساوي زاويتين يجعل المثلثين متشابهين. +3. تشترك الارتفاعات والأظلال المتناظرة في معامل تشابه واحد. بإعادة ترتيب النسب نحصل على ارتفاع الشجرة = ارتفاع العصا × ظل الشجرة ÷ ظل العصا. ## Real world -### المساحة في العصور القديمة -يُقال إن طاليس المِلطي قاس ارتفاع الهرم الأكبر بهذه الطريقة، مقارنًا ظله بظل عصا معلومة الطول، دون أن يتسلقه أبدًا. +### تقدير ارتفاع يصعب قياسه مباشرة -### التصوير والخرائط -تُسقط عدسة الكاميرا نسخة مشابهة (مصغّرة) من المشهد على الحساس، والخريطة الورقية نسخة مشابهة من الأرض التي تمثلها، وكلتاهما تعتمد على بقاء كل زاوية متناظرة كما هي. +قس ارتفاع جسم رأسي مرجعي وطول ظله وظل الجسم الآخر، على الأرض المستوية نفسها وفي الوقت نفسه. يعطي التشابه الارتفاع المجهول عندما يناسب الموقف افتراض الأشعة المتوازية. -### التصنيع -حين يفحص فني آلة قطعة مقارنة برسم هندسي، يختبر التطابق لا التشابه فقط. فيجب أن تطابق القطعة قياسات الرسم بالضبط، لا أن تشاركه النِّسب فحسب. +### الرسوم بمقياس + +يحافظ رسم شكل مستوٍ بمقياس موحد على زواياه، ويضرب جميع أطواله في معامل واحد. المعامل 2 يضاعف الأطوال ويجعل المساحات أربعة أمثالها، والمعامل 1 يعطي نسخة متطابقة. diff --git a/content/lessons/geometry/congruence-and-similarity/en.md b/content/lessons/geometry/congruence-and-similarity/en.md index 7e90431a..06a89a4f 100644 --- a/content/lessons/geometry/congruence-and-similarity/en.md +++ b/content/lessons/geometry/congruence-and-similarity/en.md @@ -1,67 +1,63 @@ --- title: Congruence and similarity -summary: >- - Two shapes are similar if they're the same shape at different sizes, and - congruent if they're also the same size — a rule that lets a 1.2 m stick - measure a tree without anyone climbing it. +summary: 'Compare corresponding lengths to distinguish a scaled copy from a copy with the same size and shape.' parameters: - sun: sun angle - hStick: stick height - hTree: tree height + sun: 'sun — sunlight angle above level ground, in degrees' + hStick: 'hStick — reference stick height in metres' + hTree: 'hTree — tree height in metres' variables: - - the stick's height - - the length of the stick's shadow - - the tree's height - - the length of the tree's shadow + - 'h₁: stick height' + - 's₁: stick shadow length' + - 'h₂: tree height' + - 's₂: tree shadow length' --- ## Try it -1. Drag the tip of the small orange triangle to change the stick's height. Its shadow (the base of the triangle) stretches or shrinks to match. -2. Drag the tip of the big blue triangle to change the tree's height, and watch its shadow do the same thing, always in step with the stick's. -3. Raise "hTree" until it matches "hStick" exactly. The two triangles become congruent — not just the same shape, but the same size too. +1. Set sun = 40, hStick = 1.2 and hTree = 6. The tree is five times as tall, and its shadow is five times as long. +2. Keep both heights fixed and set sun = 60. Both shadows shorten. Their ratio remains 5 even though each height-to-shadow ratio changes. +3. Set hStick = 1.5 and hTree = 1.5. The two triangles now have the same size and shape, so they are congruent. ## Real-life examples -1. **A 1.2 m stick at midday.** With the sun 40° above the horizon, the stick casts a 1.4 m shadow, and a 6 m tree nearby casts a shadow of exactly the same ratio. -2. **Late afternoon, a tall tree.** With the sun low at 60°, a short 1 m stick and a 10 m tree still share the same height-to-shadow ratio, however long the shadows stretch. -3. **Two equal flagpoles.** A 1.5 m stick next to a 1.5 m post: same height, same shadow, same angle — the two triangles are congruent, not merely similar. +1. **A fivefold enlargement.** At sun = 40°, a 1.2 m stick casts a shadow about 1.43 m long. A 6 m tree casts one about 7.15 m long: both height and shadow are multiplied by 5. +2. **A higher sun angle.** At sun = 60°, a 1 m stick casts a shadow about 0.58 m long, and a 10 m tree casts one about 5.77 m long. The scale factor between the triangles is 10. +3. **Equal heights.** At sun = 25°, two objects of height 1.5 m both cast shadows about 3.22 m long. Their triangles are congruent even though height divided by shadow is not 1. ## Test yourself -1. Make the stick's triangle and the tree's triangle congruent. +1. Make the two heights equal, or less than 0.05 m apart for the checker, to match the triangles' sizes. 2. Make the tree's shadow longer than 15 m. -3. Set the sun's angle so that height divided by shadow equals exactly 2. +3. Adjust sun so that height divided by shadow is as close to 2 as the angle control allows. ## Intuition -Two triangles are similar when one is a scaled copy of the other — same angles, same shape, just bigger or smaller. The stick and the tree here are both right triangles standing on the same flat ground, lit by the same sun, so the angle the sunlight makes with the ground is identical for both. That one shared angle, plus the right angle where each object meets the ground, is enough to guarantee the two triangles have the same shape, no matter how different the stick and the tree are in size. +Similar shapes have matching angles and proportional corresponding lengths. Here a vertical object, its shadow on level ground, and a sunlight ray form a right triangle. We assume parallel sunlight rays for both objects. The triangles share the sunlight angle and the right angle, so they have the same shape. -Congruent is a stricter word: two shapes are congruent only when they are similar *and* the same size — you could pick one up and lay it exactly on top of the other. Drag "hTree" up until it equals "hStick" and you'll see the readout switch from "similar" to "congruent", because now the tree's triangle isn't just shaped like the stick's, it matches it exactly. +If the tree is five times as tall as the stick, its triangle is a fivefold enlargement, so its shadow is five times as long too. Congruent shapes also have the same size: their scale factor is 1. That compares one triangle with the other. It does not mean that a triangle's own height and shadow must be equal. ## Formal -Two triangles are similar when their corresponding angles are equal, which forces their corresponding sides to share one common ratio: $\dfrac{h_1}{s_1} = \dfrac{h_2}{s_2}$, where $h$ is a height and $s$ its shadow. +For these similar triangles, let $h_1,s_1$ be the stick's height and shadow, and $h_2,s_2$ the tree's. Their scale factor is $k=h_2/h_1=s_2/s_1$. Equivalently, $h_1/s_1=h_2/s_2$, so $h_2=h_1s_2/s_1$. All lengths are positive. -They are congruent when, in addition, that ratio equals 1 — every corresponding side has exactly the same length, not just the same proportion. +The triangles are congruent when $k=1$, meaning corresponding sides are equal. The internal ratio $h_1/s_1$ instead depends on the sun angle. It equals the tangent of that angle and need not be 1 for congruence. ## Advanced -This "AA" similarity test (two equal angles force similarity) is one of several: SSS similarity checks that all three side ratios match, and SAS similarity checks one equal angle sandwiched between two sides in the same ratio. Congruence has its own parallel list — SSS, SAS, ASA — each a minimal set of measurements that pins a triangle down completely. +For triangles, two equal corresponding angles establish similarity (AA). Other tests use three proportional side lengths (SSS), or two proportional sides with the included angle equal (SAS). Congruence tests instead use equal side lengths and suitable equal angles. In the display, the congruence label allows a small numerical tolerance; exact congruence requires equal lengths. ## Derivation -1. The sun's rays are parallel, so they meet the stick and the tree at the same angle above the ground. -2. Both triangles also have a right angle where the object meets the ground, so the two triangles are similar: the same shape, with corresponding sides in one fixed ratio. -3. Writing that ratio as height over shadow for each object and cross-multiplying finds the tree's height from two measured shadows. +1. Parallel sunlight rays make equal angles with the same level ground. +2. Each vertical object also meets the ground at a right angle. Two matching angles make the triangles similar. +3. Corresponding heights and shadows share a scale factor. Rearranging their ratios gives tree height = stick height × tree shadow ÷ stick shadow. ## Real world -### Ancient surveying -Thales of Miletus is said to have measured the height of the Great Pyramid this way — comparing its shadow to the shadow of a stick of known height, without ever climbing it. +### Estimating an inaccessible height -### Photography and maps -A camera lens projects a similar (scaled-down) copy of the scene onto the sensor, and a paper map is a similar copy of the land it shows, both relying on every corresponding angle staying the same. +Measure a vertical reference object's height and both shadows on the same level ground at the same time. Similarity gives the unknown height when the parallel-ray model is suitable. -### Manufacturing -A machinist checking a part against a technical drawing tests for congruence, not just similarity — the part must match the drawing's measurements exactly, not merely have the same proportions. +### Scale drawings + +A flat object's uniformly scaled drawing preserves angles and multiplies all lengths by one factor. A factor of 2 doubles lengths and quadruples areas; a factor of 1 gives a congruent copy. From 7e7c16c2b4ba034413903dff73e6b88ee65bbc75 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:01:31 +0300 Subject: [PATCH 032/124] content: rewrite coordinate-geometry for first-time learners in both languages --- .../geometry/coordinate-geometry/ar.md | 67 +++++++++--------- .../geometry/coordinate-geometry/en.md | 69 +++++++++---------- 2 files changed, 62 insertions(+), 74 deletions(-) diff --git a/content/lessons/geometry/coordinate-geometry/ar.md b/content/lessons/geometry/coordinate-geometry/ar.md index ad347407..3d79b115 100644 --- a/content/lessons/geometry/coordinate-geometry/ar.md +++ b/content/lessons/geometry/coordinate-geometry/ar.md @@ -1,70 +1,65 @@ --- title: الهندسة الإحداثية -summary: >- - نقطتان على الخريطة تكفيان لمعرفة المسافة بينهما ونقطة المنتصف ومعادلة الطريق. +summary: 'استخدم إحداثيات نقطتين لحساب المسافة بينهما ومنتصفهما وميل المستقيم المار بهما.' parameters: - x1: النقطة الأولى، x - y1: النقطة الأولى، y - x2: النقطة الثانية، x - y2: النقطة الثانية، y + x1: 'x1 — الإحداثي الأفقي للنقطة الأولى' + y1: 'y1 — الإحداثي الرأسي للنقطة الأولى' + x2: 'x2 — الإحداثي الأفقي للنقطة الثانية' + y2: 'y2 — الإحداثي الرأسي للنقطة الثانية' variables: - - إحداثي x للنقطة الأولى - - إحداثي y للنقطة الأولى - - إحداثي x للنقطة الثانية - - إحداثي y للنقطة الثانية - - المسافة المستقيمة بين النقطتين + - 'x₁: الموضع الأفقي للنقطة الأولى' + - 'y₁: الموضع الرأسي للنقطة الأولى' + - 'x₂: الموضع الأفقي للنقطة الثانية' + - 'y₂: الموضع الرأسي للنقطة الثانية' + - 'd: المسافة المستقيمة؛ تمثل كل وحدة على الشبكة 1 كم' --- ## Try it -1. اسحب النقطة البرتقالية. تتغيّر قراءات المسافة ونقطة المنتصف والميل فورًا مع كل حركة. -2. اسحب النقطة الزرقاء إلى الأعلى مباشرة، مع إبقاء x ثابتًا. راقب الميل يزداد والخط المتقطع يصبح أكثر انحدارًا. -3. اجعل النقطتين على الإحداثي y نفسه. يهبط الميل إلى صفر بالضبط، أي طريق مستوٍ متجه شرقًا. +1. اضبط (x1, y1) = (1, 1) و(x2, y2) = (5, 4). اقرأ مسافة 5 كم، ومنتصفًا عند (3, 2.5)، وميلًا يساوي 0.75. +2. أبقِ x2 = 5 وغيّر y2 إلى 8. يظل التغير الأفقي 4، ويصبح التغير الرأسي 7، لذا الميل 7/4 = 1.75. +3. اضبط y1 = y2 = 8، مع x1 = 1 وx2 = 5. يكون المستقيم أفقيًا وميله صفرًا. ثم اجعل x2 = x1 وy2 = 4 لمقارنته بمستقيم رأسي، ميله غير معرّف. ## Real-life examples -1. **من البيت إلى المدرسة.** البيت عند (1, 1) والمدرسة عند (5, 4) على شبكة كل مربع فيها كيلومتر واحد، فالمسافة المستقيمة بينهما 5 كم بالضبط، وحافلة المدرسة تسلك الخط المتقطع بينهما. -2. **طريق متجه شرقًا تمامًا.** محطتان عند (2, 8) و(9, 8) تشتركان في الإحداثي y نفسه، فالطريق بينهما مستوٍ، ميله صفر ومعادلته ببساطة y = 8. -3. **مسار جبلي حاد الانحدار.** من (0, 0) إلى (6, 8)، يصعد المسار 8 كم مقابل كل 6 كم شرقًا، أي عشرة كيلومترات من المسافة المستقيمة إجمالًا. +1. **موقعان على خريطة مستوية.** تختلف (1, 1) و(5, 4) بمقدار 4 كم أفقيًا و3 كم رأسيًا على هذه الشبكة. المسافة المستقيمة بينهما 5 كم، وقد يكون طريق السير أطول. +2. **قطعة تمتد شرقًا وغربًا.** تبعد (2, 8) و(9, 8) مسافة 7 كم. منتصفهما (5.5, 8)، ومعادلة مستقيمهما y = 8. +3. **قطر أطول.** تبعد (0, 0) و(6, 8) مسافة 10 كم. منتصفهما (3, 4)، والميل 8/6 = 4/3. الاتجاه الرأسي على الخريطة لا يعني بالضرورة ارتفاعًا عن سطح الأرض. ## Test yourself -1. ضع النقطتين على بعد 5 كم بالضبط من بعضهما. -2. اجعل نقطة المنتصف تقع عند (4, 4). -3. اجعل ميل الخط 2 بالضبط. +1. ضع النقطتين بحيث تكون المسافة المستقيمة بينهما 5 كم. +2. اجعل نقطة المنتصف عند (4, 4). +3. أبقِ x1 وx2 مختلفتين، واجعل الميل يساوي 2. ## Intuition -تخيّل مدينتين مرسومتين على خريطة شبكية، كل مربع فيها يساوي كيلومترًا واحدًا. اسحب النقطة البرتقالية وستجد الخط المستقيم المتقطع الذي يصلها بالنقطة الزرقاء يميل ويتمدد، بينما تخبرك قراءة «المسافة» بالضبط كم تبعد إحداهما عن الأخرى كخط الطير، لا عبر أي طريق، بل الخط المستقيم بين النقطتين فقط. +يسجل الزوج الإحداثي الموضع الأفقي أولًا والرأسي ثانيًا. من (1, 1) إلى (5, 4)، نتغير 4 وحدات أفقيًا و3 رأسيًا. يشكل هذان التغيران ضلعي مثلث قائم، ووتره القطعة المستقيمة بين النقطتين. طولها 5 وفق نظرية فيثاغورس. -تحدد النقطة الخضراء نقطة المنتصف، وتقع في منتصف الطريق المستقيم بين المدينتين بالضبط. خذ متوسط الإحداثيين x ومتوسط الإحداثيين y كل على حدة، وهناك تقع النقطة. أما الخط المتقطع نفسه فهو طريق كامل لا مجرد القطعة بين المدينتين. يستمر في الاتجاهين، وانحداره هو الميل، أي كم كيلومترًا يصعد مقابل كل كيلومتر يقطعه شرقًا. +لإيجاد المنتصف، نأخذ متوسط الإحداثيين الأفقيين، ثم متوسط الإحداثيين الرأسيين. ولإيجاد الميل، نقسم التغير الرأسي على التغير الأفقي. تصل القطعة المتصلة النقطتين، ويمتد الخط المتقطع عبرهما. اجعل النقطتين مختلفتين عند دراسة هذا المستقيم؛ فموقع واحد لا يحدد مستقيمًا وحيدًا. ## Formal -المسافة بين نقطتين $(x_1, y_1)$ و$(x_2, y_2)$ هي $d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$، ونقطة منتصفهما هي $\left(\dfrac{x_1+x_2}{2}, \dfrac{y_1+y_2}{2}\right)$. +للنقطتين $(x_1,y_1)$ و$(x_2,y_2)$ في إحداثيات ديكارتية متعامدة تستخدم الوحدة نفسها على المحورين، تكون المسافة $d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$. ونقطة المنتصف هي $((x_1+x_2)/2,(y_1+y_2)/2)$. -للخط المار بهما ميل $m = \dfrac{y_2-y_1}{x_2-x_1}$ (وهو غير معرّف حين $x_1 = x_2$، أي خط رأسي)، ويمكن كتابة معادلته $y - y_1 = m(x - x_1)$. +إذا كان $x_1\ne x_2$، فإن الميل $m=(y_2-y_1)/(x_2-x_1)$، ومعادلة المستقيم $y-y_1=m(x-x_1)$. أما نقطتان مختلفتان لهما الإحداثي الأفقي نفسه فتحددان المستقيم الرأسي $x=x_1$، وميله غير معرّف. المسافة بين نقطتين متطابقتين صفر، لكنهما لا تحددان مستقيمًا وحيدًا. ## Advanced -تمتد صيغة المسافة نفسها إلى ثلاثة أبعاد بإضافة حد $(z_2-z_1)^2$ تحت الجذر، وإلى أي عدد من الأبعاد في علم البيانات، حيث «المسافة» بين صفّين من الأرقام، لا نقطتين على خريطة، هي هذه الصيغة نفسها مطبّقة على إحداثيات كثيرة دفعة واحدة. +في ثلاثة إحداثيات متعامدة، نضيف مربع الفرق بين إحداثيي z تحت الجذر. وإذا كانت البيانات تستخدم وحدات غير مرتبطة، مثل الطول ودرجة الحرارة، فإن اختيار مقياس للمسافة يحتاج إلى تحديد وزن كل إحداثي أو مقياسه. وخطا العرض والطول زاويتان على سطح منحنٍ؛ فلا نعوضهما كإحداثيات عادية بالكيلومتر دون تحويل أو نموذج مناسب. ## Derivation -1. الفجوة الأفقية بين النقطتين هي x₂ ناقص x₁، والفجوة الرأسية هي y₂ ناقص y₁، وهما ضلعا مثلث قائم الزاوية. -2. بنظرية فيثاغورس تكون المسافة المستقيمة هي وتر ذلك المثلث: d² تساوي (x₂ ناقص x₁)² زائد (y₂ ناقص y₁)². -3. أخذ الجذر التربيعي لطرفي المعادلة يعطي المسافة نفسها. +1. نحسب الإزاحتين الأفقية والرأسية بطرح الإحداثيات. تمثل قيمتاهما المطلقتان ضلعي مثلث قائم عندما لا تساوي أي منهما صفرًا. +2. يزيل التربيع الإشارات، وتعطي نظرية فيثاغورس مربع المسافة المستقيمة بوصفه مجموع مربعي الفرقين. +3. نأخذ الجذر التربيعي غير السالب لنحصل على المسافة. تظل الصيغة صحيحة إذا كان أحد الفرقين أو كلاهما صفرًا. ## Real world -### توجيه التوصيل -يقدّر تطبيق التوصيل المسافة المستقيمة بين عنوانين فورًا بهذه الصيغة، قبل أن يحسب مسار الطريق الفعلي أصلًا، فقط ليرتب أي محطة أقرب. +### وضع علامة في المنتصف -### نظام تحديد المواقع والخرائط -كل «مسافة إلى الوجهة» يعرضها الهاتف مبنية على هذه الصيغة مطبّقة على خطي الطول والعرض، معدّلة لانحناء الأرض في المسافات الطويلة. +في رسم مستوٍ أو خريطة لعبة، يضع متوسط إحداثيات الطرفين علامة في منتصف القطعة التي تصلهما. لكنه لا يحدد منتصف طريق متعرج. -### ألعاب الفيديو -تقرر اللعبة إن كانت شخصيتان قريبتين بما يكفي للتصادم بحساب هذه المسافة نفسها بين إحداثياتهما، مرات كثيرة كل ثانية. +### فحص التقارب -### الطوارئ والإسعاف -يقدّر مركز الطوارئ أقرب سيارة إسعاف لبلاغ ما بالمسافة المستقيمة أولًا، مستخدمًا صيغتي المنتصف والمسافة، قبل تدقيق الحساب بأوقات الطرق الفعلية. +لأجسام دائرية على لوحة لعبة مستوية، نقارن المسافة بين مركزي جسمين بمجموع نصفي قطريهما لمعرفة هل يتلامسان أو يتداخلان. diff --git a/content/lessons/geometry/coordinate-geometry/en.md b/content/lessons/geometry/coordinate-geometry/en.md index b4a4f745..7ff7c934 100644 --- a/content/lessons/geometry/coordinate-geometry/en.md +++ b/content/lessons/geometry/coordinate-geometry/en.md @@ -1,72 +1,65 @@ --- title: Coordinate geometry -summary: >- - Two dots on a city map are enough to read off the straight-line distance - between them, the meeting point exactly halfway, and the equation of the - road that joins them. +summary: 'Use two points’ coordinates to calculate their distance, midpoint and the slope of the line through them.' parameters: - x1: point 1, x - y1: point 1, y - x2: point 2, x - y2: point 2, y + x1: 'x1 — first point’s horizontal coordinate' + y1: 'y1 — first point’s vertical coordinate' + x2: 'x2 — second point’s horizontal coordinate' + y2: 'y2 — second point’s vertical coordinate' variables: - - the first point's x-coordinate - - the first point's y-coordinate - - the second point's x-coordinate - - the second point's y-coordinate - - the straight-line distance between the two points + - 'x₁: horizontal position of the first point' + - 'y₁: vertical position of the first point' + - 'x₂: horizontal position of the second point' + - 'y₂: vertical position of the second point' + - 'd: straight-line distance; one grid unit represents 1 km' --- ## Try it -1. Drag the orange point. The distance, midpoint and slope readouts update live as it moves. -2. Drag the blue point straight up, keeping its x fixed. Watch the slope grow and the dashed line get steeper. -3. Line the two points up so they share the same y-coordinate. The slope drops to exactly 0 — a flat, due-east road. +1. Set (x1, y1) = (1, 1) and (x2, y2) = (5, 4). Read distance 5 km, midpoint (3, 2.5) and slope 0.75. +2. Keep x2 = 5 and change y2 to 8. The horizontal change is still 4, while the vertical change becomes 7, so the slope is 7/4 = 1.75. +3. Set y1 = y2 = 8 with x1 = 1 and x2 = 5. The line is horizontal, with slope 0. Then set x2 = x1 and y2 = 4 to compare a vertical line, whose slope is undefined. ## Real-life examples -1. **Home to school.** Home sits at (1, 1) and school at (5, 4) on a 1 km grid: a straight-line distance of exactly 5 km, and the school bus's road follows the dashed line between them. -2. **A road running due east.** Two stops at (2, 8) and (9, 8) share the same y, so the road between them is flat: slope 0, and the equation is simply y = 8. -3. **A steep hillside path.** From (0, 0) to (6, 8), the path climbs 8 km for every 6 km east — ten kilometres of straight-line distance in total. +1. **Two locations on a flat map.** Points (1, 1) and (5, 4) differ by 4 km horizontally and 3 km vertically on this grid. Their straight-line distance is 5 km; a road route may be longer. +2. **An east–west segment.** Points (2, 8) and (9, 8) are 7 km apart. Their midpoint is (5.5, 8), and their line is y = 8. +3. **A larger diagonal.** Points (0, 0) and (6, 8) are 10 km apart. Their midpoint is (3, 4), and the slope is 8/6 = 4/3. Here vertical on the map need not mean elevation. ## Test yourself -1. Place the two points exactly 5 km apart. -2. Make the midpoint land on (4, 4). -3. Make the line's slope exactly 2. +1. Place the points 5 km apart in straight-line distance. +2. Place the midpoint at (4, 4). +3. Keep x1 and x2 different and make the slope equal 2. ## Intuition -Picture two towns marked on a grid map, each square worth one kilometre. Drag the orange point around and you'll see the straight dashed line connecting it to the blue point tilt and stretch, while the "distance" readout tells you exactly how far apart they are as the crow flies — not along any road, just the straight line between the dots. +A coordinate pair records horizontal position first and vertical position second. From (1, 1) to (5, 4), the changes are 4 horizontally and 3 vertically. These form the perpendicular legs of a right triangle, whose hypotenuse is the straight segment between the points. Its length is 5 by the Pythagorean theorem. -The green dot marks the midpoint, sitting exactly halfway between the two towns on that straight line — average their x-coordinates and separately average their y-coordinates, and that's where it lands. The dashed line itself is a whole road, not just the segment between the two towns: it keeps going in both directions, and its steepness is the slope, how many kilometres it climbs for every kilometre it goes east. +To locate the midpoint, average the horizontal coordinates and then the vertical coordinates. To find slope, divide vertical change by horizontal change. The solid segment joins the points, while the dashed line extends through them. Use distinct points when studying that line: one location alone does not determine a unique line. ## Formal -The distance between two points $(x_1, y_1)$ and $(x_2, y_2)$ is $d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$, and their midpoint is $\left(\dfrac{x_1+x_2}{2}, \dfrac{y_1+y_2}{2}\right)$. +For points $(x_1,y_1)$ and $(x_2,y_2)$ in perpendicular Cartesian coordinates with the same unit on both axes, the distance is $d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$. The midpoint is $((x_1+x_2)/2,(y_1+y_2)/2)$. -The line through them has slope $m = \dfrac{y_2-y_1}{x_2-x_1}$ (undefined when $x_1 = x_2$, a vertical line), and its equation can be written $y - y_1 = m(x - x_1)$. +If $x_1\ne x_2$, the slope is $m=(y_2-y_1)/(x_2-x_1)$ and the line is $y-y_1=m(x-x_1)$. Distinct points with the same x-coordinate instead determine the vertical line $x=x_1$, with undefined slope. Coincident points have distance zero but do not determine a unique line. ## Advanced -The same distance formula extends to three dimensions by adding a $(z_2-z_1)^2$ term under the root, and to any number of dimensions in data science, where "distance" between two rows of numbers (not points on a map) is exactly this formula applied to many coordinates at once. +In three perpendicular coordinates, add the square of the z-coordinate difference under the square root. For data with unrelated units, such as height and temperature, choosing a distance formula also requires deciding how to scale each coordinate. Latitude and longitude are angles on a curved surface, so they cannot be substituted as ordinary kilometre coordinates without a suitable conversion or model. ## Derivation -1. The horizontal gap between the two points is x₂ − x₁ and the vertical gap is y₂ − y₁ — the two legs of a right triangle. -2. By the Pythagorean theorem the straight-line distance is the hypotenuse of that triangle: d² = (x₂ − x₁)² + (y₂ − y₁)². -3. Taking the square root of both sides gives the distance itself. +1. Form horizontal and vertical displacements from the coordinate differences. Their absolute values are the legs of a right triangle when both are nonzero. +2. Squaring removes the signs, and the Pythagorean theorem gives the square of the straight-line distance as the sum of the squared differences. +3. Take the nonnegative square root to obtain distance. The formula still works if one or both differences are zero. ## Real world -### Delivery routing -A delivery app estimates the straight-line distance between two addresses instantly with this formula, before it ever calculates the actual road route, just to rank which stop is closer. +### Placing an object halfway -### GPS and mapping -Every "distance to destination" a phone shows is built on this formula applied to latitude and longitude, adjusted for the Earth's curve over longer distances. +On a flat drawing or game map, averaging endpoint coordinates places a marker halfway along their connecting segment. It does not find the midpoint of a winding route. -### Video games -A game decides whether two characters are close enough to collide by computing exactly this distance between their coordinates, many times every second. +### Checking proximity -### Emergency dispatch -Dispatchers picking the nearest ambulance to a call estimate straight-line distance first, using the midpoint and distance formulas, before refining with actual road times. +For circular objects on a flat game board, compare the distance between centres with the sum of their radii to determine whether they touch or overlap. From 26fa15d955c27352121535f8b447a6cf7e9caa37 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:01:31 +0300 Subject: [PATCH 033/124] content: rewrite nets-and-solids for first-time learners in both languages --- .../lessons/geometry/nets-and-solids/ar.md | 56 ++++++++---------- .../lessons/geometry/nets-and-solids/en.md | 57 ++++++++----------- 2 files changed, 50 insertions(+), 63 deletions(-) diff --git a/content/lessons/geometry/nets-and-solids/ar.md b/content/lessons/geometry/nets-and-solids/ar.md index 05939557..192319f1 100644 --- a/content/lessons/geometry/nets-and-solids/ar.md +++ b/content/lessons/geometry/nets-and-solids/ar.md @@ -1,65 +1,59 @@ --- title: 'شبكات المجسّمات' -summary: >- - افرد علبة كرتونية على طول حوافها تحصل على شبكة من ست مربعات متصلة؛ اطوِها تعد العلبة - نفسها، بلا زيادة ولا نقصان. +summary: 'اطوِ شبكة مكعب لترى كيف تصبح المربعات الستة أوجهًا له، مع بقاء مجموع مساحاتها ثابتًا.' parameters: - fold: fold — من مفروشة مسطحة (0) إلى مكعب مغلق (1) + fold: 'fold — تقدم الطي: من شبكة مسطحة (0) إلى مكعب مغلق (1)' variables: - - المساحة السطحية الكلية للمربعات الستة - - طول ضلع أحد المربعات + - 'A: مجموع مساحات الأوجه الستة' + - 'L: طول ضلع كل وجه مربع' --- ## Try it -1. حرّك «fold» صعودًا من 0. راقب المفروشة المتقاطعة ترتفع عن الصفحة. كل مربع يرتفع عن جاره من مفصله، مع بقاء حجمه كما هو تمامًا. -2. توقّف عند fold = 0.5. تقف الشُرَف مائلة، في منتصف الطريق بين الاستواء والانتصاب، وتستطيع رؤية ثلاثة أوجه من المكعب تتشكّل بالفعل. -3. ارفع «fold» إلى 1. تنغلق المربعات الستة لتكوّن مكعبًا مغلقًا. أعده إلى 0 وراقبه ينفرد إلى المفروشة المسطحة نفسها من جديد، ضلعًا بضلع. +1. اضبط fold = 0. عدّ مربعات الشبكة الستة: وجهًا مركزيًا، وأربعة جوانب متصلة به، ووجهًا سادسًا متصلًا بأحد الجوانب. +2. اضبط fold = 0.5. يدور كل مفصل 45° من وضعه المسطح. يتحرك الغطاء أيضًا مع الجانب الذي يحمله، لذلك لا يصنع كل وجه زاوية 45° مع الأرض. +3. اضبط fold = 1. تنغلق الأوجه لتكوّن مكعبًا. أعد القيمة إلى 0 وتحقق من أن المربعات الستة نفسها تعود إلى الشبكة. ## Real-life examples -1. **قطعة كرتون مسطحة.** فور خروجها من آلة القص تكون علبة رقائق الذرة صفيحة مسطحة واحدة، أي fold = 0، ستة ألواح متصلة بخطوط تسنين، تُطبع وهي مسطحة لأن ذلك أرخص بكثير من الطباعة بعد الطي. -2. **منتصف الطي على خط التعبئة.** ذراع آلة التعبئة تُدرك في لحظة fold = 0.5 أثناء إغلاق العلبة. بعض الشُرَف واقفة بالفعل، وبعضها ما زال مسطحًا، وكل لوح لا يزال بالحجم نفسه الذي كان عليه في الصفيحة. -3. **علبة مغلقة جاهزة.** عند fold = 1 تصبح الألواح الستة الأوجه الستة لمكعب مغلق، جاهز لِلَصقه وشحنه. +1. **قالب مكعب مسطح.** عند fold = 0، يكون النموذج الورقي مسطحًا. ستصبح المربعات الستة ستة أوجه؛ وقد يحتاج التغليف الفعلي إلى ألسنة للصق لا يتضمنها هذا النموذج. +2. **في أثناء الطي.** عند fold = 0.5، يكون كل مفصل قد قطع نصف دورانه البالغ 90°. لم يتغير طول ضلع أي مربع أو مساحته الفعلية. +3. **مكعب مغلق.** عند fold = 1، تلتقي الأوجه عند الحواف المتناظرة وتحيط بمكعب. مساحة المادة هي نفسها عندما كانت الشبكة مسطحة. ## Test yourself -1. افرد الشكل تمامًا حتى يصبح مفروشة مسطحة. -2. اطوه إلى منتصف الطريق بالضبط، بحيث تقف كل شُرفة عند 45°. -3. اطوه بالكامل حتى يصبح مكعبًا مغلقًا. +1. اضبط fold = 0 لبسط الشبكة. +2. اضبط fold = 0.5 لتدوير كل مفصل 45° من الوضع المسطح. +3. اضبط fold = 1 لإغلاق المكعب. ## Intuition -تخيّل أوجه المكعب الستة مفصولة ومفروشة مسطحة، لكنها ما زالت متصلة عند بعض أضلاعها. وهذه هي المفروشة التي تراها عند fold = 0، مربع في الوسط وأربعة مربعات متصلة بأضلاعه، وسادس متصل بأحد تلك الأربعة. حرّك «fold» للأعلى، فترتفع كل شُرفة على مفصلها كأنها صفحة تُقلَب، دون أن تتمدد أو تنكمش. +شبكة المجسم ترتيب مسطح لأوجه يمكن طيها لتكوين المجسم. في هذه الشبكة، تتصل أربعة مربعات بالمربع المركزي، ويتصل مربع آخر بأحدها من الخارج. تعمل خطوط الطي مثل المفاصل؛ تغير مواضع الأوجه في الفراغ دون أن تمددها. -عند fold = 1 تكون كل شُرفة قد دارت ربع دورة، فتلتقي المربعات ضلعًا بضلع وتنغلق مكعبًا. لم يتغيّر شيء في أي مربع طوال الطريق، الأضلاع الأربعة نفسها والمساحة نفسها. ما تغيّر هو ترتيبها في الفراغ فقط، من مسطحة منتشرة إلى واقفة محصورة. +يعرض الرسم إسقاطًا للشكل على الشاشة، لذلك قد يبدو المربع المائل أضيق، أو يحجب جزءًا من وجه آخر في الصورة. لا يعني هذا تغير مساحته أو تداخل الأوجه فعليًا في المكان نفسه. لحساب مساحة سطح المكعب، نجمع المساحات الحقيقية للأوجه الستة، بما فيها الأوجه المحجوبة عن النظر. ## Formal -لمكعب طول ضلعه $L$ ستة أوجه مربعة، مساحة كل منها $L^2$، فمساحته السطحية الكلية $A = 6L^2$، سواء كانت المربعات مفروشة مسطحة أو مطوية في مكعب مغلق. +لمكعب طول حرفه $L$، تكون مساحة كل وجه $L^2$. مجموع مساحات الأوجه الستة هو $A=6L^2$. يحافظ الطي على مساحة كل وجه، لذا تكون مساحة مادة الشبكة مساوية لمساحة سطح المكعب المغلق في هذا النموذج المثالي. -تكون المفروشة صحيحة فقط حين يجعل طي كل مفصل بمقدار 90° الأضلاع المتقابلة تلتقي دون أي فجوة أو تداخل. وللمكعب نفسه عدة مفروشات صحيحة مختلفة، لا مفروشة واحدة فقط. +تطوى شبكة المكعب الصحيحة إلى ستة أوجه مختلفة تلتقي عند أحرفه، دون فجوات أو انطباق وجه على آخر. ليس كل ترتيب متصل من ستة مربعات متساوية شبكة مكعب. تقيس مساحة السطح الأوجه، أما الحجم المحصور داخل المكعب فهو $V=L^3$. ## Advanced -الطي متساوية قياس تُطبَّق على كل وجه على حدة، فيحافظ على مساحة كل وجه وطول كل ضلع، ولا يتغيّر سوى الزوايا بين الأوجه، من 180° وهي مسطحة إلى 90° وهي مطوية. ولهذا يمكن دائمًا قراءة المساحة السطحية الكلية لأي مجسم مباشرة من مفروشته، دون أي تصحيح بسبب الطي. +يتحرك كل وجه صلب بالدوران والإزاحة، وهما يحافظان على المسافات والمساحة. للغطاء حركتان متتابعتان: حركة مع الجانب الذي يحمله، وأخرى حول مفصله الخاص. وقد تحتاج شبكة مجسم آخر إلى زوايا طي غير 90°؛ فهذه الزاوية تخص تركيب المكعب المعروض. ## Derivation -1. مفروشة المكعب ست مربعات متساوية، متصلة ضلعًا بضلع، مساحة كل منها $L^2$. -2. طي كل شُرفة بمقدار 90° حول مفصلها يثني الصفيحة، لكنه لا يمدد أي مربع ولا يقلّصه ولا يجعله يتداخل مع غيره، فلا تُكسب أي مساحة ولا تُفقد في العملية. -3. بعد طي كل شُرفة تنغلق المربعات الستة في مكعب مساحته السطحية الكلية لا تزال مجموع المربعات الستة الأصلية، $A = 6L^2$. +1. لكل مربع من المربعات الستة ضلع طوله L ومساحة L². +2. يدير الطي الأوجه دون تمديدها، فتبقى مساحة كل وجه كما هي. +3. نجمع المساحات الست فنحصل على 6L². ليس للحواف المشتركة مساحة، فلا نطرح شيئًا بسبب اشتراك الأوجه فيها. ## Real world -### التغليف -تطبع مصانع العلب وتقص مفروشات مسطحة بالآلاف لأن تخزين الصفيحة المسطحة وشحنها أرخص بكثير، ثم تُطوى في شكلها النهائي فقط قبيل تعبئتها مباشرة. +### صنع مكعب ورقي -### الأسطوانات والمخاريط -مفروشة الأسطوانة دائرتان ومستطيل عرضه يساوي محيط الدائرة، ومفروشة المخروط دائرة وقطعة منحنية، وكلاهما يُطوى دون أي تمدد لنفس السبب الذي تُطوى به مفروشة المكعب. +قص شبكة صحيحة من ستة مربعات واطوِ عند الحواف المشتركة. تضيف ألسنة اللصق مادة تتجاوز مساحة السطح الرياضية، فاحسبها منفصلة عند تجهيز الورقة. -### العمارة والألواح المعدنية -كثيرًا ما تُقصّ الأسقف المنحنية ومجاري الهواء والألواح المعدنية كألواح مسطحة من مفروشة محسوبة، ثم تُثنى إلى شكلها المنحني النهائي في الموقع، فتوفّر تكلفة المواد المنحنية الجاهزة. +### مجسمات أخرى -### الأهرامات والأوريغامي -مفروشة الهرم قاعدة مضلعة واحدة مع شُرفة مثلثة على كل ضلع منها. وطيّ الورق، من علبة هدية بسيطة إلى الأوريغامي المعقّد، هو الفكرة نفسها مكررة على مقياس أدق بكثير. +لمتوازي المستطيلات ستة أوجه مستطيلة، ولا يلزم أن تكون مربعات. وللهرم قاعدة مضلعة وأوجه جانبية مثلثة. في كل حالة، يعطي جمع مساحات الأوجه مساحة السطح الكلية. diff --git a/content/lessons/geometry/nets-and-solids/en.md b/content/lessons/geometry/nets-and-solids/en.md index dc2eef4f..1fa58482 100644 --- a/content/lessons/geometry/nets-and-solids/en.md +++ b/content/lessons/geometry/nets-and-solids/en.md @@ -1,66 +1,59 @@ --- title: Nets and solids -summary: >- - Cut a cardboard box open along its edges and flatten it, and you get a net — - six flat squares hinged together that fold back into exactly the same box, - with none of their area gained or lost along the way. +summary: 'Fold a cube’s net to see how six flat squares become its faces while preserving their total area.' parameters: - fold: fold — flat net (0) to closed cube (1) + fold: 'fold — hinge progress: flat (0) to closed cube (1)' variables: - - the total surface area of the six squares - - the length of one square's side + - 'A: total area of the six faces' + - 'L: side length of each square face' --- ## Try it -1. Drag «fold» from 0 up. Watch the cross-shaped net lift off the page: each square hinges up from its neighbour while staying exactly the same size. -2. Stop around fold = 0.5. The flaps stand at a slant, half-way between flat and upright — you can see three faces of the cube already taking shape. -3. Push «fold» to 1. The six squares click into a closed cube. Drag back down to 0 and watch it unfold into the same flat net again, edge by edge. +1. Set fold = 0. Count six squares in the flat net: one central face, four attached sides and a sixth face attached to one side. +2. Set fold = 0.5. Each hinge has rotated 45° from its flat position. The lid also moves with the side carrying it, so not every face makes 45° with the ground. +3. Set fold = 1. The faces close into a cube. Return to 0 and check that the same six squares form the net again. ## Real-life examples -1. **A flat cardboard blank.** Straight off the die-cutter a cereal box is one flat sheet, fold = 0: six panels joined by score lines, printed while still flat because that's far cheaper than printing a folded box. -2. **Mid-fold on a packing line.** A packing machine's arm is caught fold = 0.5 through closing a box: some flaps already stand up, others still lie flat, and every panel is still the same size it was on the sheet. -3. **A sealed, ready box.** At fold = 1 the six panels have become the six faces of a closed cube, ready to tape shut and ship. +1. **A flat cube template.** At fold = 0, a paper model lies flat. The six squares will become six faces; real packaging may need extra tabs that this model omits. +2. **Partway through folding.** At fold = 0.5, each hinge has turned halfway through its 90° motion. No square has changed its actual side length or area. +3. **A closed cube.** At fold = 1, the faces meet along matching edges and enclose a cube. The material area is the same as when the net was flat. ## Test yourself -1. Flatten the shape completely into its net. -2. Fold it exactly half-way, so every flap stands at 45°. -3. Fold it all the way into a closed cube. +1. Set fold = 0 to flatten the net. +2. Set fold = 0.5 to rotate each hinge 45° from flat. +3. Set fold = 1 to close the cube. ## Intuition -Picture a cube's six faces peeled apart and laid flat, still joined at some of their edges — that's the net you see at fold = 0, one square in the middle with four more attached to its sides and a sixth attached to one of those. Drag «fold» up and each flap swings upward on its hinge, like a page turning, without stretching or shrinking. +A net is a flat arrangement of faces that can fold into a solid. In this cube net, four squares attach to the central square and another square attaches beyond one of those sides. The fold lines act as hinges. Moving them changes how the faces sit in space, without stretching the faces. -By fold = 1 every flap has turned a quarter turn and the squares meet edge to edge, sealing into a closed cube. Nothing about any one square changed along the way — same four sides, same area — only their arrangement in space changed, from flat and spread out to standing and boxed in. +The picture projects the folding shape onto your screen, so a tilted square may look narrower or overlap another face in the picture. That does not mean its area has changed or that the physical faces occupy the same space. To find the cube's surface area, add the actual areas of all six faces, including those hidden from view. ## Formal -A cube of edge $L$ has six square faces, each of area $L^2$, so its total surface area is $A = 6L^2$ whether the squares are laid out flat as a net or folded shut into a cube. +For a cube with edge length $L$, each face has area $L^2$. Its six faces have total surface area $A=6L^2$. Folding preserves each face's area, so the net and the closed cube have the same material area in this ideal model. -A net is valid exactly when folding every hinge by 90° brings matching edges together with no gap and no overlap; the same cube has several different valid nets, not just one. +A valid cube net folds into six distinct faces meeting along the cube's edges, without gaps or faces lying on top of one another. Not every connected arrangement of six equal squares is a cube net. Surface area measures the faces, while the cube's enclosed volume is $V=L^3$. ## Advanced -Folding is an isometry applied piecewise to each face, so it preserves every face's area and every edge's length — only the angles between faces change, from 180° (flat) to 90° (folded). This is why a solid's total surface area can always be read straight off its net, without any correction for the folding. +Each rigid face undergoes rotations and translations, which preserve distances and area. The lid has two successive hinge motions, one inherited from its supporting side and one at its own hinge. A general solid's net may require fold angles other than 90°; that angle belongs to the cube construction shown here. ## Derivation -1. A cube's net is six equal squares, hinged edge to edge, each with area $L^2$. -2. Folding each flap up by 90° along its hinge bends the sheet but does not stretch, shrink or overlap any square, so no area is gained or lost in the process. -3. Once every flap is folded, the six squares close into a cube whose total surface area is still the sum of the six original squares, $A = 6L^2$. +1. Each of the six squares has side length L and area L². +2. Folding rotates the faces without stretching them, so each still contributes the same area. +3. Add the six face areas to obtain 6L². Shared edges have no area, so they require no area subtraction. ## Real world -### Packaging -Box factories print and cut flat nets by the thousand because a flat sheet is cheap to store and ship, then fold it into shape only at the last moment before filling it. +### Making a paper cube -### Cylinders and cones -A cylinder's net is two circles plus a rectangle whose width equals the circle's circumference, and a cone's net is a circle plus a curved wedge — both fold with no stretching for exactly the same reason a cube's net does. +Cut a valid six-square net and fold along the shared edges. Glue tabs add material beyond the mathematical surface area; include them separately when planning the sheet. -### Architecture and sheet metal -Curved roofs, air ducts and metal cladding are often cut as flat panels from a computed net and only bent into their final curved shape on site, saving expensive curved material. +### Other solids -### Pyramids and origami -A pyramid's net is one polygon base with a triangular flap on each edge; paper folding, from a simple gift box to complex origami, is the same idea repeated at a much finer scale. +A rectangular box has six rectangles, which need not be squares. A pyramid has a polygonal base and triangular side faces. In each case, adding the face areas gives the total surface area. From d87a5a704c16754ffa5836d24f1271ffd536d943 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:01:31 +0300 Subject: [PATCH 034/124] content: rewrite polygons-and-tessellation for first-time learners in both languages --- .../geometry/polygons-and-tessellation/ar.md | 57 ++++++++---------- .../geometry/polygons-and-tessellation/en.md | 59 ++++++++----------- .../polygons-and-tessellation/lesson.yaml | 6 +- 3 files changed, 55 insertions(+), 67 deletions(-) diff --git a/content/lessons/geometry/polygons-and-tessellation/ar.md b/content/lessons/geometry/polygons-and-tessellation/ar.md index 946c2dc6..59c53e65 100644 --- a/content/lessons/geometry/polygons-and-tessellation/ar.md +++ b/content/lessons/geometry/polygons-and-tessellation/ar.md @@ -1,65 +1,60 @@ --- title: المضلعات والتبليط -summary: >- - زاوية ركن الشكل تقرر هل يغطي الأرض بلا فراغ. لهذا البلاط مربعات وسداسيات، لا خماسيات. +summary: 'احسب زاوية المضلع المنتظم، وافحص هل تستطيع نسخ متطابقة منه الالتقاء حول نقطة دون فراغ أو تداخل.' parameters: - n: n — عدد الأضلاع + n: 'n — عدد أضلاع المضلع المنتظم' variables: - - عدد أضلاع المضلع - - مجموع كل زواياه الداخلية - - إحدى زواياه الداخلية، إن كان المضلع منتظمًا + - 'n: عدد الأضلاع' + - 'S: مجموع الزوايا الداخلية' + - 'a: قياس زاوية داخلية واحدة في المضلع المنتظم' --- ## Try it -1. حرّك «n — عدد الأضلاع» صعودًا من 3. راقب الشكل الكبير على اليسار يكتسب أضلاعًا جديدة ويبدو أقرب إلى الدائرة، بينما تصعد قراءة «إحدى زواياه الداخلية». -2. انظر إلى النسخ الصغيرة المصفوفة حول النقطة على اليمين. عند n = 6 تنغلق الحلقة تمامًا دون أي فراغ. -3. انتقل إلى n = 5 أو n = 7. تبقى فجوة فارغة مظلّلة حيث لا تصل النسخة الأخيرة إلى الأولى، وهذا يعني أن هذين الشكلين لا يستطيعان تبليط أرضية بمفردهما. +1. اضبط n على 3 ثم 4 ثم 6. الزوايا الداخلية 60° و90° و120°. تتسع النقطة لست نسخ، ثم أربع، ثم ثلاث على الترتيب. +2. اضبط n = 5. كل زاوية 108°، فتشغل ثلاث نسخ 324° وتترك فجوة 36°. إضافة نسخة رابعة تسبب تداخلًا. +3. اضبط n = 8. تترك زاويتان، كل منهما 135°، فجوة 90°. يمكن التفكير في ملئها بزاوية مربع عند خلط أشكال البلاط. ## Real-life examples -1. **دعامة سقف مثلثة.** المثلث (n = 3) هو المضلع الوحيد الذي لا يمكن تحريفه دون تغيير طول أحد أضلاعه، ولهذا يدعّم البنّاؤون الأسقف والأبراج بمثلثات، لا بمربعات. -2. **خلية النحل.** يبني النحل بسداسيات منتظمة (n = 6): الشكل الذي يملأ صفيحة شمع مستوية دون أي فراغ ضائع، مستخدمًا أقل قدر من الجدران لكل خلية. -3. **إشارة قف.** إشارة «قف» ثمانية منتظمة (n = 8)، معروفة فورًا من زواياها، لكنها لا تستطيع بمفردها تبليط جدار. فالرصّافون لا ينجحون في ذلك إلا بملء الفراغات بمربعات صغيرة. +1. **بلاط مثلث متساوي الأضلاع.** عند n = 3، تجتمع ست زوايا قياس كل منها 60° لتكوّن 360°. يمكن تكرار الترتيب لتغطية المستوى. +2. **بلاط سداسي منتظم.** عند n = 6، تلتقي ثلاث زوايا قياس كل منها 120° دون فراغ. مجموع زوايا البلاطة الواحدة 720°. +3. **مثمنات مع مربعات.** عند n = 8، يجمع التقاء زاويتين مقدار كل منهما 135° مع زاوية مربع 90° إلى 360°. لا تكفي المثمنات المنتظمة وحدها لهذا التبليط ضلعًا إلى ضلع. ## Test yourself -1. اجعل الشكل سداسيًا منتظمًا. -2. جد مضلعًا أكبر من السداسي وشاهد الفجوة التي يتركها عندما تلتقي نسخ منه عند نقطة واحدة. -3. ارفع مجموع الزوايا الداخلية إلى 1440° بالضبط. +1. اختر n التي تعطي سداسيًا منتظمًا. +2. اختر أكثر من ستة أضلاع وافحص الفجوة حول نقطة الالتقاء. +3. أوجد n التي تجعل مجموع الزوايا الداخلية 1440°. ## Intuition -حرّك «n — عدد الأضلاع» وراقب المضلع الكبير على اليسار يكتسب زوايا واحدة تلو الأخرى. كل زاوية جديدة تغيّر أيضًا مقدار كل زاوية في الشكل. فمع قلّة الأضلاع تكون الزوايا حادّة، وكلما زاد n استدار الشكل واتسعت كل زاوية فيه، مقتربة شيئًا فشيئًا من زاوية مستقيمة قدرها 180°. +للمضلع المنتظم أضلاع متساوية وزوايا داخلية متساوية. يعرض الرسم الأيسر نسخة واحدة، ويضع الأيمن نسخًا حول رأس مشترك. لكي نتجنب الفراغ والتداخل عنده، يجب أن تجمع زوايا الأركان إلى دورة كاملة، أي 360°. -انظر الآن إلى مروحة النسخ الصغيرة الملتقية عند النقطة على اليمين، فهذا ما يحدث لو حاولت إحاطة نقطة واحدة على أرضية ببلاط من الشكل نفسه، ضلعًا بضلع وركنًا بركن. كل نسخة تأخذ قسمًا من الدورة يساوي زاويتها الداخلية. الدورة الكاملة حول نقطة تساوي 360°، فلا تنغلق النسخ دون فراغ إلا حين تقسم زاويتها الداخلية 360° قسمة تامة. جرّب n = 3 و4 و6 وراقب الفجوة المظلّلة تختفي تمامًا. +يساهم المربع بزاوية 90°، فتتسع النقطة لأربعة مربعات. أما الخماسي المنتظم فزاويته 108°؛ تترك ثلاث نسخ فراغًا، وتتجاوز أربع نسخ دورة كاملة. يستبعد هذا تبليطًا ضلعًا إلى ضلع بالخماسيات المنتظمة وحدها. لكنه لا يستبعد كل بلاطة خماسية؛ فتغيير الزوايا يغيّر المسألة. ## Formal -في أي مضلع بسيط له $n$ ضلعًا، يكون مجموع زواياه الداخلية $S = (n-2)\cdot 180^\circ$. وإذا كان المضلع منتظمًا، تتساوى كل زواياه، فتبلغ كل واحدة منها $a = \dfrac{S}{n}$. +مجموع الزوايا الداخلية لمضلع مستوٍ بسيط ذي n أضلاع هو $S=(n-2)180^\circ$. وللمضلع المنتظم تكون كل زاوية $a=S/n$. هنا n عدد صحيح لا يقل عن 3، وتعني كلمة «بسيط» أن الحد لا يتقاطع مع نفسه. -تُبلّط نسخ مضلع منتظم المستوي، ضلعًا بضلع حول نقطة واحدة، فقط حين يقسم $360^\circ$ على $a$ قسمة تامة، وهذا لا يحدث بين المضلعات المنتظمة إلا للمثلث والمربع والسداسي. +يحتاج التبليط ضلعًا إلى ضلع بنوع واحد من المضلعات المنتظمة إلى عدد صحيح k من الأركان يحقق $ka=360^\circ$. يعطي هذا فقط $n=3,4,6$، ولكل منها تبليط بهذه الطريقة يغطي المستوى. فحص الزوايا عند نقطة شرط لازم، وتثبت الإنشاءات المتكررة إمكان التبليط في الحالات الثلاث. ## Advanced -تخلط التبليطات شبه المنتظمة بين مضلعين منتظمين أو أكثر حول كل رأس، كالمربعات والثمانيات، ما دام مجموع الزوايا عند كل رأس لا يزال 360° بالضبط. ويوجد ثمانية تبليطات أرخميدية كهذه للمستوي فقط. أما الخماسيات غير المنتظمة فبعضها يبلّط رغم فشل الخماسي المنتظم في ذلك، وتُعرف اليوم أكثر من عشر عائلات من خماسيات محدّبة تُبلّط المستوي، واكتمل تصنيفها عام 2017 فقط. +يمكن تقسيم مضلع محدب إلى n − 2 مثلثًا بأقطار من رأس واحد. وللمضلع البسيط غير المحدب مجموع الزوايا نفسه، لكن قد نحتاج إلى تقسيم مختلف. ويمكن أيضًا التبليط بمثلثات ورباعيات وبعض الخماسيات غير المنتظمة. القيد الذي يحصر الأضلاع في ثلاثة أو أربعة أو ستة يخص استخدام شكل منتظم واحد ضلعًا إلى ضلع. ## Derivation -1. اختر رأسًا واحدًا من المضلع ذي $n$ ضلعًا وارسم كل الأقطار الممكنة منه إلى بقية الرؤوس. يقسّم هذا المضلع إلى $(n-2)$ مثلثًا لا يتداخل أي منها مع الآخر. -2. مجموع زوايا أي مثلث الثلاث يساوي 180°، ومجتمعة تستهلك هذه المثلثات كل زاوية داخلية في المضلع مرة واحدة بالضبط، دون أن يبقى شيء أو يُحسب مرتين. -3. الضرب يعطي المجموع الكلي، $S = (n-2)\cdot 180^\circ$، وتوزيع هذا المجموع بالتساوي على زوايا المضلع المنتظم المتماثلة البالغ عددها $n$ يعطي زاوية كل واحدة منها، $a = \dfrac{S}{n}$. +1. للمضلع المحدب المعروض، ارسم أقطارًا من رأس واحد إلى الرؤوس غير المجاورة. تحصل على n − 2 مثلثًا داخل المضلع. +2. تقسم زوايا المثلثات الزوايا الداخلية للمضلع دون تكرار. نجمع 180° لكل مثلث للحصول على المجموع. +3. نقسم المجموع على n في المضلع المنتظم لأن زواياه متساوية، ثم نفحص عدد هذه الزوايا الذي يكمل 360°. ## Real world -### الأرضيات والبلاط -المثلث المتساوي الأضلاع والمربع والسداسي المنتظم هي المضلعات الوحيدة التي تبلّط أرضية ضلعًا بضلع بمفردها، ولهذا تهيمن هذه الأشكال الثلاثة على الرصف والبناء وبلاط الحمّامات. +### تصميم نمط بلاط -### الطبيعة -يظهر التوزيع السداسي أينما احتاج سطح مستوٍ إلى التقسيم بأقل حدود ممكنة لكل خلية، مثل خلايا النحل وتشققات الطين الجاف ونمط عين الذبابة المركّبة. +افحص مجموع أركان البلاطات التي تلتقي عند رأس واحد. وجود فجوة أو تداخل يمنع ترتيبًا مستويًا ضلعًا إلى ضلع، حتى لو بدا كل شكل مناسبًا منفردًا. -### الرياضة والألعاب -تُخاط كرة القدم من سداسيات وخماسيات معًا حتى تنحني الألواح لتكوّن كرة، إذ لا يمكن للسداسيات المسطحة وحدها إلا تبليط سطح مستوٍ، لا الانغلاق على شكل كرة. +### خلط الأشكال -### العمارة -تقسّم القباب والهياكل الجيوديسية السطح المنحني إلى مثلثات لأن المثلث صلب وزواياه سهلة القص والتحقق في الموقع، بخلاف الألواح الأكثر مرونة ذات الأربع أو الخمس أضلاع. +يمكن للمربعات والمثمنات المنتظمة الاشتراك في تبليط واحد، لأن زاويتي مثمن وزاوية مربع تجمع إلى 360°. خلط الأشكال يتيح مجموعات زوايا جديدة. diff --git a/content/lessons/geometry/polygons-and-tessellation/en.md b/content/lessons/geometry/polygons-and-tessellation/en.md index f94cc31e..6c7f5a89 100644 --- a/content/lessons/geometry/polygons-and-tessellation/en.md +++ b/content/lessons/geometry/polygons-and-tessellation/en.md @@ -1,67 +1,60 @@ --- title: Polygons and tessellation -summary: >- - A shape's own corner angle decides whether copies of it can pack around a - point with no gap at all — which is exactly why floor tiles come in - triangles, squares and hexagons, never pentagons. +summary: 'Calculate a regular polygon’s corner angle and check whether identical copies can meet edge to edge around a point.' parameters: - n: n — number of sides + n: 'n — number of sides of the regular polygon' variables: - - the number of sides of the polygon - - the sum of all its interior angles - - one interior angle, if the polygon is regular + - 'n: number of sides' + - 'S: sum of the interior angles' + - 'a: one interior angle of the regular polygon' --- ## Try it -1. Drag «n — number of sides» up from 3. Watch the big shape on the left grow more sides and look rounder, while its readout «one interior angle» climbs. -2. Look at the small copies fanned around the point on the right. At n = 6 they close up into a perfect ring with no gap. -3. Move to n = 5 or n = 7. A wedge of empty space (shaded) is left over where the last copy doesn't quite reach the first — those shapes cannot tile a floor by themselves. +1. Set n = 3, then 4, then 6. The interior angles are 60°, 90° and 120°. Six, four and three copies respectively fit around a point. +2. Set n = 5. Each angle is 108°; three copies use 324°, leaving a 36° gap. A fourth copy would overlap. +3. Set n = 8. Two 135° corners leave a 90° gap. This suggests filling that corner with a square when mixing tile shapes. ## Real-life examples -1. **Triangular roof brace.** A triangle (n = 3) is the only polygon that can't be pushed out of shape without changing a side length, which is why builders brace roofs and towers with triangles, not squares. -2. **Honeycomb cell.** Bees build with regular hexagons (n = 6): the shape that packs a flat sheet of wax with no wasted gaps while using the least wall per cell. -3. **Stop sign.** A stop sign is a regular octagon (n = 8) — instantly recognisable by its corners, but on its own it cannot tile a wall; pavers only manage it by filling the gaps with small squares. +1. **Equilateral triangular tiles.** At n = 3, six 60° corners meet to make 360°. Repeating the arrangement covers the plane. +2. **Regular hexagonal tiles.** At n = 6, three 120° corners meet without a gap. Each tile has angle sum 720°. +3. **Octagons with squares.** At n = 8, two 135° corners and one square's 90° corner total 360°. Regular octagons alone cannot provide this edge-to-edge tiling. ## Test yourself -1. Make the shape a regular hexagon. -2. Find a polygon bigger than a hexagon and see the gap it leaves when copies meet at a point. -3. Push the interior angle sum to exactly 1440°. +1. Set n to make a regular hexagon. +2. Choose more than six sides and inspect the gap around the shared point. +3. Find n giving an interior-angle sum of 1440°. ## Intuition -Drag «n — number of sides» and watch the big polygon on the left gain corners one at a time. Each new corner also changes the angle at every corner: with few sides the corners are sharp, and as n grows the shape rounds out and each angle opens wider, creeping toward a flat 180°. +A regular polygon has equal sides and equal interior angles. The drawing on the left shows one; the drawing on the right places copies around a shared vertex. To avoid both gaps and overlaps there, the corner angles must add to one full turn, 360°. -Now look at the fan of small copies meeting at the point on the right — this is what happens if you try to surround one point on a floor with copies of the same tile, edge to edge, corner to corner. Each copy takes up a slice equal to its own interior angle. A full turn around a point is 360°, so the copies only close up with no gap when the interior angle divides evenly into 360° — try n = 3, 4 and 6 and watch the shaded gap disappear completely. +A square contributes 90°, so four fit. A regular pentagon contributes 108°: three leave a gap and four exceed a full turn. This rules out an edge-to-edge tiling using only regular pentagons. It does not rule out every pentagonal tile; changing the angles changes the problem. ## Formal -For any simple polygon with $n$ sides, the interior angles add to $S = (n-2)\cdot 180^\circ$. If the polygon is regular, every angle is equal, so each one measures $a = \dfrac{S}{n}$. +A simple plane polygon with n sides has interior-angle sum $S=(n-2)180^\circ$. For a regular polygon, every angle is $a=S/n$. Here n is an integer at least 3, and “simple” means the boundary does not cross itself. -Copies of a regular polygon tile the plane edge-to-edge around a single point exactly when $360^\circ$ divides evenly by $a$ — among the regular polygons, that only happens for the triangle, the square and the hexagon. +An edge-to-edge tiling by one kind of regular polygon needs an integer number k of corners satisfying $ka=360^\circ$. This gives only $n=3,4,6$, and each of these admits such a tiling of the plane. The local angle check is necessary; the repeated constructions establish existence for these three cases. ## Advanced -Semi-regular tilings mix two or more regular polygons around each vertex, such as squares and octagons, so long as the angles at every vertex still add to exactly 360°; there are exactly eight such Archimedean tilings of the plane. Irregular pentagons can still tile despite the regular one failing — over a dozen convex pentagon families are now known to tile, a classification finished only in 2017. +A convex polygon can be split into n − 2 triangles by diagonals from one vertex. A nonconvex simple polygon also has the same angle sum, but may require a different triangulation. Irregular triangles, quadrilaterals and some pentagons can tile too. The restriction to three, four or six sides applies to using one regular polygon shape edge to edge. ## Derivation -1. Pick one vertex of the $n$-sided polygon and draw every diagonal from it to the other vertices. This slices the polygon into $(n-2)$ non-overlapping triangles. -2. Every triangle's three angles add to 180°, and together the triangles use up every interior angle of the polygon exactly once, with nothing left over and nothing counted twice. -3. Multiplying gives the total, $S = (n-2)\cdot 180^\circ$, and splitting that total equally among a regular polygon's $n$ matching corners gives each one's angle, $a = \dfrac{S}{n}$. +1. For the convex polygon shown, draw diagonals from one vertex to all nonadjacent vertices. This creates n − 2 triangles inside the polygon. +2. The triangle angles partition the polygon's interior angles. Add 180° for each triangle to get the total. +3. Divide that total by n for a regular polygon, whose n angles are equal. Then test how many such angles fit into 360°. ## Real world -### Flooring and tiling -Only equilateral triangles, squares and regular hexagons tile a floor edge-to-edge on their own, which is why those three shapes dominate paving, brickwork and bathroom tiles. +### Designing a tile pattern -### Nature -Hexagonal packing shows up wherever a flat surface needs dividing with the least boundary per cell: honeycombs, dried mud cracks, and the pattern of a fly's compound eye. +Check the sum of the tile corners meeting at a vertex. A gap or overlap there prevents a flat edge-to-edge layout, even if each individual tile looks suitable. -### Sports and games -A football (soccer ball) is stitched from hexagons and pentagons so the panels can curve into a sphere — flat hexagons alone can only tile a flat sheet, not close up into a ball. +### Mixing shapes -### Architecture -Domes and geodesic structures break a curved surface into triangles because triangles are rigid and their angles are easy to cut and check on site, unlike floppier four- or five-sided panels. +Squares and regular octagons can share a tiling because two octagon corners and one square corner total 360°. Mixing shapes changes the angle combinations available. diff --git a/content/lessons/geometry/polygons-and-tessellation/lesson.yaml b/content/lessons/geometry/polygons-and-tessellation/lesson.yaml index d5390e90..e48ee80d 100644 --- a/content/lessons/geometry/polygons-and-tessellation/lesson.yaml +++ b/content/lessons/geometry/polygons-and-tessellation/lesson.yaml @@ -25,9 +25,9 @@ variables: - S - a derivation: -- \text{draw every diagonal from one vertex, splitting the } n\text{-gon into } (n-2) \text{ triangles} -- \text{each triangle's angles add to } 180^\circ \text{, and together the triangles cover every interior angle of the polygon exactly once} -- S = (n-2)\cdot 180^\circ \text{, and sharing that equally among the } n \text{ equal angles of a regular polygon gives } a = \dfrac{S}{n} + - '\text{a convex }n\text{-gon splits into }n-2\text{ triangles using diagonals from one vertex}' + - '\text{the triangles partition the interior angles, each contributing }180^\circ' + - 'S=(n-2)180^\circ,\quad a=S/n\text{ for a regular polygon}' charts: [] primary: n presets: From b596a19da94ad5784ac7f57efd8049b545d1ad86 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:01:31 +0300 Subject: [PATCH 035/124] content: rewrite pythagorean-theorem for first-time learners in both languages --- .../geometry/pythagorean-theorem/ar.md | 61 +++++++++--------- .../geometry/pythagorean-theorem/en.md | 62 +++++++++---------- 2 files changed, 56 insertions(+), 67 deletions(-) diff --git a/content/lessons/geometry/pythagorean-theorem/ar.md b/content/lessons/geometry/pythagorean-theorem/ar.md index 842915e3..43fe277e 100644 --- a/content/lessons/geometry/pythagorean-theorem/ar.md +++ b/content/lessons/geometry/pythagorean-theorem/ar.md @@ -1,67 +1,62 @@ --- title: مبرهنة فيثاغورس -summary: >- - في المثلث القائم، مربع الضلع الأول زائد مربع الثاني يساوي مربع الوتر. شاهده بالمساحات. +summary: 'أوجد طول ضلع في مثلث قائم بجمع مساحتي المربعين المبنيين على ضلعي الزاوية القائمة.' parameters: - a: a، الضلع - b: b، الضلع + a: 'a — طول أحد ضلعي الزاوية القائمة' + b: 'b — طول ضلع الزاوية القائمة الآخر' variables: - - طول أحد الضلعين القائمين (اسحب رأسه البعيد) - - طول الضلع القائم الآخر (اسحب رأسه البعيد) - - طول الوتر، المقابل للزاوية القائمة - - الزاوية المقابلة للضلع a + - 'a: طول الضلع الأول؛ اسحب نهايته لتغييره' + - 'b: طول الضلع الثاني؛ اسحب نهايته لتغييره' + - 'c: طول الوتر المقابل للزاوية القائمة' + - 'θ: الزاوية المقابلة للضلع a' --- ## Try it -1. اسحب الرأس البعيد للضلع «a، الضلع» وراقب المربع الأزرق عليه يكبر ويصغر. -2. اسحب الرأس البعيد للضلع «b، الضلع» بدلًا منه، وراقب المربع السماوي يتغيّر معه. -3. قارن مساحتي الأزرق والسماوي مجتمعتين بمساحة المربع الكهرماني على الوتر. تتطابقان دائمًا بالضبط. +1. اضبط a = 3 وb = 4. مساحتا المربعين الأصغر هما 9 و16، ومجموعهما 25. طول الوتر 5. +2. أبقِ a = 3 واجعل b = 6. يصبح المجموع 45، فيكون c الجذر التربيعي للعدد 45، أي نحو 6.71. +3. اضبط a = 6 وb = 8. مقارنة بالمثلث الأول، تضاعفت الأطوال وأصبحت مساحات المربعات أربعة أمثالها. يتغير مقياس العرض ليلائم الشاشة، لذا قارن القيم المكتوبة. ## Real-life examples -1. **تربيع زاوية.** يتحقق البنّاؤون من أن الزاوية قائمة فعلًا بضلعين طولهما 3 و4 أمتار، فيكون الوتر 5 أمتار بالضبط. -2. **سلّم مستند إلى جدار.** قاعدة سلّم تبعد 1.5 متر عن الجدار بينما يصل إلى ارتفاع 6 أمتار، فيكون طول السلّم نفسه نحو 6.2 متر. -3. **ممرّ قطري عبر حديقة.** حديقة مستطيلة أبعادها 5 و6 أمتار لها ممرّ مختصر قطري طوله نحو 7.8 متر. +1. **التحقق من زاوية قائمة.** طولان متعامدان مقدارهما 3 م و4 م يعطيان قطرًا طوله 5 م. وبالعكس، يكون المثلث ذو هذه الأطوال الثلاثة قائم الزاوية. +2. **دعامة مائلة.** إذا امتدت دعامة مستقيمة إلى ارتفاع 6 م من نقطة تبعد أفقيًا 1.5 م، فطولها √38.25، أي نحو 6.18 م، بافتراض أرض أفقية وجدار رأسي. +3. **قطر حديقة.** لحديقة مستطيلة أبعادها 5 م و6 م قطر طوله √61، أي نحو 7.81 م. ## Test yourself -1. اجعل طول الوتر 5 أمتار بالضبط. -2. أبقِ أحد الضلعين دون مترين وامدد الوتر مع ذلك فوق 7 أمتار. -3. اجعل الضلعين متقاربين جدًا، بفارق أقل من 0.2 متر، والوتر مع ذلك أطول من 9 أمتار. +1. اختر a وb بحيث يكون c مساويًا 5. +2. أبقِ a أقل من 2، واجعل c أكبر من 7. +3. اجعل الفرق بين a وb أقل من 0.2، مع c أكبر من 9. ## Intuition -اسحب أيًا من الرأسين البعيدين وراقب المثلث وهو يتمدد. تكبر المربعات الثلاثة الملوّنة وتصغر معه. المربع الأزرق على الضلع $a$ مساحته $a^2$. المربع السماوي على الضلع $b$ مساحته $b^2$. والمربع الكهرماني على الوتر مساحته $c^2$. ومهما شوّهت المثلث، فإن مساحة الأزرق زائد مساحة السماوي تملأ دائمًا مساحة الكهرماني بالضبط. +تشير العلامة المربعة الصغيرة عند أحد الرؤوس إلى زاوية قائمة. الضلعان اللذان يلتقيان عندها هما a وb. أما الضلع المقابل لها فهو الوتر c، وهو أطول أضلاع المثلث. بُني كل مربع ملوّن بحيث يساوي طول ضلعه طول أحد أضلاع المثلث. -هذا يصح فقط لأن الزاوية بين $a$ و $b$ تبقى قائمة. المربع الصغير المُعلَّم عند الرأس هو السبب الكامل في صحة هذه المتطابقة. تخيّل لو اتسعت تلك الزاوية عن $90°$. عندها لن يعود مجموع المربعين الصغيرين يساوي الثالث. وهذا بالضبط ما تتحقق منه بمقارنة $a^2+b^2$ بمربع $c$ في القراءات أدناه. +إذا كان ضلعا القائمة 3 و4، فمساحتا مربعيهما 9 و16 وحدة مربعة. مجموعهما 25، وهو مساحة المربع المبني على وتر طوله 5. نحن نجمع مربعي الطولين، لا الطولين نفسيهما. يحافظ الرسم دائمًا على زاوية 90°، ولا يتيح اختبار مثلث بزاوية مختلفة عند هذا الرأس. ## Formal -في مثلث له زاوية قائمة بين ضلعين طولاهما $a$ و $b$، ووتر $c$ مقابل لتلك الزاوية القائمة، فإن $a^2 + b^2 = c^2$. +في مثلث قائم طولا ضلعي قائمته $a$ و$b$ وطول وتره $c$، تنص نظرية فيثاغورس على أن $a^2+b^2=c^2$. ولأن الأطوال موجبة، فإن $c=\sqrt{a^2+b^2}$. يجب استخدام وحدة الطول نفسها لكل الأضلاع. -وعلى العكس، إذا حققت أطوال أضلاع مثلث العلاقة $a^2+b^2=c^2$، فلا بد أن تكون الزاوية المقابلة لـ $c$ مساوية لـ $90°$ بالضبط. فالمبرهنة عبارة عن قضية «إذا وفقط إذا» بشأن الزوايا القائمة. +ويصح العكس أيضًا: إذا حققت أطوال موجبة تكوّن مثلثًا العلاقة $a^2+b^2=c^2$، فالزاوية المقابلة لـc قائمة. لا تتحقق هذه المساواة لمثلث غير قائم الزاوية. ## Advanced -بلغة الإحداثيات تكون المبرهنة هي تعريف المعيار الإقليدي، $\|v\|^2 = v \cdot v$، وتعمّم إلى قانون جيب التمام $c^2 = a^2 + b^2 - 2ab\cos\gamma$. ولا تصح على الأسطح المنحنية. ونقيس انحناء السطح من مقدار هذا الخطأ نفسه. +إذا كانت الزاوية المحصورة بين a وb هي γ، فإن قانون جيب التمام يعطي c² = a² + b² − 2ab cos γ. عند 90° يساوي حد جيب التمام صفرًا، فنعود إلى نظرية فيثاغورس. تفترض الصيغة المعتادة قياس المسافات في مستوى إقليدي مستوٍ؛ أما القياس على سطح منحنٍ فيحتاج إلى نموذج آخر. ## Derivation -1. خذ مربعًا طول ضلعه $a+b$ ووسّع مساحته جبريًا. -2. ابنِ المربع الكبير نفسه بطريقة ثانية. ضع أربع نسخ من المثلث القائم حول مربع داخلي مائل طول ضلعه $c$. فالمربع الكبير هو المربع المائل زائد المثلثات الأربعة. -3. كلا التعبيرين يصف المساحة نفسها، فساوِ بينهما واحذف الحد المشترك $2ab$. وما يتبقى هو مبرهنة فيثاغورس. +1. مساحة مربع طول ضلعه a + b تساوي a² + 2ab + b². +2. نرتب داخله أربع نسخ من المثلث القائم، بحيث تحيط أوتارها بمربع مركزي ضلعه c. مجموع مساحات المثلثات 2ab، فتكون مساحة المربع الخارجي نفسها c² + 2ab. +3. نساوي التعبيرين ونطرح 2ab من الطرفين، فيتبقى a² + b² = c². ## Real world -### تربيع الزاوية -يتحقق البنّاؤون من أن الزاوية قائمة فعلًا بقياس مثلث 3-4-5 على طول الجدارين. فإذا كان القطر 5 وحدات عندما يكون الضلعان 3 و4، فالزاوية قائمة. +### الشاشات المستطيلة -### أحجام الشاشات وأجهزة التلفاز -الحجم المعلن للشاشة هو قطر مستطيلها. ونحسبه من عرضها وارتفاعها بهذه المبرهنة بالذات. +يمثل عرض الشاشة وارتفاعها ضلعي مثلث قائم، ويمثل قطرها الوتر. معرفة اثنين من هذه الأطوال تتيح حساب الثالث. -### المسافة المستقيمة -تستخدمها أدوات تحديد المواقع والخرائط لتحويل الإزاحة شرقًا-غربًا والإزاحة شمالًا-جنوبًا إلى مسافة مستقيمة واحدة. +### المسافة على شبكة -### سلامة السلم -معرفة طول السلم والمسافة بين قاعدته والجدار تخبرك بالارتفاع الذي يبلغه، والعكس صحيح. +التحرك 3 وحدات أفقيًا و4 رأسيًا يجعلك على بعد 5 وحدات بخط مستقيم من البداية. لكن طول الطريق ذي الجزأين هو 7 وحدات، لذا نميز طول الطريق عن المسافة المستقيمة. diff --git a/content/lessons/geometry/pythagorean-theorem/en.md b/content/lessons/geometry/pythagorean-theorem/en.md index a6dab5ab..f9d22b60 100644 --- a/content/lessons/geometry/pythagorean-theorem/en.md +++ b/content/lessons/geometry/pythagorean-theorem/en.md @@ -1,68 +1,62 @@ --- title: Pythagorean theorem -summary: >- - In any right triangle, the squares built on the two legs together cover - exactly as much area as the square built on the hypotenuse. +summary: 'Find a right triangle’s missing side by adding the areas of squares built on its two perpendicular sides.' parameters: - a: a — leg - b: b — leg + a: 'a — length of one perpendicular leg' + b: 'b — length of the other perpendicular leg' variables: - - length of one leg (drag its far vertex) - - length of the other leg (drag its far vertex) - - 'length of the hypotenuse, opposite the right angle' - - the angle opposite side a + - 'a: first leg length; drag its endpoint' + - 'b: second leg length; drag its endpoint' + - 'c: hypotenuse length, opposite the right angle' + - 'θ: angle opposite side a' --- ## Try it -1. Drag the far vertex of leg «a — leg» and watch the blue square on it grow and shrink. -2. Drag the far vertex of leg «b — leg» instead, and watch the teal square change with it. -3. Compare the blue and teal areas combined to the amber square on the hypotenuse: they always match exactly. +1. Set a = 3 and b = 4. The two smaller square areas are 9 and 16. Their sum is 25, and the hypotenuse is 5. +2. Keep a = 3 and set b = 6. The sum becomes 45, so c is the square root of 45, about 6.71. +3. Set a = 6 and b = 8. Compare with the first triangle: the side lengths have doubled and the square areas have quadrupled. The drawing rescales to fit, so use the numerical labels. ## Real-life examples -1. **Squaring a corner.** Builders check a corner is a true right angle using legs of 3 m and 4 m: the diagonal comes out to exactly 5 m. -2. **Ladder against a wall.** A ladder's base sits 1.5 m from the wall while it reaches 6 m up: the ladder itself must be about 6.2 m long. -3. **Diagonal path across a garden.** A rectangular garden 5 m by 6 m has a diagonal shortcut path about 7.8 m long. +1. **A square corner.** Perpendicular lengths of 3 m and 4 m give a diagonal of 5 m. Conversely, a triangle with these three side lengths has a right angle. +2. **A sloping support.** A straight support reaching 6 m vertically from a point 1.5 m away horizontally has length √38.25, about 6.18 m, assuming level ground and a vertical wall. +3. **A garden diagonal.** A rectangular garden 5 m by 6 m has a diagonal of √61, about 7.81 m. ## Test yourself -1. Make the hypotenuse exactly 5 m long. -2. Keep one leg under 2 m yet stretch the hypotenuse past 7 m. -3. Make the two legs nearly equal, within 0.2 m of each other, yet the hypotenuse longer than 9 m. +1. Choose a and b so that c is 5. +2. Keep a below 2 while making c greater than 7. +3. Make a and b differ by less than 0.2, with c greater than 9. ## Intuition -Drag either far vertex and watch the triangle stretch while the three tinted squares grow and shrink with it. The blue square sitting on leg $a$ has area $a^2$, the teal square on leg $b$ has area $b^2$, and the amber square leaning on the hypotenuse has area $c^2$. No matter how you distort the triangle, the blue area plus the teal area always exactly fills the amber one. +The small square at one corner marks a right angle. The two sides meeting there are the legs, a and b. The side opposite that corner is the hypotenuse, c, and is the longest side. Each coloured square uses a triangle side as its own side length. -This only works because the corner between $a$ and $b$ stays a right angle — that small marked square at the vertex is the whole reason the identity holds. Try to picture what would happen if that corner opened wider than $90°$: the two smaller squares would no longer add up to the third, which is exactly what the readouts below let you check as $a^2+b^2$ versus $c$ squared. +For legs of 3 and 4, those squares contain 9 and 16 square units. Together they have area 25, the same as the square on a hypotenuse of length 5. We add the squares of the lengths, not the lengths themselves. The diagram always keeps the corner at 90°; it cannot test a triangle with a different corner angle. ## Formal -For a triangle with a right angle between sides of length $a$ and $b$, and hypotenuse $c$ opposite that right angle, $a^2 + b^2 = c^2$. +For a right triangle with leg lengths $a$ and $b$ and hypotenuse length $c$, the Pythagorean theorem states $a^2+b^2=c^2$. Since lengths are positive, $c=\sqrt{a^2+b^2}$. Use the same length unit for every side. -Conversely, if a triangle's side lengths satisfy $a^2+b^2=c^2$, the angle opposite $c$ must be exactly $90°$ — the theorem is an if-and-only-if statement about right angles. +The converse also holds: if positive side lengths forming a triangle satisfy $a^2+b^2=c^2$, the angle opposite c is a right angle. For a triangle that is not right-angled, this equality does not hold. ## Advanced -In coordinates the theorem is the definition of the Euclidean norm, $\|v\|^2 = v \cdot v$, and generalises to the law of cosines $c^2 = a^2 + b^2 - 2ab\cos\gamma$. It fails on curved surfaces — its failure is one way to measure curvature. +If the included angle between a and b is γ, the law of cosines gives c² = a² + b² − 2ab cos γ. At 90°, the cosine term vanishes and we recover this theorem. The familiar formula assumes distances in a flat Euclidean plane; distances measured along curved surfaces require a different model. ## Derivation -1. Take a square of side $a+b$ and expand its area algebraically. -2. Build the same big square a second way: place four copies of the right triangle around a tilted inner square of side $c$. The big square is the tilted square plus the four triangles. -3. Both expressions describe the same area, so set them equal and cancel the shared $2ab$ term — the Pythagorean theorem is what remains. +1. A square with side a + b has area a² + 2ab + b². +2. Arrange four copies of the right triangle inside it with their hypotenuses enclosing a central square of side c. The four triangles have total area 2ab, so the same outer square has area c² + 2ab. +3. Equate the two area expressions and subtract 2ab from both. What remains is a² + b² = c². ## Real world -### Squaring a corner -Builders check a corner is a true right angle by measuring a 3-4-5 triangle along the two walls: if the diagonal is 5 units when the sides are 3 and 4, the corner is square. +### Rectangular screens -### Screen and TV sizes -A display's advertised size is the diagonal of its rectangle — computed from its width and height with exactly this theorem. +The screen's width and height form the legs of a right triangle. Its diagonal is the hypotenuse; knowing two of these lengths lets us calculate the third. -### Straight-line distance -GPS and mapping tools use it to turn an east-west offset and a north-south offset into a single straight-line distance. +### Distance on a grid -### Ladder safety -Knowing the ladder's length and how far its base sits from the wall tells you how high it reaches, and vice versa. +Moving 3 units horizontally and 4 vertically places you 5 units from the start in a straight line. The two-leg route itself is 7 units long, so distinguish route length from straight-line distance. From de440d1aebd7170c125b9e2f11dcc2d44472e94d Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:01:31 +0300 Subject: [PATCH 036/124] content: rewrite surface-area-and-volume for first-time learners in both languages --- .../geometry/surface-area-and-volume/ar.md | 58 ++++++++---------- .../geometry/surface-area-and-volume/en.md | 59 ++++++++----------- .../surface-area-and-volume/lesson.yaml | 6 +- 3 files changed, 55 insertions(+), 68 deletions(-) diff --git a/content/lessons/geometry/surface-area-and-volume/ar.md b/content/lessons/geometry/surface-area-and-volume/ar.md index b22bbce2..ea122e76 100644 --- a/content/lessons/geometry/surface-area-and-volume/ar.md +++ b/content/lessons/geometry/surface-area-and-volume/ar.md @@ -1,66 +1,60 @@ --- title: 'المساحة السطحية والحجم' -summary: >- - ضاعف حجم الجسم يكبر سطحه أربع مرات وجوفه ثماني مرات. لهذا يبرد الفأر سريعًا ولا يكاد - الفيل يشعر بالبرد. +summary: 'قارن نمو مساحة السطح مع مربع الطول بنمو الحجم مع مكعبه عند تكبير جسم.' parameters: - s: s — القياس + s: 's — طول حرف المكعب بالمتر' variables: - - المساحة السطحية الكلية للمكعب - - الحجم الذي يحصره المكعب - - طول أحد أضلاعه + - 'A: مساحة سطح المكعب بالمتر المربع' + - 'V: حجم المكعب بالمتر المكعب' + - 's: طول حرف المكعب' --- ## Try it -1. حرّك «s — القياس» من الصغير إلى الكبير وراقب المكعب يكبر. اقرأ «المساحة السطحية» و«الحجم» تحته وأنت تفعل ذلك. -2. راقب النسبة «المساحة ÷ الحجم». تستمر في التناقص كلما كبر المكعب، رغم أن الرقمين فوقها يكبران معًا. -3. قارن قراءتي الكرة والأسطوانة عند «s» نفسها. تتناقص نسبة المساحة إلى الحجم فيهما بالطريقة نفسها، لأن هذه حقيقة عن القياس لا عن الشكل نفسه. +1. اضبط s = 1. مساحة سطح المكعب 6 م² وحجمه 1 م³. الكميتان ليستا متساويتين، ولهما وحدتان مختلفتان. +2. اضبط s = 2. تصبح المساحة 24 م²، أي أربعة أمثالها، والحجم 8 م³، أي ثمانية أمثاله. +3. قارن المساحة مقسومة على الحجم: تنخفض من 6 إلى 3 لكل متر. وتنخفض نسبتا الكرة والأسطوانة إلى النصف أيضًا عند مضاعفة s، مع أن s يمثل طول الحرف للمكعب ونصف القطر للكرة والأسطوانة. ## Real-life examples -1. **فأر.** عند s = 0.3 متر تكون المساحة السطحية صغيرة، لكنها كبيرة مقارنة بالحجم الذي عليها تدفئته. فالحيوانات الصغيرة تفقد حرارتها بسرعة وتحتاج إلى الأكل باستمرار لتعويضها. -2. **صندوق بحجم إنسان.** عند s = 1 متر تتساوى المساحة والحجم عدديًا، وهذا هو حجم التعادل بين الأثرين. -3. **فيل.** عند s = 3 أمتار، يكبر الحجم أكثر بكثير من المساحة، فيفقد الفيل حرارته ببطء، وقد يسخن في الشمس دون أذنين كبيرتين تضيفان له مساحة إضافية. +1. **مكعب صغير.** عند s = 0.3 م، تكون المساحة 0.54 م² والحجم 0.027 م³، ونسبة مساحة السطح إلى الحجم 20 لكل متر. +2. **مكعب حرفه متر.** عند s = 1 م، تحيط ستة أوجه، مساحة كل منها متر مربع، بحجم متر مكعب. النسبة 6 لكل متر. +3. **مكعب حرفه ثلاثة أمتار.** عند s = 3 م، تكون المساحة 54 م² والحجم 27 م³. النسبة 2 لكل متر، أي ثلث نسبة المكعب ذي الحرف البالغ مترًا واحدًا. ## Test yourself -1. اضبط الحجم على 1 متر بالضبط، نقطة التعادل بين المساحة والحجم. -2. اجعل المساحة السطحية 24 مترًا مربعًا بالضبط. -3. اجعل الحجم 27 مترًا مكعبًا بالضبط. +1. اضبط طول حرف المكعب على 1 م. +2. اجعل مساحة السطح 24 م². +3. اجعل الحجم 27 م³. ## Intuition -حرّك «s — القياس» وراقب المكعب ينتفخ. وجوهه الستة هي الأجزاء التي تلامس الهواء أو الماء أو الشمس من الخارج، ومجموعها هو المساحة السطحية. وكل ما بداخل جلد المكعب، كل مادة أو نسيج حيّ يحويه، هو الحجم. +تقيس مساحة السطح الأوجه الستة التي تغطي المكعب، ويقيس الحجم الحيز الذي يحصره. للمكعب ذي الحرف البالغ مترًا واحدًا ستة أمتار مربعة من السطح، لكنه يحصر مترًا مكعبًا واحدًا. تبين الوحدات منذ البداية أننا نقيس شيئين مختلفين. -كلاهما يكبر وأنت تسحب المنزلق للأعلى، لكن ليس بالمعدل نفسه. الوجوه صفائح مسطحة، فتكبر مساحتها بمربع القياس، أما الجسم الصلب فيملأ كتلة، فيكبر حجمه بمكعّب القياس. ارفع «s» من 1 إلى 2 وتحقّق من القراءات. تصبح المساحة أكبر بأربع مرات فقط، بينما يصبح الحجم أكبر بثماني مرات، من التضعيف نفسه، بنمو مختلف تمامًا. +مضاعفة الحرف تضاعف بُعدي كل وجه، فتصبح مساحته أربعة أمثالها. وفي الداخل، تتسع كل جهة من الجهات الثلاث لنسختين من المكعب الأصلي، فتتسع النسخة الكبيرة لثمانية مكعبات. لذلك يزداد الحجم أسرع من مساحة السطح عند التكبير المتناسب. يبقى المكعب المرجعي المتقطع بحرف طوله 1 م، بينما يتغير المكعب الملوّن. ## Formal -لمكعب طول ضلعه $s$، تكون مساحته السطحية $A = 6s^2$ (ستة وجوه، كل منها $s^2$)، وحجمه $V = s^3$، فنسبتهما $\dfrac{A}{V} = \dfrac{6}{s}$. +لمكعب طول حرفه الموجب $s$، تكون مساحة السطح $A=6s^2$ والحجم $V=s^3$. ونسبتهما $A/V=6/s$. إذا قسنا s بالمتر، كانت وحدة هذه النسبة مقلوب المتر، وليست عددًا بلا وحدة. -ينطبق النمط نفسه على أي شكل ثابت يُكبَّر بالتناسب. تتناسب المساحة دائمًا مع مربع القياس بينما يتناسب الحجم مع مكعّب القياس، فتنخفض نسبة المساحة إلى الحجم دائمًا مثل $1/s$، وهذا ما يُعرف بقانون التربيع والتكعيب. +التكبير المتناسب بمعامل موجب k يضرب كل مساحة في $k^2$ وكل حجم في $k^3$. لذلك يضرب نسبة مساحة السطح إلى الحجم في $1/k$. هذا هو قانون المربع والمكعب، ويشترط الحفاظ على نسب أبعاد الشكل. ## Advanced -لكرة نصف قطرها $s$، $A = 4\pi s^2$ و$V = \tfrac{4}{3}\pi s^3$، فنسبتها $3/s$. ولأسطوانة نصف قطرها $s$ وارتفاعها $2s$، $A = 6\pi s^2$ و$V = 2\pi s^3$، فنسبتها $3/s$ أيضًا. والثابت أمام $1/s$ يعتمد على الشكل، لكن تناقصه مثل $1/s$ لا يعتمد عليه. وهذا أحد أسباب بقاء الخلايا مجهرية. فبعد حجم معيّن لا يعود سطح الخلية قادرًا على تزويد حجمها بالانتشار وحده. +تستخدم قراءة الكرة s نصف قطر، فتكون النسبة 3/s. وتستخدم الأسطوانة نصف قطر s وارتفاعًا 2s، مع احتساب القاعدتين، فتكون نسبتها 3/s أيضًا. لا تتساوى أحجام هذه الأجسام عند s نفسها. تشترك النسب في تناقصها عكسيًا مع الطول، لكن مقارنة الأشكال عند حجم متساوٍ مسألة أخرى. ## Derivation -1. لمكعب طول ضلعه $s$ ستة وجوه مربعة متطابقة. كل وجه مساحته $s^2$، فالمساحة السطحية الكلية $A = 6s^2$. -2. كوّم حجم المكعب على شكل $s$ طبقة، كل طبقة صفيحة $s \times s$ سُمكها وحدة واحدة. فيعطي ذلك $V = s \cdot s \cdot s = s^3$. -3. قسمة الصيغتين تعطي $\dfrac{A}{V} = \dfrac{6s^2}{s^3} = \dfrac{6}{s}$، وهي نسبة تصغر أكثر فأكثر كلما كبر $s$، رغم أن $A$ و$V$ يكبران معًا. +1. كل وجه مربع ضلعه s ومساحته s². تعطي الأوجه الستة مساحة كلية 6s². +2. الحجم حاصل ضرب مساحة القاعدة في الارتفاع: نضرب s² في s فنحصل على s³. تصح الصيغة حتى عندما لا يكون الطول عددًا صحيحًا. +3. نقسم 6s² على s³ فنحصل على 6/s. زيادة s تزيد المساحة والحجم معًا، لكنها تقلل نسبتهما. ## Real world -### فقد الحرارة عند الحيوانات -مساحة سطح الحيوانات الصغيرة كبيرة مقارنة بحجمها، فتفقد حرارة جسمها بسرعة، ولذا يأكل الفأر وابن عرس تقريبًا باستمرار. أما الحيوانات الكبيرة كالفيل والحوت فمشكلتها عكسية، وتحتاج طرقًا للتخلص من الحرارة الزائدة. +### التغليف والسعة -### الخلايا والانتشار -تمتص الخلية الحية غذاءها وأكسجينها من سطحها فقط، فإذا كبرت بعد حجم معيّن يفوق حجمها ما يستطيع ذلك السطح تزويده، ولهذا تنقسم الخلايا بدل أن تكبر باستمرار. +مضاعفة أبعاد صندوق مكعب كلها تحتاج إلى أربعة أمثال مادة السطح إذا ثبت السمك، لكنها تعطي ثمانية أمثال السعة الداخلية في نموذج مثالي رقيق الجدران. -### التغليف وفقد الحرارة في المباني -مبنى كبير واحد يفقد عبر جدرانه حرارة أقل نسبيًا من الحجم نفسه موزّعًا على بيوت صغيرة كثيرة، وهذا أحد أسباب رخص تدفئة العمارات السكنية لكل شخص فيها. +### تقسيم كتلة -### مكعبات الثلج والذوبان -يذوب الثلج المكسّر أسرع بكثير من مكعب ثلج كبير واحد بالحجم الكلي نفسه، لأن التكسير يضاعف المساحة السطحية المعرَّضة للمشروب الدافئ. +قسّم مكعبًا إلى ثمانية مكعبات صغيرة متساوية. لا يتغير مجموع أحجامها، لكن مجموع مساحة سطحها المكشوف يتضاعف إذا فصلناها وكشفنا جميع الأوجه الجديدة. diff --git a/content/lessons/geometry/surface-area-and-volume/en.md b/content/lessons/geometry/surface-area-and-volume/en.md index cad6a4f8..40fba240 100644 --- a/content/lessons/geometry/surface-area-and-volume/en.md +++ b/content/lessons/geometry/surface-area-and-volume/en.md @@ -1,67 +1,60 @@ --- title: Surface area and volume -summary: >- - Double an object's size and its skin only grows fourfold while its insides - grow eightfold — which is why a mouse chills fast and an elephant barely - notices the cold. +summary: 'Compare the square growth of surface area with the cube growth of volume as an object is enlarged.' parameters: - s: s — size + s: 's — cube edge length in metres' variables: - - the total surface area of the cube - - the volume enclosed by the cube - - the length of one edge + - 'A: cube surface area in square metres' + - 'V: cube volume in cubic metres' + - 's: cube edge length' --- ## Try it -1. Drag «s — size» from small to large and watch the cube grow. Read «surface area» and «volume» below it as you go. -2. Watch the ratio «area ÷ volume»: it keeps shrinking as the cube grows, even though both numbers above it are getting bigger. -3. Compare the sphere and cylinder readouts at the same «s»: their area-to-volume ratios shrink the same way, because this is a fact about size, not about the particular shape. +1. Set s = 1. The cube has surface area 6 m² and volume 1 m³. These quantities are not equal and have different units. +2. Set s = 2. Area becomes 24 m², four times as much; volume becomes 8 m³, eight times as much. +3. Compare area divided by volume: it falls from 6 to 3 per metre. The sphere and cylinder ratios also halve when s doubles, although their sizes are defined differently. ## Real-life examples -1. **Mouse.** At s = 0.3 m the surface area is tiny but still large next to the volume it has to warm — small animals lose heat fast and must eat constantly to replace it. -2. **A person-sized crate.** At s = 1 m, area and volume are numerically equal — the crossover size where the two effects balance. -3. **Elephant.** At s = 3 m, the volume has grown far more than the surface, so an elephant sheds heat slowly and can overheat in the sun without huge ears to add extra surface. +1. **A small cube.** At s = 0.3 m, the cube has area 0.54 m², volume 0.027 m³ and area-to-volume ratio 20 per metre. +2. **A one-metre cube.** At s = 1 m, six one-square-metre faces enclose one cubic metre. The area-to-volume ratio is 6 per metre. +3. **A three-metre cube.** At s = 3 m, the area is 54 m² and volume 27 m³. The ratio is 2 per metre, one third of the one-metre cube's ratio. ## Test yourself -1. Set the size to exactly 1 m, the crossover point where area equals volume. -2. Make the surface area exactly 24 square metres. -3. Make the volume exactly 27 cubic metres. +1. Set the cube's edge length to 1 m. +2. Make the surface area 24 m². +3. Make the volume 27 m³. ## Intuition -Drag «s — size» and watch the cube swell. Its six faces are the parts that touch the outside air, water or sun — that total is the surface area. Everything inside the cube's skin, every bit of material or body tissue it contains, is the volume. +Surface area measures the six faces covering the cube; volume measures the space it encloses. A cube with one-metre edges has six square metres of surface but only one cubic metre of volume. The units already tell us that these measure different things. -Both grow as you drag the slider up, but not at the same rate: the faces are flat sheets, so their area grows with the square of the size, while the solid fills a block, so its volume grows with the cube of the size. Push «s» from 1 up to 2 and check the readouts: the area only becomes 4 times bigger, but the volume becomes 8 times bigger — the same doubling, very different growth. +Doubling an edge doubles both dimensions of every face, making each face four times as large. Inside, two copies fit along each of three directions, so eight original cubes fit in the enlarged cube. Volume therefore increases faster than surface area under uniform enlargement. The dashed reference cube keeps edge length 1 m while the solid cube changes. ## Formal -For a cube of edge $s$, the surface area is $A = 6s^2$ (six faces, each $s^2$) and the volume is $V = s^3$, so their ratio is $\dfrac{A}{V} = \dfrac{6}{s}$. +For a cube of positive edge length $s$, surface area is $A=6s^2$ and volume is $V=s^3$. Their ratio is $A/V=6/s$. If s is in metres, this ratio has unit inverse metres, not a unit-free value. -The same pattern holds for any fixed shape scaled up uniformly: area always scales with the square of the size while volume scales with the cube, so the surface-to-volume ratio always falls as $1/s$ — this is the square-cube law. +Uniform scaling by a positive factor k multiplies every area by $k^2$ and every volume by $k^3$. It therefore multiplies the surface-area-to-volume ratio by $1/k$. This is the square–cube law; it requires the shape's proportions to remain fixed. ## Advanced -For a sphere of radius $s$, $A = 4\pi s^2$ and $V = \tfrac{4}{3}\pi s^3$, giving ratio $3/s$; for a cylinder of radius $s$ and height $2s$, $A = 6\pi s^2$ and $V = 2\pi s^3$, giving ratio $3/s$ too — the constant in front of $1/s$ depends on the shape, but the $1/s$ decay does not. This is one reason cells stay microscopic: past a certain size a cell's surface can no longer supply its volume fast enough by diffusion alone. +The sphere readout uses radius s, giving ratio 3/s. The cylinder uses radius s and height 2s, including both end caps, and also gives 3/s. These shapes do not have equal volumes at the same s. Their ratios share the inverse-size pattern, but comparing shape efficiency at equal volume is a different question. ## Derivation -1. A cube of side $s$ has 6 identical square faces. Each one has area $s^2$, so the total surface area is $A = 6s^2$. -2. Stack up the cube's volume as $s$ layers, each layer an $s \times s$ sheet one unit thick: that gives $V = s \cdot s \cdot s = s^3$. -3. Dividing the two formulas gives $\dfrac{A}{V} = \dfrac{6s^2}{s^3} = \dfrac{6}{s}$ — a ratio that gets smaller and smaller as $s$ grows, even though $A$ and $V$ are both increasing. +1. Each cube face is a square of side s and area s². Six faces give total area 6s². +2. Volume is base area times height: s² multiplied by s gives s³. This formula also applies to noninteger lengths. +3. Divide 6s² by s³ to obtain 6/s. Increasing s increases both area and volume, while reducing their ratio. ## Real world -### Animal heat loss -Small animals have a large surface area for their volume and lose body heat quickly, so mice and shrews eat almost constantly; large animals like elephants and whales have the opposite problem and need ways to shed excess heat. +### Wrapping and filling -### Cells and diffusion -A living cell absorbs food and oxygen only through its surface, so once it grows past a certain size its volume outgrows what that surface can supply — which is why cells divide instead of simply growing bigger. +Doubling every dimension of a cubical box requires four times the surface material at the same thickness, but creates eight times the internal capacity in an ideal thin-wall model. -### Packaging and heat loss in buildings -A single large building loses proportionally less heat through its walls than the same volume split into many small houses, which is one reason apartment blocks are cheaper to heat per person. +### Dividing a block -### Ice cubes and melting -Crushed ice melts far faster than a single large ice cube of the same total volume, because breaking it up multiplies the surface area exposed to the warm drink. +Cut a cube into eight equal smaller cubes. Their combined volume is unchanged, but their total exposed surface area is twice the original if all new faces are separated and exposed. diff --git a/content/lessons/geometry/surface-area-and-volume/lesson.yaml b/content/lessons/geometry/surface-area-and-volume/lesson.yaml index 84f9c6c5..995c05e9 100644 --- a/content/lessons/geometry/surface-area-and-volume/lesson.yaml +++ b/content/lessons/geometry/surface-area-and-volume/lesson.yaml @@ -30,9 +30,9 @@ variables: - V - s derivation: -- \text{a cube of side } s \text{ has 6 identical square faces, each of area } s^2 \text{, so } A = 6s^2 -- \text{stacking a base layer of } s\times s\times 1 \text{ unit cubes } s \text{ layers high gives } V = s\cdot s\cdot s = s^3 -- \text{dividing the two gives the ratio } \dfrac{A}{V} = \dfrac{6s^2}{s^3} = \dfrac{6}{s} \text{, which shrinks as } s \text{ grows} + - '\text{six square faces of area }s^2\text{ give }A=6s^2' + - 'V=\text{base area}\times\text{height}=s^2\cdot s=s^3' + - '\frac{A}{V}=\frac{6s^2}{s^3}=\frac6s\quad(s>0)' charts: [] primary: s presets: From f4390afd407e61f990a0e7c49ad78e58f623dcfc Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:01:31 +0300 Subject: [PATCH 037/124] content: rewrite transformations-and-symmetry for first-time learners in both languages --- .../transformations-and-symmetry/ar.md | 71 +++++++++--------- .../transformations-and-symmetry/en.md | 73 +++++++++---------- .../transformations-and-symmetry/lesson.yaml | 6 +- 3 files changed, 69 insertions(+), 81 deletions(-) diff --git a/content/lessons/geometry/transformations-and-symmetry/ar.md b/content/lessons/geometry/transformations-and-symmetry/ar.md index 148a3f54..12e0b472 100644 --- a/content/lessons/geometry/transformations-and-symmetry/ar.md +++ b/content/lessons/geometry/transformations-and-symmetry/ar.md @@ -1,72 +1,67 @@ --- title: التحويلات الهندسية والتماثل -summary: >- - اسحب البلاطة أو أدرها أو اعكسها. كل طول وزاوية تبقى كما هي، فيتكرر النمط بلا نهاية. +summary: 'قارن الإزاحة والدوران والانعكاس، ثم حدد متى يعيد التحويل الشكل إلى نفسه.' parameters: - angle: θ — زاوية الدوران - tx: t_x — الانزياح الأفقي - ty: t_y — الانزياح الرأسي - flip: الانعكاس (0 معطّل، 1 مفعّل) + angle: 'θ — زاوية الدوران؛ الموجب مع عقارب الساعة في هذا العرض' + tx: 't_x — الإزاحة الأفقية؛ الموجب إلى اليمين' + ty: 't_y — الإزاحة الرأسية؛ الموجب إلى الأسفل' + flip: 'الانعكاس — معطل (0) أو مفعل (1)، ويطبق قبل الدوران' variables: - - إحداثي x لنقطة على البلاطة الأصلية - - إحداثي y لنقطة على البلاطة الأصلية - - إحداثي x لتلك النقطة بعد الحركة - - إحداثي y لتلك النقطة بعد الحركة - - الزاوية التي دارتها البلاطة حول المحور O - - مقدار انزلاق البلاطة أفقيًا - - مقدار انزلاق البلاطة رأسيًا + - 'x: الإحداثي الأفقي الأصلي بالنسبة إلى O' + - 'y: الإحداثي الرأسي الأصلي، وموجبه إلى الأسفل' + - 'x′: الإحداثي الأفقي بعد التحويل' + - 'y′: الإحداثي الرأسي بعد التحويل' + - 'θ: زاوية الدوران حول O قبل الإزاحة' + - 't_x: الإزاحة الأفقية' + - 't_y: الإزاحة الرأسية' --- ## Try it -1. حرّك «t_x — الانزياح الأفقي» و«t_y — الانزياح الرأسي». تنزلق البلاطة الملوّنة عن الأصل المتقطع، لكنها تحافظ على الحجم والاتجاه نفسيهما تمامًا. وهذا هو الانسحاب. -2. أعد الانزياحين إلى صفر ثم حرّك «θ — زاوية الدوران». تدور البلاطة الملوّنة حول النقطة السوداء O كعقرب الساعة. وهذا هو الدوران. -3. فعّل «الانعكاس». تتحول البلاطة الملوّنة فجأة إلى صورة مرآة للأصل المتقطع، منعكسة حول الخط الأحمر المتقطع المار بـ O، وهذا شكل لا يمكن الوصول إليه بأي انسحاب أو دوران مهما حاولت، بل بالانعكاس وحده. +1. اضبط angle = 0 وflip = 0 وty = 0، ثم غيّر tx من 0 إلى 2. تتحرك كل نقطة وحدتين أفقيًا. +2. أعد tx = ty = 0 وأبقِ flip = 0. اضبط angle = 90. تدور القطعة حول O؛ وبحسب اتجاه الإحداثيات في هذا العرض، يظهر الدوران الموجب مع عقارب الساعة. +3. أعد angle = 0 واجعل flip = 1 مع إزاحتين صفريتين. تحصل على انعكاس حول الخط الرأسي المتقطع المار بـO. قارن الرؤوس المتناظرة، لا الحد الخارجي وحده. ## Real-life examples -1. **انسحاب بلاطة على أرضية.** أزح بلاطة رصف وحدتين جانبًا دون أي دوران أو انعكاس. تتحرك كل نقطة فيها بالمقدار نفسه بالضبط، وهذا انسحاب خالص. -2. **إدارة مقود السيارة.** أدر البلاطة 90° حول نقطة المركز دون أي انزياح جانبي. تدور كل نقطة فيها بالزاوية نفسها حول O، وهذا دوران خالص. -3. **التحقق من صورة المرآة.** ضع البلاطة أمام مرآة دون انزلاق ولا دوران. تبدو الصورة بالحجم نفسه لكن الحرف L أصبح ملتفًّا في الاتجاه المعاكس، ولا يمكنك تدوير الأصل ليطابقها أبدًا. +1. **نسخة مزاحة.** عند angle = 0 وtx = 2 وty = 0 وflip = 0، تنتقل القطعة وحدتين إلى اليمين دون دوران. +2. **ربع دورة.** عند angle = 90 وإزاحتين صفريتين وflip = 0، تدور كل نقطة ربع دورة حول O. تقطع النقاط الأبعد عن O مسافة أطول، رغم اشتراكها في زاوية الدوران. +3. **صورة منعكسة.** عند angle = 0 وإزاحتين صفريتين وflip = 1، تنتقل كل نقطة إلى الجانب الآخر من المحور الرأسي، مع بقاء بعدها العمودي عنه كما هو. ## Test yourself -1. أدر البلاطة 180° بالضبط حول O. -2. فعّل الانعكاس دون أي دوران، بحيث تصبح البلاطة مجرد صورة مرآة للأصل. -3. أدر البلاطة قريبًا من 180° مع إبقاء منزلقي الانزياح عند صفر، بحيث تدور في مكانها حول O. +1. اضبط angle = 180. لا يقيد هذا الفحص بقية الإعدادات. +2. اضبط flip = 1 وangle = 0. اجعل الإزاحتين صفرًا أيضًا لرؤية انعكاس وحده. +3. اجعل tx = ty = 0 وangle أكبر من 170°. يقبل الفحص أي زاوية تتجاوز 170°، لا نصف دورة فقط. أبقِ flip = 0 لفحص الدوران وحده. ## Intuition -راقب البلاطة الأصلية المتقطعة والبلاطة الملوّنة معًا. مهما حرّكت المنزلقات، تبقى البلاطة الملوّنة بالحجم والشكل نفسيهما تمامًا كالأصل: طول كل ضلع وزاوية كل ركن كما هي. لا يتغيّر سوى موضعها، أو اتجاهها، أو جهة التفافها. ولا شيء في البلاطة نفسها يتمدد أو ينضغط. +تنقل الإزاحة كل نقطة بالمقدار والاتجاه نفسيهما. ويدير الدوران كل نقطة بالزاوية نفسها حول مركز. أما الانعكاس فيضع النقاط على الجانب الآخر من محور، مع تساوي بعدها العمودي عنه. تحافظ التحويلات الثلاثة على المسافات والزوايا، فتظل القطعة الناتجة متطابقة مع الأصل. -الانزلاق (الانسحاب) يحرّك كل نقطة المسافة نفسها في الاتجاه نفسه، فلا تدور البلاطة إطلاقًا. أما الدوران فيبقي نقطة واحدة، هي المحور O، ثابتة، ويلفّ كل نقطة أخرى حولها بالزاوية نفسها، كأن البلاطة مثبّتة بدبوس عند O. والانعكاس مختلف عنهما كليًا. يحوّل البلاطة إلى صورتها المرآتية، فالحرف L الذي كان ملتفًّا يمينًا يصبح ملتفًّا يسارًا، ولا يقدر أي مزيج من الانزلاق والدوران على التراجع عن ذلك، لا يصلحه إلا انعكاس آخر. +تماثل الشكل هو تحويل يعيده إلى نفسه بالكامل، وليس مجرد تحويله إلى نسخة متطابقة في مكان آخر. مثلًا، يعيد انعكاس المربع حول أحد قطريه المربع إلى نفسه بوصفه مجموعة نقاط. وقد يخفي الحد المتماثل اختلاف مسارات النقاط بين تحويلين؛ لذا تتبع رؤوسًا محددة عند مقارنة الانعكاس بالدوران. ## Formal -الدوران بزاوية $\theta$ حول نقطة الأصل، متبوعًا بانسحاب، يرسل النقطة $(x, y)$ إلى $(x', y')$ حيث $x' = x\cos\theta - y\sin\theta + t_x$ و$y' = x\sin\theta + y\cos\theta + t_y$. +عندما يكون الانعكاس معطلًا، يحول دوران بزاوية θ حول الأصل تتبعه إزاحة النقطة $(x,y)$ إلى $(x',y')$، حيث $x'=x\cos\theta-y\sin\theta+t_x$ و$y'=x\sin\theta+y\cos\theta+t_y$. تحافظ الصيغتان على المسافات بين النقاط. -أما الانعكاس حول المحور الرأسي المار بنقطة الأصل فيرسل $(x, y)$ إلى $(-x, y)$، وجمع هذا مع الدوران والانسحاب يعطي كل حركة صلبة ممكنة في المستوي، مباشرة كانت أو معكوسة. +يحول الانعكاس حول المحور الرأسي $(x,y)$ إلى $(-x,y)$. إذا فعّلناه هنا، يُطبق قبل الدوران والإزاحة. يعتبر العرض اتجاه y الموجب إلى الأسفل، لذا تحرك ty الموجبة القطعة إلى الأسفل، وتظهر θ الموجبة مع عقارب الساعة. أما عند توجيه محور y إلى الأعلى كما هو معتاد، فتعطي صيغ الدوران نفسها حركة عكس عقارب الساعة. ## Advanced -هذه هي تمامًا متساويات القياس في المستوي، وهي التحويلات التي تحافظ على المسافة بين كل زوج من النقاط. وكل متساوية قياس هي واحدة من أربعة أنواع فقط: انسحاب، أو دوران، أو انعكاس، أو انعكاس انزلاقي (انعكاس مع انسحاب على طول خط المرآة نفسه)، وأي نمط يتكرر بتأثير بعض هذه الحركات، كورق الجدران أو حدود الأشرطة الزخرفية، ينتمي إلى واحدة من قائمة محدودة ومصنَّفة بالكامل من زمر التماثل. +ترتيب التحويلات مهم. تدوير نقطة ثم إزاحتها يختلف غالبًا عن إزاحتها أولًا ثم تدويرها حول المركز الأصلي. تحافظ الإزاحات والدورانات على اتجاه ترتيب نقاط معلّمة غير واقعة على خط واحد، بينما يعكسه الانعكاس. تتعلق هذه العبارة بتناظر النقاط، حتى لو أمكن مطابقة الحد الخارجي لشكل متماثل بأكثر من حركة. ## Derivation -1. الانسحاب يحرّك كل نقطة في البلاطة بالمتجه نفسه، $(t_x, t_y)$، فلا يتغيّر حجم الشكل ولا اتجاهه، بل موضعه فقط. -2. الدوران بزاوية $\theta$ حول نقطة الأصل يحوّل $(x, y)$ إلى $(x\cos\theta - y\sin\theta,\, x\sin\theta + y\cos\theta)$، وهذه صيغة الدوران القياسية التي تُبقي نقطة الأصل نفسها ثابتة. -3. تنفيذ الدوران أولًا ثم إضافة الانسحاب يجمع الاثنين في قاعدة واحدة: $x' = x\cos\theta - y\sin\theta + t_x$ و$y' = x\sin\theta + y\cos\theta + t_y$. +1. تضيف الإزاحة المركبتين نفسيهما إلى كل نقطة. عند طرح إحداثيات نقطتين مزاحتين، تلغى المركبتان المضافتان، فيبقى الفرق بينهما ثابتًا. +2. يدمج الدوران الإحداثيات الأصلية باستخدام الجيب وجيب التمام. تضمن المتطابقة sin² θ + cos² θ = 1 بقاء مربعات المسافات ثابتة. +3. تطبيق الدوران أولًا والإزاحة ثانيًا يعطي الصيغة المعروضة. وإذا فعّلنا الانعكاس، نعكس إشارة إحداثي x الأصلي قبل الخطوتين. ## Real world -### ورق الجدران والأقمشة -يُبنى النمط المتكرر من زخرفة واحدة تُنسخ بالانسحاب والدوران والانعكاس، وقد أثبت الرياضيون وجود 17 طريقة مختلفة جوهريًا فقط لتبليط ورق جدران مستوٍ بهذه الطريقة. +### ترتيب زخرفة -### الروبوتات والرسوم المتحركة -تُحرَّك ذراع الروبوت أو شخصية متحركة بهذه الحركات الصلبة نفسها، مفصلًا بعد مفصل، فيحافظ كل جزء صلب على شكله بينما تعيد الشخصية كاملة ترتيب وضعها. +تضع الإزاحات المتكررة نسخًا من وحدة زخرفية على مسافات منتظمة. ويمكن للانعكاس أو الدوران تغيير ترتيبها مع الحفاظ على حجم كل نسخة. لا تضمن هذه الحركات وحدها تبليطًا خاليًا من الفراغات. -### التصنيع وضبط الجودة -التحقق من مطابقة قطعة مطبوعة أو مشكَّلة لتصميمها غالبًا ما يعني اختبار إمكان انسحاب أو تدوير أو انعكاس شكل فوق الآخر دون أي تمدد، وهذا اختبار تطابق بسيط. +### تحريك أجزاء صلبة -### الجزيئات والبلورات -تماثل الجزيء أو البلورة، أي الدورانات والانعكاسات التي تتركه بلا تغيير ظاهر، يحدد كثيرًا من خواصه الفيزيائية والكيميائية، من طريقة انحناء الضوء عنده إلى طريقة تفاعله. +يمكن تغيير موضع جزء صلب في مخطط مستوٍ بالإزاحة والدوران مع الاحتفاظ بأبعاده. وقد يحتاج التصميم المنعكس إلى قطعة مادية مختلفة، بحسب شكلها والعلامات عليها. diff --git a/content/lessons/geometry/transformations-and-symmetry/en.md b/content/lessons/geometry/transformations-and-symmetry/en.md index 971cd5fe..32cbb85e 100644 --- a/content/lessons/geometry/transformations-and-symmetry/en.md +++ b/content/lessons/geometry/transformations-and-symmetry/en.md @@ -1,74 +1,67 @@ --- title: Transformations and symmetry -summary: >- - Slide a tile, spin it, or flip it in a mirror — three different moves that - each leave every length and angle exactly as they were, which is why - wallpaper and floor patterns can repeat forever without a single seam. +summary: 'Compare translation, rotation and reflection, then identify when a transformation leaves a shape unchanged.' parameters: - angle: θ — rotation angle - tx: t_x — sideways shift - ty: t_y — up/down shift - flip: reflect (0 off, 1 on) + angle: 'θ — rotation angle; positive is clockwise in this display' + tx: 't_x — horizontal shift; positive moves right' + ty: 't_y — vertical shift; positive moves down' + flip: 'reflect — off (0) or on (1), applied before rotation' variables: - - the x-coordinate of a point on the original tile - - the y-coordinate of a point on the original tile - - that point's x-coordinate after the move - - that point's y-coordinate after the move - - the angle turned through, measured around the pivot O - - how far the tile slides sideways - - how far the tile slides up or down + - 'x: original horizontal coordinate relative to O' + - 'y: original vertical coordinate, positive downward' + - 'x′: transformed horizontal coordinate' + - 'y′: transformed vertical coordinate' + - 'θ: angle of rotation about O before translation' + - 't_x: horizontal translation' + - 't_y: vertical translation' --- ## Try it -1. Drag «t_x — sideways shift» and «t_y — up/down shift». The solid L-shaped tile slides away from the dashed original, but keeps exactly the same size and orientation — that's a translation. -2. Drag «θ — rotation angle» instead, back to zero shift first. The solid tile swings around the black dot O like a hand on a clock — that's a rotation. -3. Turn «reflect» on. The solid tile suddenly becomes the mirror image of the dashed one, flipped across the red dashed line through O — no amount of sliding or spinning alone could have produced that shape; only a reflection can. +1. Set angle = 0, flip = 0 and ty = 0. Change tx from 0 to 2. Every point shifts two units horizontally. +2. Reset tx = ty = 0 and keep flip = 0. Set angle = 90. The tile rotates about O; in this screen coordinate convention, positive rotation appears clockwise. +3. Reset angle = 0 and set flip = 1 with both shifts zero. The result is a reflection across the vertical dashed line through O. Compare corresponding corners, not just the outline. ## Real-life examples -1. **Sliding a tile across a floor.** Shift a paving tile 2 units sideways with no turn and no flip: every point of the tile moves by exactly the same amount, a pure translation. -2. **Turning a steering wheel.** Spin the tile 90° about the centre point with no sideways shift: every point sweeps the same angle around O, a pure rotation. -3. **Checking a mirror image.** Hold the tile up to a mirror with no slide and no spin: the reflection looks the same size but the L now curls the other way — you cannot rotate the original to match it. +1. **A shifted copy.** With angle = 0, tx = 2, ty = 0 and flip = 0, the tile translates two units to the right without turning. +2. **A quarter turn.** With angle = 90, zero shifts and flip = 0, every point rotates a quarter turn about O. Points farther from O travel farther, despite sharing the same angle. +3. **A mirror copy.** With angle = 0, zero shifts and flip = 1, each point is reflected to the opposite side of the vertical axis at the same perpendicular distance. ## Test yourself -1. Rotate the tile by exactly 180° about O. -2. Turn reflection on with no rotation, so the tile is a plain mirror image of the original. -3. Rotate close to 180° while keeping both shift sliders at zero, so the tile spins in place around O. +1. Set angle = 180. Other settings are unrestricted by this check. +2. Set flip = 1 and angle = 0. Set both shifts to zero as well to view a pure reflection. +3. Set tx = ty = 0 and angle greater than 170°. The check accepts any angle above 170°, not only a half turn; keep flip = 0 to inspect rotation alone. ## Intuition -Watch the dashed original tile and the solid coloured one together. However you drag the sliders, the solid tile is always exactly the same size and shape as the dashed one — same side lengths, same angles at every corner. Only its position, its direction of facing, or which way it curls can change; nothing about the tile itself is stretched or squashed. +Translation moves every point by the same displacement. Rotation turns every point through the same angle about a centre. Reflection places points across a mirror line at equal perpendicular distances. All three preserve distances and angles, so the transformed tile is congruent to the original. -A slide (translation) moves every point the same distance in the same direction, so the shape doesn't turn at all. A spin (rotation) instead keeps one point, the pivot O, fixed and swings every other point around it by the same angle, like the tile were pinned at O. A flip (reflection) is different from both: it turns the tile into its mirror image, so an L that curled to the right now curls to the left — no combination of sliding and spinning can ever undo that, only another flip can. +A symmetry is a transformation that maps the whole shape onto itself, not merely onto a congruent copy elsewhere. For example, reflecting a square across a diagonal leaves the square unchanged as a set. A symmetric outline may also hide the difference between different point mappings; track particular corners when comparing a reflection with a rotation. ## Formal -A rotation by $\theta$ about the origin followed by a translation sends the point $(x, y)$ to $(x', y')$ where $x' = x\cos\theta - y\sin\theta + t_x$ and $y' = x\sin\theta + y\cos\theta + t_y$. +With reflection off, rotating by θ about the origin and then translating sends $(x,y)$ to $(x',y')$, where $x'=x\cos\theta-y\sin\theta+t_x$ and $y'=x\sin\theta+y\cos\theta+t_y$. These formulas preserve distances between points. -A reflection across the vertical axis through the origin instead sends $(x, y)$ to $(-x, y)$; combining that with a rotation and translation gives every rigid motion of the plane, direct or mirrored. +Reflection in the vertical axis sends $(x,y)$ to $(-x,y)$. Here that reflection, when enabled, happens before rotation and translation. The display takes positive y downward, so positive ty moves down and positive θ appears clockwise. With the usual upward y-axis, the same rotation formulas describe a counterclockwise turn. ## Advanced -These are exactly the isometries of the plane: maps that preserve distance between every pair of points. Every isometry is one of only four kinds — translation, rotation, reflection, or glide reflection (a reflection combined with a translation along the mirror line) — and any pattern that repeats under some of these, like wallpaper or a frieze border, belongs to one of a small, fully classified list of symmetry groups. +The order of transformations matters. Rotating a point and then shifting it generally differs from shifting it first and rotating about the original centre. Translations and rotations preserve the orientation of labelled noncollinear points; reflections reverse it. That statement concerns point correspondence, even when a symmetric shape's outline can be matched by more than one motion. ## Derivation -1. Translating moves every point of the tile by the same vector, $(t_x, t_y)$, so the shape's size and orientation don't change, only its position. -2. Rotating by $\theta$ about the origin turns $(x, y)$ into $(x\cos\theta - y\sin\theta,\, x\sin\theta + y\cos\theta)$ — the standard rotation formula, which keeps the origin itself fixed. -3. Doing the rotation first and then adding the translation combines the two into one rule: $x' = x\cos\theta - y\sin\theta + t_x$ and $y' = x\sin\theta + y\cos\theta + t_y$. +1. A translation adds the same two components to every point. Subtracting two translated coordinates cancels those added components, preserving their displacement. +2. A rotation combines the original coordinates using sine and cosine. The identity sin² θ + cos² θ = 1 ensures that squared distances are preserved. +3. Applying rotation first and translation second gives the displayed formula. If reflection is enabled, negate the original x-coordinate before those two steps. ## Real world -### Wallpaper and fabric -A repeating pattern is built from one motif copied by translations, rotations and reflections; mathematicians have proved there are exactly 17 fundamentally different ways to tile a flat wallpaper this way. +### Arranging a pattern -### Robotics and animation -A robot arm or an animated character is moved and turned using exactly these rigid motions, applied one joint at a time, so each rigid part keeps its shape while the whole figure reconfigures. +Repeated translations place copies of a motif at regular intervals. Reflections or rotations can change the arrangement while preserving each copy's size. These motions alone do not guarantee a gap-free tiling. -### Manufacturing and quality control -Checking that a stamped or 3D-printed part matches its design often means testing whether one shape can be translated, rotated or reflected onto the other with no stretching — a plain congruence check. +### Moving rigid parts -### Molecules and crystals -A molecule's or crystal's symmetry — which rotations and reflections leave it looking unchanged — determines many of its physical and chemical properties, from how it bends light to how it reacts. +A rigid part in a flat mechanical drawing can be repositioned using translation and rotation while retaining its dimensions. A reflected design may require a different physical part, depending on its shape and markings. diff --git a/content/lessons/geometry/transformations-and-symmetry/lesson.yaml b/content/lessons/geometry/transformations-and-symmetry/lesson.yaml index 6a1b1ba1..a611fd70 100644 --- a/content/lessons/geometry/transformations-and-symmetry/lesson.yaml +++ b/content/lessons/geometry/transformations-and-symmetry/lesson.yaml @@ -48,9 +48,9 @@ variables: - t_x - t_y derivation: -- \text{translating first moves every point of the shape by the same vector } (t_x, t_y) -- \text{rotating by } \theta \text{ about the origin turns } (x, y) \text{ into } (x\cos\theta - y\sin\theta,\; x\sin\theta + y\cos\theta) -- \text{doing the rotation before adding the translation gives the combined rule } x' = x\cos\theta - y\sin\theta + t_x,\; y' = x\sin\theta + y\cos\theta + t_y + - '\text{translation alone sends }(x,y)\text{ to }(x+t_x,y+t_y)' + - '\text{rotation alone sends }(x,y)\text{ to }(x\cos\theta-y\sin\theta,\ x\sin\theta+y\cos\theta)' + - '\text{rotation then translation: }x\prime=x\cos\theta-y\sin\theta+t_x,\quad y\prime=x\sin\theta+y\cos\theta+t_y' charts: [] primary: angle presets: From 05cf52abf5c52a178679399ccc58cfe289483526 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:01:31 +0300 Subject: [PATCH 038/124] content: rewrite triangle-angles-and-sides for first-time learners in both languages --- .../geometry/triangle-angles-and-sides/ar.md | 61 +++++++++--------- .../geometry/triangle-angles-and-sides/en.md | 63 +++++++++---------- .../triangle-angles-and-sides/lesson.yaml | 6 +- 3 files changed, 59 insertions(+), 71 deletions(-) diff --git a/content/lessons/geometry/triangle-angles-and-sides/ar.md b/content/lessons/geometry/triangle-angles-and-sides/ar.md index 0b8c8dc3..16518c2f 100644 --- a/content/lessons/geometry/triangle-angles-and-sides/ar.md +++ b/content/lessons/geometry/triangle-angles-and-sides/ar.md @@ -1,67 +1,62 @@ --- title: زوايا المثلث وأضلاعه -summary: >- - زوايا المثلث تجمع دائمًا إلى 180 درجة، وأطول ضلع يقابل أكبر زاوية. +summary: 'تحقق أولًا من إمكان تكوين مثلث بثلاثة أطوال، ثم اربط أطوال أضلاعه بقياسات زواياه.' parameters: - a: الضلع a - b: الضلع b - c: الضلع c + a: 'a — طول الضلع المقابل للزاوية A' + b: 'b — طول الضلع المقابل للزاوية B' + c: 'c — طول الضلع المقابل للزاوية C' variables: - - الزاوية عند الرأس الأول، مقابل الضلع a - - الزاوية عند الرأس الثاني، مقابل الضلع b - - الزاوية عند الرأس الثالث، مقابل الضلع c + - 'A: الزاوية المقابلة للضلع a' + - 'B: الزاوية المقابلة للضلع b' + - 'C: الزاوية المقابلة للضلع c' --- ## Try it -1. حرّك «الضلع a» أعلى وأسفل. يتغيّر شكل المثلث كاملًا، لكن قراءات الزوايا الثلاث A وB وC تبقى تجمع إلى 180°. -2. اجعل الضلع c أطول الأضلاع الثلاثة. راقب الزاوية C، وهي التي تقابل الضلع c، تصبح هي الأكبر أيضًا. -3. ادفع الضلع c أبعد مما يستطيع a وb الوصول إليه (جرّب a = 2، b = 3، c = 8). ينفتح المثلث. الدائرتان المتقطعتان لا تتلامسان بعد الآن، ولا يوجد مثلث بهذه الأطوال الثلاثة. +1. اضبط a = 3 وb = 4 وc = 5. الزاوية C المقابلة لأطول ضلع تساوي 90°، ومجموع الزاويتين الأخريين 90°. +2. اضبط a = b = c = 2. تكون كل زاوية 60°، ومجموع الزوايا 180°. +3. اضبط a = 2 وb = 3 وc = 8. لا يتكون مثلث، لأن مجموع الضلعين الأقصر 5 فقط. ثم اجعل c = 5؛ تعطي المساواة شكلًا مفرودًا على خط، لا مثلثًا ذا مساحة موجبة. ## Real-life examples -1. **مثلث النجار 3-4-5.** أضلاع 3 م و4 م و5 م تلتقي دائمًا بزاوية قائمة مقابل الضلع 5 م، وهذه الحيلة يستخدمها النجارون لضبط زاوية ركن قائمة. -2. **جملون سقف متساوي الأضلاع.** ثلاثة عوارض متساوية طول كل منها 2 م تلتقي بثلاث زوايا متساوية 60°، فتقسم الزاوية المستقيمة 180° بالتساوي. -3. **قضبان أقصر من أن تتلاقى.** إطار مبني من قضبان 2 م و3 م و8 م لا يمكن أن ينغلق. فالقضيبان القصيران، حتى لو مُدّا بخط مستقيم، لا يبلغان 8 م معًا. +1. **إطار قائم الزاوية.** تحدد الأطوال 3 م و4 م و5 م مثلثًا قائمًا، وزاويته القائمة تقابل الضلع ذي الطول 5 م. +2. **إطار متساوي الأضلاع.** تشكل ثلاثة قضبان طول كل منها 2 م مثلثًا متساوي الأضلاع. تقابل الأضلاع المتساوية زوايا متساوية، فتكون كل زاوية 60°. +3. **أطوال لا تغلق الإطار.** لا يستطيع قضيبان طولهما 2 م و3 م وصل طرفين يبعدان 8 م. لا تتقاطع دائرتا الإنشاء، فلا يتكون الإطار المطلوب. ## Test yourself -1. اجعل الأضلاع الثلاثة متساوية، بحيث يصبح المثلث متساوي الأضلاع. -2. اجعل الزاوية عند الرأس الثالث (المقابل للضلع c) تساوي 100°. -3. اختر ثلاثة أطوال أضلاع لا يمكن أن تكوّن مثلثًا على الإطلاق. +1. اجعل الأضلاع الثلاثة متساوية. يقبل الفاحص فرقًا أقل من 0.15 بين a وb، وبين b وc. +2. اختر أطوالًا صالحة تجعل الزاوية C قريبة من 100°. +3. اختر أطوالًا لا تكوّن مثلثًا ذا مساحة موجبة، بما فيها حالة مساواة أطول ضلع لمجموع الضلعين الآخرين. ## Intuition -كل مثلث، مهما تمدد أو انضغط، زواياه تجمع دائمًا إلى خط مستقيم كامل، أي 180°. حرّك «الضلع a» وراقب الشكل يتغيّر تمامًا، ومع ذلك تستقر قراءات الزوايا الثلاث دومًا على مجموع 180°. لا يعتمد هذا على طول الأضلاع إطلاقًا، بل فقط على أن ثلاثة أضلاع مستقيمة تنغلق لتكوّن شكلًا مسطحًا واحدًا. +لبناء مثلث من ثلاثة قضبان، افحص أولًا هل يمكن إغلاقها. يجب أن يكون أطول قضيب أقصر من مجموع الآخرين. إذا ساوى المجموع، استقامت القضبان على خط؛ وإذا زاد عليه، لم يصلا إلى طرفيه. تبين الدائرتان المتقطعتان المواضع الممكنة للرأس الثالث على البعدين المطلوبين من طرفي القاعدة. -يحمل الرسم أيضًا قاعدة عن أي زاوية تكون الأكبر. أي ضلع تمدّده حتى يصبح الأطول، تكبر الزاوية المقابلة له، لا المجاورة له، لتطابقه. اجعل الضلع c أطول الأضلاع، وستصبح الزاوية C عند الرأس المقابل له أكبر زاوية في المثلث. لكن ليست كل ثلاثية أطوال تنغلق. فالدائرتان المتقطعتان تُظهران أين يجب أن يقع الرأس الثالث، فإذا كان الضلعان الأقصران أقصر من أن يصلا إلى تلك المسافة بينهما، تفوت الدائرتان إحداهما الأخرى ولا يوجد مثلث. +عندما يتكون المثلث، تجمع زواياه الداخلية الثلاث إلى 180°. وتقابل أطول أضلاعه أكبر زواياه، وتقابل الأضلاع المتساوية زوايا متساوية. هاتان حقيقتان هندسيتان مرتبطتان، وليستا عبارتين عن النظرية نفسها. تقع الزاوية C مقابل الضلع c، لا عند أحد طرفيه. ## Formal -في أي مثلث برؤوس A وB وC، تحقق زواياه الداخلية $\angle A + \angle B + \angle C = 180^\circ$. وبالمثل، تقع الزاوية الأكبر دائمًا مقابل الضلع الأطول، والزاوية الأصغر مقابل الضلع الأقصر. +لمثلث غير منعدم المساحة في المستوى الإقليدي، فإن $\angle A+\angle B+\angle C=180^\circ$. إذا كانت a وb وc أطوال الأضلاع المقابلة، فإن $a>b$ إذا وفقط إذا كانت $\angle A>\angle B$. وتتقابل الأطوال المتساوية مع زوايا متساوية. -تكوّن ثلاثة أطوال a وb وc مثلثًا فقط إذا كان كل طول أقصر من مجموع الطولين الآخرين. وأصعب حالة هي مقارنة أطول ضلع بمجموع الضلعين الأقصر منه، ولهذا يختبر الرسم أطول ضلع مقابل مجموع الضلعين الآخرين. +تكوّن الأطوال الموجبة a وb وc مثلثًا غير منعدم المساحة إذا وفقط إذا تحققت $a+b>c$ و$a+c>b$ و$b+c>a$. يكفي فحص أن أطولها أصغر قطعًا من مجموع الآخرين. تعطي المساواة شكلًا منعدم المساحة على خط واحد. ## Advanced -على سطح منحنٍ لا يبقى مجموع الزوايا ثابتًا عند 180°. فعلى كرة، كسطح الأرض، تجمع زوايا المثلث إلى أكثر من 180°، والزيادة تتناسب مع مساحة المثلث، وهذه نقطة الانطلاق للهندسة الكروية وغير الإقليدية. +يحسب قانون جيب التمام زاوية من الأطوال الثلاثة: cos C = (a² + b² − c²)/(2ab). يجب تحقق متباينات المثلث للحصول على مثلث ذي مساحة موجبة. وعلى سطح منحنٍ، قد يختلف مجموع زوايا مثلث تحدده مسارات مناسبة على السطح عن 180°؛ فالقاعدة هنا تخص الهندسة المستوية. ## Derivation -1. ارسم خطًّا من الرأس C يوازي الضلع AB. -2. الزاويتان اللتان يصنعهما هذا الخط الجديد مع الضلعين CA وCB تساويان الزاوية A والزاوية B، وهما زاويتان متبادلتان على خط يقطعه خط موازٍ، بالفكرة نفسها لسلّم يعبر درجات متوازية. -3. تقع هذه الزوايا الثلاث الآن جنبًا إلى جنب على خط مستقيم واحد، فتصبح الزاوية A زائد الزاوية B زائد الزاوية C تساوي 180°. +1. ارسم من C خطًا موازيًا لـAB. +2. تنقل الزوايا المتبادلة داخليًا قياسي الزاويتين عند A وB إلى هذا الخط عند C. +3. تملأ هاتان الزاويتان مع الزاوية C الأصلية زاوية مستقيمة، فيكون مجموعها 180°. ## Real world -### النجارة -يتحقق البنّاؤون من استقامة ركن ما بقياس 3 و4 و5 وحدات على الجدارين والقطر بينهما. فإن لم يكن القطر 5 بالضبط، فالركن ليس زاوية قائمة حقيقية. +### صنع إطار ثابت الشكل -### رسم الخرائط -يحدد التثليث موقعًا بقياس زوايا مثلث إلى معلمين معروفين، وقاعدة مجموع الزوايا تتيح للمساح إيجاد الزاوية الثالثة من الزاويتين الأخريين دون قياسها مباشرة. +تحدد ثلاثة أطوال ثابتة شكل المثلث، مع إمكان نقله أو تدويره أو عكسه. لا يستطيع إطار مثلثي مثالي ذو مفاصل تغيير شكله مع ثبات هذه الأطوال؛ أما المنشآت الفعلية فتعتمد أيضًا على قوة المواد والوصلات. -### الهندسة الإنشائية -تُبنى جسور الجملونات من مثلثات لا مربعات، لأن أطوال أضلاع المثلث تحدد زواياه بالكامل، فلا يمكنه أن ينحرف أو ينهار جانبيًا كما يفعل إطار رباعي الأضلاع. +### مقارنة الطرق -### الملاحة -يتحقق البحّارة المخطِّطون لمسار بين ثلاثة موانئ من أن أقصر طريق ممكن يحقق متراجحة المثلث. فلا يمكن لأي مرحلة من الرحلة أن تكون أطول من المرحلتين الأخريين مجتمعتين. +ليست القطعة المستقيمة بين نقطتين أطول من طريق يمر بنقطة ثالثة. وإذا لم تقع النقاط الثلاث على خط واحد، كانت أقصر قطعًا، كما تنص متباينة المثلث. diff --git a/content/lessons/geometry/triangle-angles-and-sides/en.md b/content/lessons/geometry/triangle-angles-and-sides/en.md index d83084b7..1f12b4e1 100644 --- a/content/lessons/geometry/triangle-angles-and-sides/en.md +++ b/content/lessons/geometry/triangle-angles-and-sides/en.md @@ -1,69 +1,62 @@ --- title: Triangle angles and sides -summary: >- - Any triangle's three angles always add to 180°, its longest side always - faces its biggest angle, and some three lengths simply can't close into a - triangle at all. +summary: 'Check whether three lengths form a triangle, then connect its side lengths with its angles.' parameters: - a: side a - b: side b - c: side c + a: 'a — side length opposite angle A' + b: 'b — side length opposite angle B' + c: 'c — side length opposite angle C' variables: - - the angle at the first vertex, facing side a - - the angle at the second vertex, facing side b - - the angle at the third vertex, facing side c + - 'A: angle opposite side a' + - 'B: angle opposite side b' + - 'C: angle opposite side c' --- ## Try it -1. Drag "side a" up and down. The whole triangle reshapes, but the three angle readouts A, B, C still add to 180°. -2. Make side c the longest of the three. Watch angle C — the one that faces side c — become the largest angle too. -3. Push side c far past what a and b can reach (try a = 2, b = 3, c = 8). The triangle breaks open: the two dashed construction circles no longer touch, and there is no triangle with those three lengths. +1. Set a = 3, b = 4 and c = 5. Angle C, opposite the longest side, is 90°. The other two angles add to 90°. +2. Set a = b = c = 2. All three angles are 60°, adding to 180°. +3. Set a = 2, b = 3 and c = 8. No triangle forms because the two shorter lengths total only 5. Then set c = 5: equality gives a flat arrangement, still not a nondegenerate triangle. ## Real-life examples -1. **A 3-4-5 builder's triangle.** Sides 3 m, 4 m and 5 m always meet at a right angle opposite the 5 m side — carpenters use exactly this to square a corner. -2. **An equilateral roof truss.** Three equal 2 m beams meet at three equal 60° angles, splitting the straight 180° evenly. -3. **Rods too short to meet.** A frame built from rods 2 m, 3 m and 8 m simply cannot close: the two short rods, even stretched straight, don't reach 8 m together. +1. **A right-angle frame.** Side lengths 3 m, 4 m and 5 m determine a right triangle, with the right angle opposite the 5 m side. +2. **An equilateral frame.** Three 2 m rods form an equilateral triangle. Equal sides face equal angles, so each angle is 60°. +3. **Lengths that cannot close.** Rods of 2 m and 3 m cannot bridge endpoints 8 m apart. The construction circles do not intersect, and the requested frame cannot form. ## Test yourself -1. Make all three sides equal, so the triangle is equilateral. -2. Make the angle at the third vertex (facing side c) equal to 100°. -3. Pick three side lengths that cannot form a triangle at all. +1. Make all three sides equal; the checker allows small differences below 0.15 between a and b and between b and c. +2. Choose valid side lengths making angle C approximately 100°. +3. Choose side lengths that fail to form a nondegenerate triangle, including the boundary case where the longest equals the sum of the other two. ## Intuition -Every triangle, no matter how stretched or squashed, has angles that add to exactly a straight line — 180°. Drag "side a" and watch the shape change completely, yet the three angle readouts always settle back to a total of 180°. It never depends on how long the sides are, only on the fact that three straight sides close up into one flat shape. +To build a triangle from three rods, first check whether they can close. The longest rod must be shorter than the other two combined. If their combined length equals it, they lie flat; if it is smaller, they cannot reach. The dashed circles show the possible locations of the third vertex at the required distances from the two endpoints. -The picture also carries a rule about which angle is biggest: whichever side you stretch the longest, the angle sitting across from it — not next to it — grows to match. Make side c the longest and angle C, at the vertex facing it, becomes the largest angle in the triangle. But not every trio of lengths can close up at all: the two dashed circles show where the third vertex would have to sit, and if the two shorter sides are too short to reach that far apart, the circles miss each other and no triangle exists. +Once a triangle forms, its three interior angles add to 180°. Its longest side faces its largest angle, and equal sides face equal angles. These are two related geometric facts, not two ways of stating the same theorem. The angle labelled C sits opposite the side labelled c, not at one of that side's endpoints. ## Formal -For any triangle with vertices A, B and C, the interior angles satisfy $\angle A + \angle B + \angle C = 180^\circ$. Equivalently, the largest angle is always opposite the longest side, and the smallest angle opposite the shortest side. +For a nondegenerate triangle in a Euclidean plane, $\angle A+\angle B+\angle C=180^\circ$. If a, b and c are the opposite side lengths, then $a>b$ exactly when $\angle A>\angle B$. Equal side lengths correspond to equal opposite angles. -Three lengths a, b and c form a triangle only if each one is shorter than the sum of the other two; the tightest case is the longest side against the two shorter ones combined, which is why the picture tests the longest side against the sum of the other two. +Positive lengths a, b and c form a nondegenerate triangle exactly when $a+b>c$, $a+c>b$ and $b+c>a$. It is enough to check that the longest is strictly less than the sum of the other two. Equality gives a degenerate, zero-area configuration. ## Advanced -On a curved surface the angle sum is no longer fixed at 180°: on a sphere, like the Earth's surface, a triangle's angles add to more than 180°, with the excess proportional to the triangle's area — the starting point for spherical and non-Euclidean geometry. +The law of cosines calculates an angle from all three lengths: cos C = (a² + b² − c²)/(2ab). The triangle inequalities must hold for a nondegenerate triangle. On a curved surface, triangles defined by appropriate surface paths can have an angle sum different from 180°; the rule here concerns flat geometry. ## Derivation -1. Draw a line through vertex C parallel to side AB. -2. The two angles this new line makes with sides CA and CB equal angle A and angle B — alternate angles on a line cut by a parallel, the same idea as a ladder crossing parallel rungs. -3. Those three angles now sit side by side along one straight line, so angle A plus angle B plus angle C equals 180°. +1. Draw a line through C parallel to AB. +2. Alternate interior angles transfer the angles at A and B to that line at C. +3. Those two angles and the original angle C fill a straight angle, so their sum is 180°. ## Real world -### Carpentry -Builders check a corner is square by measuring 3, 4 and 5 units along the two walls and the diagonal; if the diagonal isn't exactly 5, the corner isn't a true right angle. +### Making a rigid frame -### Cartography -Triangulation finds a location by measuring the angles of a triangle to two known landmarks — the angle sum rule lets a surveyor find the third angle from the other two without measuring it directly. +Three fixed side lengths determine a triangle's shape up to rigid motion and reflection. An ideal hinged triangular frame cannot change shape while keeping those lengths; real structures also depend on material strength and connections. -### Structural engineering -Truss bridges are built from triangles rather than squares because a triangle's side lengths pin down its angles completely, so it can't rack or collapse sideways the way a four-sided frame can. +### Comparing routes -### Navigation -Sailors plotting a course between three ports check the shortest possible route obeys the triangle inequality: no leg of the journey can be longer than the other two legs combined. +The straight segment between two points is no longer than a route through a third point. For three noncollinear points it is strictly shorter, matching the triangle inequality. diff --git a/content/lessons/geometry/triangle-angles-and-sides/lesson.yaml b/content/lessons/geometry/triangle-angles-and-sides/lesson.yaml index 0e6138d3..00b54478 100644 --- a/content/lessons/geometry/triangle-angles-and-sides/lesson.yaml +++ b/content/lessons/geometry/triangle-angles-and-sides/lesson.yaml @@ -35,9 +35,9 @@ variables: - B - C derivation: - - \text{draw a line through vertex } C \text{ parallel to side } AB - - \text{the two angles this new line makes with sides } CA \text{ and } CB \text{ equal } \angle A \text{ and } \angle B \text{ — alternate angles on a line cut by a parallel, same idea as a ladder crossing parallel rungs} - - \angle A + \angle B + \angle C = 180^\circ \text{ because the three angles now sit side by side along one straight line} + - '\text{draw a line through }C\text{ parallel to }AB' + - '\text{alternate interior angles transfer }\angle A\text{ and }\angle B\text{ to the line at }C' + - '\angle A+\angle B+\angle C=180^\circ\text{ because these angles form a straight angle}' charts: [] primary: a presets: From 9e8e8b3d9f68cf520f11dc08b60d76150e9b677f Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:01:31 +0300 Subject: [PATCH 039/124] docs: record foundational Geometry editorial review --- content/lessons/EDITORIAL_REVIEW.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/content/lessons/EDITORIAL_REVIEW.md b/content/lessons/EDITORIAL_REVIEW.md index 3749f436..38e242a0 100644 --- a/content/lessons/EDITORIAL_REVIEW.md +++ b/content/lessons/EDITORIAL_REVIEW.md @@ -1,6 +1,6 @@ # Bilingual editorial review -49 of 390 lessons reviewed. 341 remain. +61 of 390 lessons reviewed. 329 remain. A checked lesson has had both language files rewritten or reviewed against its configuration and visualization source. Automated validation alone does not mark a lesson reviewed. Browser interaction and independent learner review remain separate checks. @@ -293,26 +293,26 @@ Scope: every lesson, including summaries, parameter labels, examples, exercises, - [x] [slope](functions/slope/en.md) · [Arabic](functions/slope/ar.md) - [x] [transformations-of-graphs](functions/transformations-of-graphs/en.md) · [Arabic](functions/transformations-of-graphs/ar.md) -## geometry (0/19) +## geometry (12/19) -- [ ] [angles-and-parallel-lines](geometry/angles-and-parallel-lines/en.md) · [Arabic](geometry/angles-and-parallel-lines/ar.md) -- [ ] [area-and-perimeter](geometry/area-and-perimeter/en.md) · [Arabic](geometry/area-and-perimeter/ar.md) +- [x] [angles-and-parallel-lines](geometry/angles-and-parallel-lines/en.md) · [Arabic](geometry/angles-and-parallel-lines/ar.md) +- [x] [area-and-perimeter](geometry/area-and-perimeter/en.md) · [Arabic](geometry/area-and-perimeter/ar.md) - [ ] [building-dimensions](geometry/building-dimensions/en.md) · [Arabic](geometry/building-dimensions/ar.md) -- [ ] [circle](geometry/circle/en.md) · [Arabic](geometry/circle/ar.md) -- [ ] [circle-theorems](geometry/circle-theorems/en.md) · [Arabic](geometry/circle-theorems/ar.md) -- [ ] [congruence-and-similarity](geometry/congruence-and-similarity/en.md) · [Arabic](geometry/congruence-and-similarity/ar.md) -- [ ] [coordinate-geometry](geometry/coordinate-geometry/en.md) · [Arabic](geometry/coordinate-geometry/ar.md) +- [x] [circle](geometry/circle/en.md) · [Arabic](geometry/circle/ar.md) +- [x] [circle-theorems](geometry/circle-theorems/en.md) · [Arabic](geometry/circle-theorems/ar.md) +- [x] [congruence-and-similarity](geometry/congruence-and-similarity/en.md) · [Arabic](geometry/congruence-and-similarity/ar.md) +- [x] [coordinate-geometry](geometry/coordinate-geometry/en.md) · [Arabic](geometry/coordinate-geometry/ar.md) - [ ] [distance-in-any-dimension](geometry/distance-in-any-dimension/en.md) · [Arabic](geometry/distance-in-any-dimension/ar.md) - [ ] [eleven-dimensions](geometry/eleven-dimensions/en.md) · [Arabic](geometry/eleven-dimensions/ar.md) - [ ] [higher-dimensions](geometry/higher-dimensions/en.md) · [Arabic](geometry/higher-dimensions/ar.md) -- [ ] [nets-and-solids](geometry/nets-and-solids/en.md) · [Arabic](geometry/nets-and-solids/ar.md) -- [ ] [polygons-and-tessellation](geometry/polygons-and-tessellation/en.md) · [Arabic](geometry/polygons-and-tessellation/ar.md) -- [ ] [pythagorean-theorem](geometry/pythagorean-theorem/en.md) · [Arabic](geometry/pythagorean-theorem/ar.md) +- [x] [nets-and-solids](geometry/nets-and-solids/en.md) · [Arabic](geometry/nets-and-solids/ar.md) +- [x] [polygons-and-tessellation](geometry/polygons-and-tessellation/en.md) · [Arabic](geometry/polygons-and-tessellation/ar.md) +- [x] [pythagorean-theorem](geometry/pythagorean-theorem/en.md) · [Arabic](geometry/pythagorean-theorem/ar.md) - [ ] [slicing-higher-dimensions](geometry/slicing-higher-dimensions/en.md) · [Arabic](geometry/slicing-higher-dimensions/ar.md) -- [ ] [surface-area-and-volume](geometry/surface-area-and-volume/en.md) · [Arabic](geometry/surface-area-and-volume/ar.md) +- [x] [surface-area-and-volume](geometry/surface-area-and-volume/en.md) · [Arabic](geometry/surface-area-and-volume/ar.md) - [ ] [tesseract](geometry/tesseract/en.md) · [Arabic](geometry/tesseract/ar.md) -- [ ] [transformations-and-symmetry](geometry/transformations-and-symmetry/en.md) · [Arabic](geometry/transformations-and-symmetry/ar.md) -- [ ] [triangle-angles-and-sides](geometry/triangle-angles-and-sides/en.md) · [Arabic](geometry/triangle-angles-and-sides/ar.md) +- [x] [transformations-and-symmetry](geometry/transformations-and-symmetry/en.md) · [Arabic](geometry/transformations-and-symmetry/ar.md) +- [x] [triangle-angles-and-sides](geometry/triangle-angles-and-sides/en.md) · [Arabic](geometry/triangle-angles-and-sides/ar.md) - [ ] [what-is-a-dimension](geometry/what-is-a-dimension/en.md) · [Arabic](geometry/what-is-a-dimension/ar.md) ## networking (0/15) From 5524740b37328585588de16ed65f9f76461c04ad Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:19:12 +0300 Subject: [PATCH 040/124] content: rewrite building-dimensions for first-time learners in both languages --- .../geometry/building-dimensions/ar.md | 68 ++++++++----------- .../geometry/building-dimensions/en.md | 67 +++++++++--------- 2 files changed, 61 insertions(+), 74 deletions(-) diff --git a/content/lessons/geometry/building-dimensions/ar.md b/content/lessons/geometry/building-dimensions/ar.md index 06e393e4..2ed93c20 100644 --- a/content/lessons/geometry/building-dimensions/ar.md +++ b/content/lessons/geometry/building-dimensions/ar.md @@ -1,73 +1,65 @@ --- title: نبني بُعدًا جديدًا بالسحب -summary: اسحب نقطة فتصير خطًا، واسحب الخط فيصير مربعًا، واسحب المربع فيصير مكعبًا. عدّ الرؤوس في كل مرة وانظر كيف تتضاعف. +summary: 'كوّن قطعة مستقيمة ومربعًا ومكعبًا بمدّ الشكل في اتجاه عمودي جديد، وعدّ الرؤوس والأحرف الناتجة.' parameters: - n: n — عدد أبعاد الشكل - sweep: sweep — كم سحبنا الشكل في اتجاه جديد (100 % يعني انتهى السحب) - spin: spin — يدير الشكل لتراه من جهة ثانية + n: 'n — بُعد الشكل المكتمل، من نقطة (0) إلى مكعب (3)' + sweep: 'sweep — الامتداد الجديد: من انطباق عند 0% إلى اكتمال عند 100%' + spin: 'spin — يغيّر منظر الإسقاط؛ ويمكن تغييره بالسحب الأفقي' variables: - - عدد رؤوس الشكل الذي له n من الأبعاد - - عدد أضلاع الشكل الذي له n من الأبعاد - - عدد الأبعاد + - 'V_n: عدد رؤوس المكعب المكتمل ذي n أبعاد' + - 'E_n: عدد أحرف المكعب المكتمل ذي n أبعاد' + - 'n: عدد الأبعاد المستقلة' --- ## Try it -1. اجعل n يساوي 0 ثم 1 ثم 2 ثم 3. في كل مرة اقرأ عدد الرؤوس والأضلاع تحت الرسم. أي عدد يتضاعف كل مرة؟ -2. اجعل n يساوي 2 وحرّك sweep من 0 إلى 100. يظهر الخط وهو ينزلق إلى الجانب ويترك وراءه مربعًا. الخطوط الزرقاء هي الأضلاع الجديدة التي صنعها السحب. -3. اجعل n يساوي 3 واسحب الرسم يمينًا ويسارًا. في الجدول الصغير على الجانب، صف 2D هو المربع الذي بدأنا منه، وصف 3D هو المكعب. +1. أبقِ sweep = 100 واضبط n على 0 ثم 1 ثم 2 ثم 3. أعداد الرؤوس هي 1 و2 و4 و8، وأعداد الأحرف 0 و1 و4 و12. +2. اضبط n = 2 وحرّك sweep من 0 إلى 100. تبتعد نسخة ثانية من القطعة حتى يصبح الحد مربعًا. في منتصف الامتداد يكون الشكل مستطيلًا. +3. اضبط n = 3 وقارن sweep = 50 مع 100. عند النصف نحصل على صندوق أقصر في البعد الجديد، وعند الاكتمال نحصل على مكعب. اسحب أفقيًا لتغيير منظر إسقاطه. ## Real-life examples -- **سحب القلم.** ضع رأس القلم على الورقة فتصير نقطة. اسحبه 10 cm فيظهر خط له رأسان. اجعل n يساوي 1 لتراه. -- **سجادة تُفرد على الأرض.** حرفها الأمامي خط. إذا فردتها إلى منتصف الغرفة فعندك نصف مستطيل. ولا تكتمل السجادة حتى يقطع الحرف الغرفة كلها (n = 2 وsweep = 50). -- **حجر النرد.** هو مكعب: 8 رؤوس و12 ضلعًا و6 أوجه. تصنعه بسحب مربع إلى الأعلى بطول ضلعه. +1. **رسم قطعة مستقيمة.** عند n = 1 وsweep = 100، يرسم تحريك نقطة مثالية مسافة محددة قطعة مستقيمة ذات طرفين. +2. **فرد ورقة مستطيلة.** عند n = 2 وsweep = 50، تكون الحافة المتحركة قد قطعت نصف المسافة المطلوبة. للمنطقة أربعة رؤوس، لكنها لم تصبح المربع الكامل بعد. +3. **مدّ مربع إلى مجسم.** عند n = 3 وsweep = 100، يعطي مدّ المربع عموديًا على مستواه بمقدار طول ضلعه مكعبًا بثمانية رؤوس واثني عشر حرفًا. ## Test yourself -1. خمّن أولًا: كم رأسًا للمكعب؟ ثم اضبط المنزلقين حتى يظهر مكعب كامل، وتأكد من تخمينك. -2. قبل أن تلمس n، خمّن أي عدد من الأبعاد يعطي شكلًا له 4 رؤوس بالضبط. ثم اجعل الرسم يعرضه كاملًا. -3. اصنع المكعب، لكن أوقف آخر سحب في المنتصف بالضبط (sweep قريب من 50). ماذا ترى في تلك اللحظة؟ +1. توقع عدد رؤوس المكعب، ثم اضبط n = 3 وsweep = 100 للتحقق. +2. اختر n وsweep لإظهار مربع مكتمل ذي أربعة رؤوس. +3. اضبط n = 3 وsweep قرب 50 للتوقف في منتصف الامتداد الجديد. ## Intuition -ضع رأس قلم على ورقة. يظهر نقطة. لا تستطيع أن تتحرك داخل النقطة، فليس لها أي بُعد. ولها رأس واحد هو النقطة نفسها. في الرسم اجعل n يساوي 0. +ابدأ بنقطة مثالية. حرّكها في اتجاه واحد واحتفظ بجميع المواضع التي تمر بها؛ فتكوّن قطعة مستقيمة. ثم حرّك القطعة كلها عموديًا على اتجاهها واحتفظ بالمنطقة التي تغطيها؛ فتكوّن مستطيلًا، ويكون مربعًا إذا ساوى الطول الجديد طول القطعة. -الآن اسحب القلم 10 cm إلى اليمين. تترك النقطة وراءها خطًا طوله 10 cm. على الخط تتحرك إلى الأمام أو إلى الخلف فقط، فله بُعد واحد. وله رأسان. اجعل n يساوي 1 لتراه. +بعد ذلك حرّك المربع عموديًا على مستواه. إذا امتد مسافة تساوي طول ضلعه، كوّن مكعبًا. يجب أن يكون الاتجاه الجديد مستقلًا عن الاتجاهات السابقة؛ فإزاحة المربع داخل مستواه لا تصنع جسمًا ذا حجم. -اسحب الخط كله 10 cm إلى الجانب. فيترك مربعًا طول ضلعه 10 cm. على المربع تتحرك إلى الأمام وإلى الخلف، وإلى اليمين وإلى اليسار، فله بُعدان. وله 4 رؤوس و4 أضلاع. اجعل n يساوي 2، وحرّك المنزلق sweep من 0 إلى 100 لترى الخط وهو يُسحب. - -اسحب المربع كله 10 cm إلى الأعلى فتحصل على مكعب: 8 رؤوس و12 ضلعًا و6 أوجه. هذه ثلاثة أبعاد. اجعل n يساوي 3. شاشتك مسطحة، فما تراه هو ظل المكعب. ظل المكعب على الحائط رسم مسطح أيضًا. اسحب الرسم يمينًا ويسارًا لتديره. - -كل سحب يفعل شيئين. ينسخ الشكل كله، ويصل كل رأس بنسخته. لذلك تتضاعف الرؤوس: 1 ثم 2 ثم 4 ثم 8. أما الأضلاع فنأخذ نسختين من الأضلاع القديمة ونضيف ضلعًا جديدًا لكل رأس قديم. في المكعب نحسب 2 × 4 + 4 = 12. الجدول في الرسم يريك هذا بأرقام n وأرقام البُعد الذي قبله. +لعدّ الرؤوس، نحتفظ بالأصل ونضيف نسخة من كل رأس. ولعدّ الأحرف، نأخذ نسختين من الأحرف القديمة ونضيف وصلة لكل رأس قديم. لذلك ينتج المربع 2 × 4 + 4 = 12 حرفًا للمكعب. يعرض الجدول أعداد الشكل المكتمل الذي تحدده n، حتى عند sweep = 0 حين تنطبق النسخ في الرسم. ## Formal -نبدأ من نقطة واحدة، فيكون $V_0 = 1$. كل بُعد جديد ينسخ الشكل ويصل كل رأس بنسخته، فيكون $V_n = 2\,V_{n-1}$، ومنه $V_n = 2^n$. +المكعب ذو n أبعاد تعميم للقطعة والمربع والمكعب. نبدأ برأس واحد $V_0=1$ ودون أحرف $E_0=0$. لكل عدد صحيح n لا يقل عن 1، يعطي الإنشاء $V_n=2V_{n-1}$، ومنه $V_n=2^n$. -أضلاع الشكل الجديد هي نسختان من الأضلاع القديمة، وضلع جديد لكل رأس قديم: $E_n = 2\,E_{n-1} + V_{n-1}$. في المكعب $E_3 = 2 \cdot 4 + 4 = 12$. +علاقة عدّ الأحرف هي $E_n=2E_{n-1}+V_{n-1}$. للمكعب العادي، $E_3=2\cdot4+4=12$. نعدّ هنا رؤوس الشكل الكامل وأحرفه غير المنهارة، لا العلامات المنفصلة التي نراها في إسقاط قد تتداخل فيه الخطوط. ## Advanced -هذه الطريقة لا تذكر العدد 3 أبدًا. يمكنك تكرار السحب كما تشاء، ويبقى $V_n$ و$E_n$ يتبعان القاعدتين نفسيهما. وإذا حللنا القاعدة الثانية حصلنا على صيغة مباشرة هي $E_n = n\,2^{n-1}$، وسنستعملها في الدروس القادمة. +يمتد الإنشاء رياضيًا إلى ما بعد ثلاثة أبعاد بإضافة إحداثي مستقل آخر. لكل n لا يقل عن 1، تكون صيغة عدد الأحرف E_n = n2^(n − 1): يلتقي عند كل رأس من الرؤوس 2^n عدد n من الأحرف، وعدّ الأطراف يحسب كل حرف مرتين. يعرّف هذا الإنشاء شكلًا رياضيًا، دون الادعاء بوجود اتجاه مادي آخر في الغرفة. ## Derivation -1. النقطة لها رأس واحد: $V_0 = 1$. -2. السحب يصنع نسخة من كل رأس، فتتضاعف الرؤوس: $V_n = 2\,V_{n-1}$. -3. إذا ضاعفنا $n$ مرة بدءًا من 1 حصلنا على $V_n = 2^n$. -4. الأضلاع نسختان من الأضلاع القديمة وضلع جديد لكل رأس قديم: $E_n = 2\,E_{n-1} + V_{n-1}$. +1. تعطينا النقطة الواحدة رأسًا ابتدائيًا واحدًا. +2. يضم الإنشاء التالي الأصل ونسخة من كل رأس، فيتضاعف العدد. +3. تكرار المضاعفة n مرات يعطي 2^n رأسًا. +4. نسختان من الأحرف القديمة، مع وصلة لكل رأس قديم، تعطي علاقة عدّ الأحرف. ## Real world -### السحب في برامج التصميم - -برامج التصميم ثلاثي الأبعاد تفعل هذا عمدًا. ترسم شكلًا مسطحًا ثم تسحبه إلى الأعلى («extrude») فيصير جسمًا مجسمًا. - -### الطباعة طبقة فوق طبقة +### المدّ في برامج النمذجة -ترسم الطابعة ثلاثية الأبعاد خطًا بفوهتها. الخطوط تصنع طبقة، والطبقات فوق بعضها تصنع الجسم. كل خطوة تضيف بُعدًا. +يمكن لأداة نمذجة مدّ مربع مسطح على خط عمودي لتكوين صندوق. إذا ساوى الامتداد طول الضلع، نتج مكعب؛ وتعطي الأطوال الموجبة الأخرى صناديق مستطيلة. -### عدّ رؤوس الصناديق +### عدّ إطار صندوق -كل شيء على شكل صندوق له 8 رؤوس و12 ضلعًا. ومن يبني نموذج صندوق يتأكد منه بهذين العددين. +لمتوازي المستطيلات ثمانية رؤوس واثنا عشر حرفًا. قد تتداخل بعضها عند رسمها على ورقة، لذا اعتمد على طريقة اتصالها، لا على عدد الخطوط المنفصلة التي تراها فقط. diff --git a/content/lessons/geometry/building-dimensions/en.md b/content/lessons/geometry/building-dimensions/en.md index c4abccdc..46fa910d 100644 --- a/content/lessons/geometry/building-dimensions/en.md +++ b/content/lessons/geometry/building-dimensions/en.md @@ -1,70 +1,65 @@ --- title: Building a new dimension by dragging -summary: Drag a point to make a line, a line to make a square, a square to make a cube. Count how the corners double each time. +summary: 'Build a segment, square and cube by extending a shape in a new perpendicular direction, and count the new vertices and edges.' parameters: - n: n — how many dimensions the shape has - sweep: sweep — how far the shape has been dragged in its newest direction (100 % means finished) - spin: spin — turns the shape so you can look at it from another side + n: 'n — dimension of the completed shape, from point (0) to cube (3)' + sweep: 'sweep — newest extension: 0% collapsed, 100% complete' + spin: 'spin — changes the projected view; also controlled by horizontal dragging' variables: - - the number of corners of the shape with n dimensions - - the number of edges of the shape with n dimensions - - the number of dimensions + - 'V_n: vertex count of the completed n-cube' + - 'E_n: edge count of the completed n-cube' + - 'n: number of independent dimensions' --- ## Try it -1. Set n to 0, then 1, 2 and 3. Each time, read the corners and the edges under the picture. Which number doubles every time? -2. Set n to 2 and move sweep from 0 to 100. Watch the line slide sideways and leave a square behind it. The blue lines are the new edges made by the drag. -3. Set n to 3 and drag the picture left and right. Look at the small table at the right: the row for 2D shows the square you started from, and the row for 3D shows the cube. +1. Keep sweep = 100 and set n to 0, 1, 2 and 3. Read vertex counts 1, 2, 4 and 8, and edge counts 0, 1, 4 and 12. +2. Set n = 2 and move sweep from 0 to 100. A second copy of the segment moves away until the outline becomes a square. Halfway through, it is a rectangle. +3. Set n = 3 and compare sweep = 50 with 100. The half-swept shape is a box with a shorter newest dimension; the completed shape is a cube. Drag horizontally to change its projected view. ## Real-life examples -- **A pencil drag.** Press the tip on paper: a point. Drag it 10 cm and you have a line with 2 ends. n = 1 shows it. -- **A carpet being rolled out.** Its front edge is a line. As you roll it half-way across the floor you have half a rectangle, and the carpet is finished only when the edge has moved all the way (n = 2, sweep = 50). -- **A die.** It is a cube: 8 corners, 12 edges and 6 faces. You can make one by dragging a square upward by its own side length. +1. **Tracing a segment.** At n = 1 and sweep = 100, moving an ideal point a fixed distance traces a segment with two endpoints. +2. **Unrolling a rectangular sheet.** At n = 2 and sweep = 50, the moving edge has covered half the intended distance. The region has four corners but is not yet the completed square. +3. **Extruding a square.** At n = 3 and sweep = 100, extending a square perpendicularly by its own side length forms a cube with eight vertices and twelve edges. ## Test yourself -1. Guess first: how many corners will a cube have? Then set the sliders to a complete cube and check your guess. -2. Before you touch n, guess which dimension gives a shape with exactly 4 corners. Then make the picture show it, finished. -3. Make the cube, but stop its last drag exactly half-way (sweep near 50). What do you see at that moment? +1. Predict the cube's vertex count, then set n = 3 and sweep = 100 to check it. +2. Choose n and sweep to show a completed square with four vertices. +3. Set n = 3 and sweep close to 50 to stop halfway through the newest extension. ## Intuition -Put the tip of a pencil on a sheet of paper. It makes a point. You cannot move inside a point, so it has 0 dimensions, and it has one corner: itself. In the picture, set n to 0. +Begin with one ideal point. Move it in one direction and keep all positions along the way: they form a line segment. Move that entire segment perpendicularly to itself and keep the swept region: it forms a rectangle, or a square when the new length equals the original length. -Now drag the pencil 10 cm to the right. The point leaves a line behind it, 10 cm long. On a line you can only go forward or back, so a line has 1 dimension. It has 2 ends. Set n to 1 to see it. +Next move the square perpendicular to its plane. Sweeping it through a distance equal to its side length forms a cube. The new direction must be independent of the old ones; sliding a square within its own plane does not create a solid. -Drag the whole line 10 cm sideways. It leaves a square, 10 cm by 10 cm. On a square you can go forward and back, and left and right, so it has 2 dimensions. It has 4 corners and 4 sides. Set n to 2, and move the sweep slider from 0 to 100 to watch the line being dragged. - -Drag the whole square 10 cm upward and you get a cube: 8 corners, 12 edges and 6 faces. That is 3 dimensions. Set n to 3. Your screen is flat, so what you see is the cube's shadow, the way a cube's shadow on a wall is a flat drawing. Drag the picture left and right to turn it. - -Every drag does the same two things. It makes a copy of the whole shape, and it joins each corner to its own copy. So the corners double: 1, 2, 4, 8. The edges are two copies of the old edges plus one new edge for every old corner. For the cube that is 2 × 4 + 4 = 12. The table in the picture shows it with the numbers for n and for the dimension before it. +To count vertices, keep the original ones and add a matching copy of each. To count edges, keep two copies of the old edges and add one connector for each old vertex. Thus a square produces 2 × 4 + 4 = 12 cube edges. The table reports counts for the completed shape selected by n, even at sweep = 0 when projected copies coincide. ## Formal -Start from one point, so $V_0 = 1$. Each new dimension copies the shape and joins every corner to its copy, so $V_n = 2\,V_{n-1}$, and therefore $V_n = 2^n$. +An n-cube is the higher-dimensional extension of a segment, square and cube. Start with $V_0=1$ vertex and $E_0=0$ edges. For each integer n at least 1, the construction gives $V_n=2V_{n-1}$ and hence $V_n=2^n$. -The edges of the new shape are two copies of the old edges, plus one new edge for each old corner: $E_n = 2\,E_{n-1} + V_{n-1}$. For the cube, $E_3 = 2 \cdot 4 + 4 = 12$. +The edge recurrence is $E_n=2E_{n-1}+V_{n-1}$. For a cube, $E_3=2\cdot4+4=12$. These count the vertices and edges of the complete nondegenerate shape, not distinct marks visible in a possibly overlapping projection. ## Advanced -The recipe never mentions the number 3. You can repeat the drag as often as you like, and the counts $V_n$ and $E_n$ keep following the same two rules. Solving the second rule gives a closed form, $E_n = n\,2^{n-1}$, which the next lessons use. +The construction extends mathematically beyond three dimensions by adding another independent coordinate. For n at least 1, its edge count has closed form E_n = n2^(n − 1): each of 2^n vertices meets n edges, and counting endpoints counts every edge twice. The construction establishes a mathematical object without asserting another physical direction in our room. ## Derivation -1. A point has one corner: $V_0 = 1$. -2. A drag makes one copy of every corner, so the corners double: $V_n = 2\,V_{n-1}$. -3. Doubling $n$ times from 1 gives $V_n = 2^n$. -4. The edges are two copies of the old edges plus one new edge per old corner: $E_n = 2\,E_{n-1} + V_{n-1}$. +1. A single point supplies one initial vertex. +2. The next construction has an original and a copy of every vertex, doubling their number. +3. Repeating that doubling n times gives 2^n vertices. +4. Two copies of the old edges, plus one connector per old vertex, give the edge recurrence. ## Real world -### Extruding in 3D programs -Programs for 3D modelling do this on purpose. You draw a flat shape, then "extrude" it: drag it upward to make a solid box. +### Extrusion in modelling + +A modelling tool can extend a flat square along a perpendicular line to make a box. Equal extension and side lengths give a cube; other positive extension lengths give rectangular boxes. -### Printing in layers -A 3D printer draws a line with its nozzle, lines make a layer, and layers stacked on top of each other make the object. Each step adds one dimension. +### Counting a box frame -### Counting corners of boxes -Anything shaped like a box has 8 corners and 12 edges. A designer building a box model can check it with these two numbers. +A rectangular box has eight vertices and twelve edges. An edge drawing on paper may overlap some of them, so use the connectivity rather than the number of visibly separate strokes to count. From 12ebf5928c6e6d292d885900c574026b1ba726e1 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:19:12 +0300 Subject: [PATCH 041/124] content: rewrite distance-in-any-dimension for first-time learners in both languages --- .../geometry/distance-in-any-dimension/ar.md | 80 ++++++++----------- .../geometry/distance-in-any-dimension/en.md | 80 ++++++++----------- 2 files changed, 66 insertions(+), 94 deletions(-) diff --git a/content/lessons/geometry/distance-in-any-dimension/ar.md b/content/lessons/geometry/distance-in-any-dimension/ar.md index 7aba7dd6..f5c17dcc 100644 --- a/content/lessons/geometry/distance-in-any-dimension/ar.md +++ b/content/lessons/geometry/distance-in-any-dimension/ar.md @@ -1,81 +1,67 @@ --- title: كم تبعد؟ المسافة في أي عدد من الأبعاد -summary: امشِ 3 m شرقًا و4 m شمالًا فتبعد 5 m عن البداية. والقاعدة نفسها تعطي المسافة في 4 أو 9 أو 11 اتجاهًا. +summary: 'عمّم نظرية فيثاغورس على اتجاهات إحداثية متعامدة، وقارن المسافة المستقيمة بطريق يسير على المحاور.' parameters: - n: n — عدد الاتجاهات التي تمشي فيها - a: a — طول الخطوة في كل اتجاه + n: 'n — عدد الاتجاهات الإحداثية المتعامدة' + a: 'a — طول الإزاحة الموجب في كل اتجاه' variables: - - المسافة المستقيمة من البداية إلى النهاية - - الخطوة في الاتجاه الأول - - الخطوة في الاتجاه الثاني - - الخطوة في الاتجاه الثالث - - الخطوة في الاتجاه الأخير، أيًّا كان رقمه - - عدد الاتجاهات - - طول كل خطوة، حين تتساوى الخطوات + - 'd: المسافة الإقليدية بين الطرفين' + - 'x₁: الإزاحة في الإحداثي الأول' + - 'x₂: الإزاحة في الإحداثي الثاني' + - 'x₃: الإزاحة في الإحداثي الثالث' + - 'x_n: الإزاحة في الإحداثي الأخير' + - 'n: عدد الاتجاهات الإحداثية' + - 'a: طول الإزاحة المشترك في مثال الخطوات المتساوية' --- ## Try it -1. اجعل a يساوي 1 وحرّك n من 1 إلى 11. يكبر اللولب مثلثًا بعد مثلث. اقرأ المسافة المستقيمة تحت الرسم. -2. اجعل n يساوي 4. تكون المسافة المستقيمة 2 بالضبط، والمشي على الأضلاع 4. ثم اجعل n يساوي 9 وابحث عن عدد صحيح آخر. -3. اسحب طرف اللولب إلى الخارج. تكبر كل الأطوال معًا، لكن النسبة بين المشي على الأضلاع والخط المستقيم لا تتغير. +1. اضبط a = 1 وزد n من 1 إلى 4. تكون المسافات 1 و√2 و√3 و2. يضيف كل مثلث جديد واحدًا إلى مربع المسافة. +2. اضبط n = 9 وa = 1. المسافة المستقيمة 3 م، بينما طول طريق يقطع وحدة في كل اتجاه إحداثي هو 9 م. +3. أبقِ n = 9 واجعل a = 2. يتضاعف الطولان إلى 6 م و18 م، وتبقى نسبتهما 3. يغيّر الرسم مقياس العرض، لذا قارن القيم المكتوبة. ## Real-life examples -- **عبر مربع.** خطوتان طول كل منهما 1 m، واحدة شرقًا وواحدة شمالًا، فتمشي 2 m على الأضلاع. أما الخط المستقيم فهو $\sqrt{2}$، أي نحو 1.414 m. فالطريق المختصر عبر المربع يوفر نحو ثلث المشي. -- **عبر المكعب رباعي الأبعاد.** له أربعة اتجاهات. أربع خطوات طول كل منها 1، فالخط المستقيم $\sqrt{4}$، أي 2 بالضبط، والمشي على الأضلاع 4. -- **عبر مكعب له 11 اتجاهًا.** طول كل ضلع 1، والمسافة المستقيمة $\sqrt{11}$، أي نحو 3.317. والمشي على الأضلاع 11، وهو أطول بأكثر من ثلاث مرات. +1. **قطر مربع.** عند n = 2 وa = 1 م، يكون القطر √2 م، أي نحو 1.414 م. ويشكل ضلعان متجاوران طريقًا طوله 2 م. +2. **قطر مكعب رباعي الأبعاد.** عند n = 4 وa = 1، تبعد الرؤوس المتقابلة وحدتين. أقصر طريق بينهما على الأحرف طوله 4 وحدات. +3. **صندوق بأحد عشر بُعدًا.** عند n = 11 وa = 1، يكون القطر √11، أي نحو 3.317 وحدات، وطول طريق الأحرف 11 وحدة. ## Test yourself -1. اجعل a يساوي 1، وابحث عن عدد الاتجاهات الذي يجعل المسافة المستقيمة 3 بالضبط. -2. اجعل a يساوي 1، وابحث عن عدد الاتجاهات الذي يجعل المسافة المستقيمة 2 بالضبط. -3. اجعل المسافة المستقيمة 10 باستعمال أكثر من ثلاثة اتجاهات. كم n وكم a؟ -4. اجعل المشي على الأضلاع ضعف الخط المستقيم بالضبط. +1. أبقِ a = 1 وأوجد n التي تجعل القطر 3. +2. أبقِ a = 1 وأوجد n التي تجعل القطر 2. +3. استخدم أكثر من ثلاثة أبعاد، واختر n وa بحيث يكون القطر 10. +4. اختر n بحيث يكون طريق الأحرف ضعف القطر بالضبط، لأي قيمة مسموحة لـa. ## Intuition -تمشي 3 m شرقًا ثم 4 m شمالًا. كم تبعد عن البداية في خط مستقيم؟ ارسم الطريق. هو ضلعان في مثلث قائم، 3 و4. يقول فيثاغورس إن الضلع الثالث 5، لأن 9 + 16 = 25 والجذر التربيعي لـ 25 هو 5. تبعد 5 m عن البداية، مع أنك مشيت 7. +تحرك 3 م شرقًا و4 م شمالًا على مستوى. المسافة المستقيمة من البداية 5 م، بينما قطعت طريقًا طوله 7 م. أضف إزاحة رأسية مستقلة مقدارها 12 م. هي عمودية على مستوى الأرض كله، فيعطي مثلث قائم آخر مسافة نهائية 13 م، لأن 5² + 12² = 13². -الآن اصعد سلمًا طوله 12 m إلى أعلى مباشرة. صار عندك اتجاه ثالث. الخط الذي طوله 5 m صار ضلعًا في مثلث قائم جديد، والسلم هو الضلع الآخر، وبينهما زاوية قائمة. نحسب من جديد: 25 + 144 = 169، والجذر التربيعي لـ 169 هو 13. أنت الآن تبعد 13 m عن مكان البداية. القاعدة لم تتغير: نربّع كل خطوة، ثم نجمع، ثم نأخذ الجذر. - -وهذه القاعدة تصلح لأربعة اتجاهات، وخمسة، وإحدى عشر، مع أن أحدًا لا يستطيع أن يشير إلى اتجاه رابع. نضيف مربعًا آخر في كل مرة، وهذا كل شيء. اللولب في الرسم مبني بهذه الطريقة. كل اتجاه جديد يضيف مثلثًا قائمًا. الخط المستقيم القديم ضلع، والخطوة الجديدة ضلع آخر بزاوية قائمة، والخط المستقيم الجديد هو الوتر. غيّر n وانظر كيف يكبر. - -لنجرّب ذلك بخطوة واحدة a في كل اتجاه. عندها تكون المسافة المستقيمة $a\sqrt{n}$، والمشي على الأضلاع $n \cdot a$. في مكعب ضلعه 1 تكون المسافة المستقيمة عبر المربع 1.41، وعبر المكعب 1.73، وعبر المكعب رباعي الأبعاد 2 بالضبط، وفي 9 أبعاد 3 بالضبط، وفي 11 بُعدًا 3.32. كلما زادت الاتجاهات زاد ما يوفره الطريق المختصر. اسحب طرف اللولب لتغيّر a، وحرّك n لتغيّر عدد الاتجاهات. - -لماذا يهمنا هذا؟ يقارن الحاسوب بين أغنيتين أو وجهين أو كلمتين على أنها قائمتان من الأرقام، وفي كل قائمة مئات الأرقام. «متشابه» تعني «قريب»، ونقيس القرب بهذه الصيغة نفسها، في مئات الاتجاهات معًا. +في فضاء إقليدي ذي n أبعاد، نضيف بالطريقة نفسها مربع إزاحة لكل محور متعامد. يوضح الشكل الحلزوني على الشاشة حساب المثلثات القائمة المتكرر. أضلاعه ليست n اتجاهات متعامدة جميعها على الصفحة، بل هو إنشاء ثنائي الأبعاد للأطوال المتتابعة. ## Formal -في $n$ من الاتجاهات تكون النقطة قائمة من $n$ من الأرقام، ومسافتها عن البداية $d = \sqrt{x_1^2 + x_2^2 + \dots + x_n^2}$. هنا $x_1$ هي الخطوة في الاتجاه الأول، وهكذا إلى الأخير $x_n$. +لإزاحة مركباتها $x_1,\dots,x_n$ على محاور متعامدة تستخدم الوحدة نفسها، يكون طولها الإقليدي $d=\sqrt{x_1^2+\cdots+x_n^2}$. لحساب المسافة بين نقطتين، نستخدم فروق إحداثياتهما بوصفها هذه المركبات. -نحصل عليها من فيثاغورس مرة بعد مرة. مع خطوتين يكون $d^2 = x_1^2 + x_2^2$. وإذا أضفنا خطوة ثالثة بزاوية قائمة مع الاثنتين، صار $d^2 = (x_1^2 + x_2^2) + x_3^2$. كل اتجاه جديد يضيف مربعًا واحدًا. وإذا كانت كل الخطوات بطول واحد $a$، فكل مربع $a^2$ وعدد المربعات $n$، فيكون $d = a\sqrt{n}$. +إذا كان طول كل مركبة موجبًا ويساوي a، فإن $d=a\sqrt n$. قطع مسافة a على كل محور يعطي طريقًا طوله $na$، فتكون نسبة الطريق إلى القطر $\sqrt n$. عند n = 1 يتساوى الطولان، وعندما تزيد n على 1 يكون طريق المحاور أطول. ## Advanced -هذه هي المسافة الإقليدية، أي طول متجه فيه $n$ من الأرقام. وهي الجذر التربيعي لحاصل ضرب المتجه في نفسه ضربًا داخليًا. وهناك مسافات أخرى. مسافة «سيارة الأجرة» هي مجموع أحجام الخطوات كلها، أي المشي على الأضلاع بالضبط. وفي الخطوات المتساوية تساوي $na$، فهي أطول بـ $\sqrt{n}$ مرة من $a\sqrt{n}$. وفي الأبعاد الكبيرة جدًا تصير المسافة المستقيمة بين نقطتين عشوائيتين متقاربة تقريبًا لكل زوج. ولهذا يصعب العثور على «أقرب الجيران». +المعيار الإقليدي هو الجذر التربيعي لحاصل الضرب النقطي للمتجه في نفسه. أما مجموع القيم المطلقة لفروق الإحداثيات فيعطي مسافة مانهاتن. كلاهما مفيد، لكنهما يجيبان عن سؤالين مختلفين. في بيانات القياس، يؤثر مقياس الإحداثيات وطريقة حساب المسافة في تحديد النقاط المتقاربة؛ ولا يعني التقارب تلقائيًا تشابهًا كما يدركه الإنسان. ## Derivation -1. خطوتان بزاوية قائمة تصنعان مثلثًا قائمًا، ويعطينا فيثاغورس الضلع الثالث: $n = 2\text{: } d^2 = x_1^2 + x_2^2$. -2. الخطوة الثالثة بزاوية قائمة مع مستوى الأوليين تجعل هذا الضلع أحد ضلعي مثلث جديد: $n = 3\text{: } d^2 = (x_1^2 + x_2^2) + x_3^2$. -3. نكرر مع كل اتجاه جديد، فنضيف مربعًا في كل مرة، ثم نأخذ الجذر التربيعي: $d = \sqrt{x_1^2 + x_2^2 + \dots + x_n^2}$. -4. إن كان طول كل خطوة $a$، فالمجموع هو $n$ نسخة من $a^2$، فيكون $\text{equal steps } a\text{: } d = a\sqrt{n}$. +1. تعطي إزاحتان متعامدتان مثلثًا قائمًا، فيساوي مربع قطره مجموع مربعيهما. +2. تشكل إزاحة جديدة عمودية على الفضاء الإحداثي السابق مثلثًا قائمًا آخر مع القطر السابق. +3. نكرر الخطوة فنضيف مربع مركبة لكل إحداثي، ثم نأخذ الجذر غير السالب للحصول على الطول. +4. عند تساوي المركبات الموجبة مع a، يكون المجموع na²، وجذره a√n. ## Real world -### GPS والخرائط - -المسافة بين مكانين على الخريطة تحتاج رقمين، ومع الارتفاع تحتاج ثلاثة. وهاتفك يطبّق هذه القاعدة مرة بعد مرة. - -### الفرق بين لونين - -كل لون على الشاشة ثلاثة أرقام: أحمر وأخضر وأزرق. ونقيس كم يختلف لونان بهذه المسافة في ثلاثة اتجاهات. - -### أغانٍ وصور متشابهة +### أقطار الصناديق -يحوّل تطبيق الموسيقى كل أغنية إلى مئات الأرقام. إذا كانت المسافة بين أغنيتين صغيرة فهما متشابهتان في الصوت، فيقترحهما التطبيق معًا. +لصندوق مستطيل أحرفه المتعامدة 3 و4 و12 قطر فراغي طوله 13. أما الطريق على تلك الأحرف الثلاثة فطوله 19. -### أقرب صيدلية +### مقارنة سجلات عددية -حين تبحث عن أقرب صيدلية، يقارن الهاتف المسافة بينك وبين كل صيدلية ويختار الأصغر. وكل مقارنة تستعمل هذه الصيغة. +بعد اختيار وحدات أو مقاييس مناسبة، يمكن للمسافة الإقليدية مقارنة قوائم قياسات. وقد تحتاج مهمة أخرى إلى أوزان مختلفة أو طريقة مسافة أخرى؛ فالصيغة وحدها لا تحدد معنى «متشابه». diff --git a/content/lessons/geometry/distance-in-any-dimension/en.md b/content/lessons/geometry/distance-in-any-dimension/en.md index 8e3425a1..39eb80b5 100644 --- a/content/lessons/geometry/distance-in-any-dimension/en.md +++ b/content/lessons/geometry/distance-in-any-dimension/en.md @@ -1,81 +1,67 @@ --- title: How far apart? Distance in any number of dimensions -summary: Walk 3 m east and 4 m north and you are 5 m from the start. The same rule gives the distance in 4, 9 or 11 directions. +summary: 'Extend the Pythagorean theorem to perpendicular coordinate directions, and compare straight-line distance with a route along the axes.' parameters: - n: n — how many directions you step in - a: a — the length of the step in each direction + n: 'n — number of perpendicular coordinate directions' + a: 'a — positive displacement length in each direction' variables: - - the straight distance from the start to the end - - the step in the first direction - - the step in the second direction - - the step in the third direction - - the step in the last direction, whichever number that is - - how many directions there are - - the length of every step, when all steps are equal + - 'd: Euclidean distance between the endpoints' + - 'x₁: first coordinate displacement' + - 'x₂: second coordinate displacement' + - 'x₃: third coordinate displacement' + - 'x_n: displacement in the final coordinate' + - 'n: number of coordinate directions' + - 'a: common displacement length in the equal-step illustration' --- ## Try it -1. Set a to 1 and slide n from 1 up to 11. Watch the spiral grow one triangle at a time, and read the straight distance below the picture. -2. Set n to 4. The straight distance is exactly 2, and walking along the edges is 4. Now set n to 9 and find another exact whole number. -3. Drag the tip of the spiral outwards. Every length gets bigger together, but the number of times the edges are longer than the straight line stays the same. +1. Set a = 1 and increase n from 1 to 4. The distance values are 1, √2, √3 and 2. Each new triangle adds one to the squared distance. +2. Set n = 9 and a = 1. Straight-line distance is 3 m, while a route taking one unit step in each coordinate direction has length 9 m. +3. Keep n = 9 and set a = 2. Both lengths double, to 6 m and 18 m. Their ratio stays 3. The diagram rescales, so compare the numerical labels. ## Real-life examples -- **Across a square.** Two steps of 1 m, one east and one north, are 2 m along the edges. The straight line is $\sqrt{2}$, about 1.414 m, so a shortcut across a square saves nearly a third. -- **Across a tesseract.** A tesseract is the cube with four directions. With 4 steps of 1 each, the straight line is $\sqrt{4}$, exactly 2, while walking along the edges is 4. -- **Across an 11-direction cube.** Each side is 1, and the straight distance is $\sqrt{11}$, about 3.317. Walking along the edges is 11, more than three times longer. +1. **A square's diagonal.** With n = 2 and a = 1 m, the diagonal is √2 m, about 1.414 m. Two adjacent sides form a route of 2 m. +2. **A tesseract's diagonal.** With n = 4 and a = 1, opposite vertices are 2 units apart. A shortest edge route between them has length 4 units. +3. **An eleven-dimensional box.** With n = 11 and a = 1, the diagonal is √11, about 3.317 units, while the edge route has length 11 units. ## Test yourself -1. With a = 1, find the number of directions that make the straight distance exactly 3. -2. With a = 1, find the number of directions that make the straight distance exactly 2. -3. Get a straight distance of 10 using more than three directions. What are n and a? -4. Make the walk along the edges exactly twice as long as the straight line. +1. Keep a = 1 and find n making the diagonal 3. +2. Keep a = 1 and find n making the diagonal 2. +3. Use more than three dimensions and choose n and a making the diagonal 10. +4. Choose n so that the edge route is exactly twice the diagonal, for any allowed a. ## Intuition -You walk 3 m east and then 4 m north. How far are you from the start, in a straight line? Draw it: two sides of a right triangle, 3 and 4. Pythagoras says the straight side is 5, because 9 + 16 = 25 and the square root of 25 is 5. You are 5 m from the start, even though you walked 7. +Move 3 m east and 4 m north on a flat plane. The straight distance from the start is 5 m, while the route taken is 7 m. Add an independent 12 m vertical displacement. It is perpendicular to the whole ground plane, so another right triangle gives a final distance of 13 m: 5² + 12² = 13². -Now climb a 12 m ladder straight up. You added a third direction. The 5 m line is the floor of a new right triangle, and the ladder is the other side, at a right angle to it. Again: 25 + 144 = 169, and the square root of 169 is 13. You are 13 m from where you started. The rule never changed: square each step, add them up, take the root. - -That rule works in 4 directions, in 5, in 11, even though nobody can point to a fourth direction. Just keep adding one more square. In the picture, the spiral is built exactly that way. Each new direction adds a new right triangle: the old straight line is one side, the new step is the other side, at a right angle, and the new straight line is the long side. Set n and watch it grow. - -To play with it, take the same step a in every direction. Then the straight distance is $a\sqrt{n}$, while walking along the edges is $n \cdot a$. For a cube with side 1: across a square it is 1.41, across a cube 1.73, across a tesseract exactly 2, in 9 dimensions exactly 3, and in 11 dimensions 3.32. The more directions, the bigger the shortcut. Drag the tip of the spiral to change a, and slide n to change the directions. - -Why does this matter? A computer compares two songs, two faces or two words as two lists of numbers, hundreds of them. "Similar" means "close", and close is measured with exactly this formula, in hundreds of directions at once. +In n-dimensional Euclidean space, the same reasoning adds one squared displacement per perpendicular axis. The spiral on screen illustrates the repeated right-triangle calculation. Its legs are not n mutually perpendicular directions on the page; it is a two-dimensional construction of the successive lengths. ## Formal -In $n$ directions, a point is a list of $n$ numbers, and its distance from the start is $d = \sqrt{x_1^2 + x_2^2 + \dots + x_n^2}$. Here $x_1$ is the step in the first direction, and so on up to the last, $x_n$. +For a displacement with components $x_1,\dots,x_n$ along perpendicular axes using a common unit, its Euclidean length is $d=\sqrt{x_1^2+\cdots+x_n^2}$. For two points, use their coordinate differences as these components. -It comes from Pythagoras again and again. With two steps, $d^2 = x_1^2 + x_2^2$. Adding a third step at a right angle to both gives $d^2 = (x_1^2 + x_2^2) + x_3^2$, and each new direction adds one more square. If every step has the same length $a$, then each square is $a^2$, there are $n$ of them, and $d = a\sqrt{n}$. +If every component has positive length a, then $d=a\sqrt n$. Moving a distance a along each axis gives total route length $na$, so the route-to-diagonal ratio is $\sqrt n$. For n = 1 the two lengths agree; for n greater than 1 this axis route is longer. ## Advanced -This is the Euclidean distance, the length of a vector with $n$ numbers. It is the square root of the dot product of the vector with itself. Other distances exist: the "taxi" distance, the sum of the sizes of all the steps, is exactly the walk along the edges, and for equal steps it is $na$, which is $\sqrt{n}$ times longer than $a\sqrt{n}$. In very high dimensions the straight distance between two random points becomes almost the same for every pair, which is why finding "nearest" neighbours gets hard. +The Euclidean norm is the square root of a vector's dot product with itself. The sum of absolute coordinate differences instead gives the Manhattan distance. Both are useful, but answer different questions. For measured data, coordinate scaling and the chosen metric influence which points are considered close; closeness is not automatically the same as human-perceived similarity. ## Derivation -1. Two steps at a right angle make a right triangle, and Pythagoras gives the straight side: $n = 2\text{: } d^2 = x_1^2 + x_2^2$. -2. A third step at a right angle to the plane of the first two uses that straight side as one leg: $n = 3\text{: } d^2 = (x_1^2 + x_2^2) + x_3^2$. -3. Repeat for each new direction, adding one square each time, then take the square root: $d = \sqrt{x_1^2 + x_2^2 + \dots + x_n^2}$. -4. If every step has length $a$, the sum is $n$ copies of $a^2$, so $\text{equal steps } a\text{: } d = a\sqrt{n}$. +1. Two perpendicular displacements give a right triangle, so the squared diagonal is the sum of their squares. +2. A new displacement perpendicular to the earlier coordinate subspace forms another right triangle with the previous diagonal. +3. Repeating adds one squared component per coordinate. Take the nonnegative square root for length. +4. With equal positive components a, the sum is na², whose square root is a√n. ## Real world -### GPS and maps - -The distance between two places on a map uses two numbers, and with height it uses three. Your phone applies this rule over and over. - -### Colour difference - -Every colour on a screen is three numbers: red, green and blue. How different two colours look is measured with this distance in three directions. - -### Similar songs and photos +### Diagonals of boxes -A music app turns each song into hundreds of numbers. Two songs with a small distance between them sound alike, so the app suggests them together. +A rectangular box with perpendicular edges 3, 4 and 12 has a space diagonal of 13. The route along those three edges is 19. -### The nearest pharmacy +### Comparing numerical records -A search for the closest pharmacy compares distances from you to every pharmacy and keeps the smallest. Each comparison is this formula. +After choosing suitable units or scaling, a Euclidean distance can compare lists of measurements. Another task may need different weights or a different distance; the formula alone does not decide what “similar” should mean. From b1e46ef0dce4be39f455fb6377cd83d0c4a356c7 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:19:12 +0300 Subject: [PATCH 042/124] content: rewrite eleven-dimensions for first-time learners in both languages --- .../lessons/geometry/eleven-dimensions/ar.md | 73 ++++++++---------- .../lessons/geometry/eleven-dimensions/en.md | 74 ++++++++----------- .../geometry/eleven-dimensions/lesson.yaml | 6 +- 3 files changed, 61 insertions(+), 92 deletions(-) diff --git a/content/lessons/geometry/eleven-dimensions/ar.md b/content/lessons/geometry/eleven-dimensions/ar.md index 0dac67de..cd744e1e 100644 --- a/content/lessons/geometry/eleven-dimensions/ar.md +++ b/content/lessons/geometry/eleven-dimensions/ar.md @@ -1,80 +1,65 @@ --- title: لماذا يتكلم الفيزيائيون عن 11 بعدًا؟ -summary: >- - من بعيد يبدو الخرطوم خطًا. ويظن بعض الفيزيائيين أن الفضاء يخفي اتجاهات ملتفة بالطريقة نفسها، لكن لا تجربة أكدت ذلك. +summary: 'استخدم سطح أسطوانة رفيعة لفهم اتجاه ملتف، مع التمييز بين هذا التشبيه واقتراح الأبعاد المكانية الإضافية غير المثبت تجريبيًا.' parameters: - r: r — نصف قطر الخرطوم، بالمليمتر - D: D — كم تبعد عن الخرطوم، بالمتر - a: a — مكان النملة حول الخرطوم، بزاوية + r: 'r — نصف قطر الأسطوانة بالملّيمتر' + D: 'D — مسافة الرؤية بالمتر' + a: 'a — موضع العلامة حول المقطع الدائري بالدرجات' variables: - - كم يبدو الخرطوم عريضًا لك، كزاوية بالراديان - - نصف قطر الخرطوم (بوحدة D نفسها، فنقسم قيمة المنزلق بالمليمتر على 1000) - - كم تبعد عن الخرطوم + - 'θ: العرض الزاوي التقريبي بالراديان؛ تستخدم القراءة ملّي راديان' + - 'r: نصف قطر الأسطوانة، ويحوّل إلى متر في الصيغة' + - 'D: مسافة الرؤية بالمتر' charts: [] --- ## Try it -1. أبقِ الخرطوم على r = 10 mm وحرّك D من 5 m إلى 100 m. يبدو الخرطوم أرق. قرب 67 m يتغير الحكم من «ترى بعدين» إلى «ترى بعدًا واحدًا»، وتصير النملة نقطة على خط. -2. اسحب النملة حول الدائرة في الوسط. حتى حين يبدو الخرطوم لك خطًا، تستطيع النملة أن تمشي حوله. فالاتجاه المخفي ما زال موجودًا. -3. اجعل الخرطوم أرق، r = 1 mm. يصير خطًا أسرع بكثير. اقرأ الرقم «يصير هذا الخرطوم خطًا عند» تحت الرسم. +1. اضبط r = 10 مم وD = 5 م. يعطي النموذج عرضًا زاويًا 0.004 راديان، أي 4 ملّي راديان. زد D إلى 100 م، فينخفض إلى 0.2 ملّي راديان، دون العتبة المختارة 0.3. +2. أبقِ الإعدادات وغيّر a، أو اسحب العلامة حول المقطع الدائري. يظل الاتجاه الدائري موجودًا حتى عندما يمثل المنظر البعيد الخرطوم بخط. +3. اضبط r = 1 مم. تصبح مسافة العتبة نحو 6.7 م. تنتج هذه القيمة من قاعدة الدقة الثابتة في النموذج، وليست حدًا عامًا لكل عين أو كاميرا. ## Real-life examples -- **خرطوم في الحديقة.** إذا وقفت على بعد 5 m من خرطوم سمكه 2 cm فإنك ترى عرضه بوضوح. هو أعرض بنحو 13 مرة من أصغر تفصيل تميزه عينك. وترى النملة وهي تمشي حوله بسهولة. -- **الخرطوم نفسه من آخر ملعب كرة قدم.** على بعد 100 m يصير أرق مما تميزه العين. يبدو خطًا عاديًا، لكن النملة ما زالت تستطيع أن تمشي حوله. -- **خيط رفيع عبر غرفة.** خيط سمكه 2 mm يبقى خيطًا في عينك من مسافة 4 m. ولا يصير خطًا إلا بعد نحو 6.7 m. +1. **خرطوم قريب.** عند r = 10 مم وD = 5 م، يكون القطر 0.02 م، والعرض الزاوي نحو 0.02/5 = 0.004 راديان، فوق عتبة النموذج. +2. **الخرطوم نفسه من بعيد.** عند D = 100 م، يكون العرض الزاوي نحو 0.0002 راديان. لا يعود النموذج قادرًا على تمييز العرض، رغم بقاء اتجاهين محليين على السطح. +3. **أسطوانة أرفع.** عند r = 1 مم وD = 4 م، يكون العرض الزاوي نحو 0.0005 راديان، فوق العتبة أيضًا. ينخفض دونها بعد نحو 6.7 م. ## Test yourself -1. أخفِ البعد الثاني للخرطوم، أي اجعله يبدو خطًا. -2. أبقِه ظاهرًا من 100 m على الأقل. كم يجب أن يكون سمكه؟ -3. قف في المكان الذي يصير فيه خرطوم نصف قطره 10 mm خطًا بالضبط. +1. اختر r وD بحيث يكون العرض الزاوي في النموذج أقل من 0.0003 راديان. +2. أبقِ D عند 100 م أو أكثر، واجعل العرض الزاوي 0.0003 راديان على الأقل. +3. اضبط r = 10 مم وD قرب 66.7 م لتحديد انتقال التصنيف في النموذج. ## Intuition -انظر إلى خرطوم ماء في حديقة من بعد 100 m. يبدو خطًا، والخط له بُعد واحد. لا تمشي عليه إلا إلى الأمام أو إلى الخلف. الآن تخيّل نملة على الخرطوم. هي تعرف أكثر منك. تمشي على طول الخرطوم، وتمشي أيضًا حوله. الاتجاه الثاني حقيقي، لكنه ملتف على نفسه وصغير. ومن بعيد لا تراه. +يسمح سطح الأسطوانة بالحركة على طولها وحول محيطها. هذان اتجاهان محليان على السطح. من بعيد، قد يصغر المحيط بحيث لا نميز تفاصيله، فنمثل الأسطوانة بخط في الرسم. لم يفقد السطح بُعدًا؛ بل فقدت المشاهدة بعض التفاصيل. -متى يختفي الاتجاه الملتف؟ عينك لا تميّز إلا التفاصيل التي تزيد عن نحو 0.0003 راديان، أي جزء من 60 من الدرجة. خرطوم سمكه 2 cm يبدو من 5 m أعرض من ذلك بكثير، فترى أنبوبًا. حرّك منزلق المسافة. بعد نحو 67 m يصير الخرطوم أرق مما تميّزه عينك، فيكتب الرسم الأيسر «ترى بعدًا واحدًا». والنملة ما زالت تمشي حوله، لكنك لا تستطيع أن تعرف. +نسمي الاتجاه الدائري مدمجًا، أو ملتفًا على نفسه، لأن السير فيه يعيدنا إلى نقطة البداية بعد مسافة منتهية. يقدم هذا تشبيهًا لاقتراحات تتضمن أبعادًا مكانية إضافية مدمجة، لكنه لا يثبت وجودها في الفضاء. يظل الخرطوم جسمًا عاديًا في مكان ثلاثي الأبعاد. -في عام 1921 اقترح ثيودور كالوزا، وفي عام 1926 أوسكار كلاين، أن كوننا قد يكون فيه اتجاه زائد مثل هذا، ملتف على نفسه وأصغر من أن يُرى. كانت فكرة ذكية، وعاد إليها الفيزيائيون بعد ذلك مرارًا. - -نظرية الأوتار فكرة تقول إن أصغر أجزاء المادة أوتار صغيرة تهتز. وحساباتها لا تصح إلا بـ 10 أبعاد: 9 للمكان وواحد للزمن. وفي عام 1995 بيّن إدوارد ويتن أن النسخ الخمس من نظرية الأوتار تبدو أجزاءً من نظرية واحدة أكبر، هي نظرية M. وفيها 11 بعدًا: 10 للمكان وواحد للزمن. نحن نلاحظ 3 أبعاد للمكان وبُعدًا واحدًا للزمن. أما الأبعاد السبعة الباقية فتكون ملتفة على نفسها، وربما بحجم نحو $10^{-35}$ m. والعدّاد على اليمين يجمعها: 3 + 1 + 7 = 11. - -والآن الجزء الصريح. لم تجد أي تجربة حتى اليوم أي أثر لهذه الأبعاد الزائدة، مع أن مصادمات الجسيمات بحثت عنها. هذه فكرة جميلة لم تثبت، وليست حقيقة قسناها. الدرس لا يقول إن هذه الأبعاد موجودة. هو يريك فقط لماذا يمكن أن توجد دون أن نراها. +يأتي العدد أحد عشر من الفيزياء النظرية، لا من حساب الخرطوم. نظرية M إطار مقترح يربط نظريات الأوتار الفائقة، وتصفه الجاذبية الفائقة في أحد عشر بُعدًا عند الطاقات المنخفضة. العدّ المعتاد عشرة أبعاد مكانية وبُعد زمني. وتمثل 3 + 1 + 7 في العرض ثلاثة اتجاهات مكانية مألوفة، والزمن، وسبعة اتجاهات مكانية إضافية في تصور لدمج الأبعاد. هذه افتراضات نموذج، لا أعدادًا مقيسة لاتجاهات خفية. انظر [الحجة النظرية لويتن](https://arxiv.org/abs/hep-th/9503124). ## Formal -خرطوم نصف قطره $r$ نراه من مسافة $D$ يشغل زاوية تقارب $\theta = \frac{2r}{D}$ راديان، أي عرضه $2r$ مقسومًا على المسافة. منزلقات الرسم تعطي $r$ بالمليمتر و$D$ بالمتر، فنقسم $r$ على 1000 أولًا. +لأسطوانة نراها من الجانب، نصف قطرها r وتبعد D، مع صغر r كثيرًا عن D واستخدام الوحدة نفسها للطولين، يكون عرضها الزاوي تقريبًا $\theta\approx2r/D$ راديان. يعطي المنزلق r بالملّيمتر، لذا يحولها الحساب أولًا إلى متر بالقسمة على 1000. -العين السليمة لا تميّز التفاصيل إلا إذا شغلت أكثر من نحو 0.0003 راديان. فإن كان $\theta < 0.0003$ بدا الخرطوم خطًا، و«اختفى» بُعده الثاني عن النظر. نحلّ $\frac{2r}{D} = 0.0003$ فنجد المسافة التي يحدث عندها ذلك، وهي $D = \frac{2r}{0.0003}$. وعند $r = 10$ mm تكون نحو 67 m. +يستخدم العرض عتبة ثابتة $\theta_0=0.0003$ راديان، ويصنف العرض غير قابل للتمييز عند $\theta<\theta_0$. يحدث الانتقال عند $D\approx2r/\theta_0$. إذا كان r = 0.01 م، كانت المسافة نحو 66.7 م. تعتمد الرؤية الفعلية أيضًا على التباين والإضاءة وأداة الرصد. ## Advanced -هذا المثال عن حدّ الرؤية، وليس برهانًا على شيء. والبحث الحقيقي لا يستعمل العيون. المصادم يفحص الأحجام الصغيرة بجسيمات عالية الطاقة، لأن الطاقة الأعلى تعني طولًا موجيًا أقصر وتفصيلًا أدق. والأحجام التي تبلغها المصادمات ما زالت أكبر بمراتب كثيرة من $10^{-35}$ m. لذلك لا تستطيع إلا أن تستبعد بعض النماذج التي تكون فيها الأبعاد الزائدة كبيرة. - -وكل ما في الدرس عن 10 و11 بعدًا يستند إلى نظرية M، وهي اقتراح لم تؤكده أي تجربة. يراها كثير من الفيزيائيين واعدة، ويشك فيها آخرون. تعامل معها كسؤال مفتوح. +ليس لازمًا أن يكون البعد المدمج أسطوانة فعلية داخل غرفة أكبر يمكن رؤيتها. يوضح التشبيه فقط كيف قد نعجز عن تمييز مقياس طول صغير. لا يشتق أحد عشر بُعدًا، ولا يحدد أحجام الأبعاد المقترحة أو أشكالها. الاتساق الرياضي والتأييد التجريبي مطلبان منفصلان. ## Derivation -1. نرى الخرطوم من جانبه، فما نراه هو عرضه، أي قطره: $\text{width of the hose: } 2r$. -2. للزوايا الصغيرة، عرض الخرطوم مقسومًا على المسافة يعطي الزاوية بالراديان: $\theta = \frac{2r}{D}$. -3. إذا كانت الزاوية أصغر مما تميّزه العين بدا الخرطوم خطًا: $\text{it looks like a line when } \theta < 0.0003$. +1. عرض الأسطوانة الفعلي هو قطرها 2r. نحول نصف القطر والمسافة إلى الوحدة نفسها. +2. للعرض الزاوي الصغير، نقسم العرض على المسافة فنحصل على نحو 2r/D راديان. +3. نقارن النتيجة بالعتبة المختارة. يعطي حل المساواة مسافة الانتقال، ويصنف النموذج العرض الواقع دون العتبة غير قابل للتمييز. ## Real world -### خط كهرباء من الطائرة - -من ارتفاع عالٍ يبدو خط الكهرباء خطًا رفيعًا، مع أنه سلك سميك. عرضه أصغر مما تميّزه عينك على تلك المسافة. - -### شعرة عبر الغرفة - -للشعرة عرض حقيقي، لكنها تبدو خطًا من آخر الغرفة. اقترب منها فيظهر سمكها. - -### طريق في خريطة الأقمار الصناعية +### تبسيط منظر بعيد -في خريطة الأقمار الصناعية يبدو الطريق خطًا بلا عرض. وهو في الحقيقة شريط عرضه عدة أمتار، ولا يظهر ذلك إلا إذا قرّبت الخريطة. +قد نمثل سلكًا رفيعًا بخط إذا لم نستطع تمييز عرضه. يتغير مستوى التفاصيل في التمثيل، لا هندسة السلك الفعلية. -### مصادم الهدرونات الكبير +### اختبار الاقتراحات الفيزيائية -بحثت تجارب مصادم الهدرونات الكبير عن أي أثر لأبعاد زائدة، ولم تجد شيئًا حتى الآن. ولهذا بقيت الأبعاد الـ 11 فكرة وليست حقيقة. +تختبر التجارب إشارات متوقعة محددة. أعلن بحث CMS في أبريل 2025 عدم وجود زيادة ذات دلالة في أحداث فوتون منفرد مع زخم عرضي مفقود، واستخدم النتيجة لتقييد نماذج معينة للأبعاد الإضافية. لا يؤكد هذا نظرية M ولا يستبعد كل اقتراح للأبعاد الإضافية. انظر [نتيجة CMS](https://cms.cern/news/beyond-light-probing-dark-matter-and-extra-dimensions-cms). diff --git a/content/lessons/geometry/eleven-dimensions/en.md b/content/lessons/geometry/eleven-dimensions/en.md index a9eb5945..caa25be7 100644 --- a/content/lessons/geometry/eleven-dimensions/en.md +++ b/content/lessons/geometry/eleven-dimensions/en.md @@ -1,81 +1,65 @@ --- title: Why do physicists talk about 11 dimensions? -summary: >- - Far away, a hose looks like a line. Some physicists think space hides curled-up directions the same way, but no - experiment has confirmed it. +summary: 'Use a thin cylinder to understand a compact direction, while separating that analogy from the unconfirmed physical proposal of extra dimensions.' parameters: - r: r — the radius of the hose, in mm - D: D — how far away you stand, in m - a: a — where the ant is round the hose, as an angle + r: 'r — cylinder radius in millimetres' + D: 'D — viewing distance in metres' + a: 'a — marker position around the circular cross-section, in degrees' variables: - - how wide the hose looks to you, as an angle in radians - - the radius of the hose (in the same unit as D, so a slider value in mm is divided by 1000) - - how far away you stand + - 'θ: approximate angular width in radians; readout uses milliradians' + - 'r: cylinder radius, converted to metres in the formula' + - 'D: viewing distance in metres' charts: [] --- ## Try it -1. Keep the hose at r = 10 mm and slide D from 5 m up to 100 m. The hose gets thinner. Somewhere near 67 m the verdict changes from "you see 2 dimensions" to "you see 1 dimension" and the ant on the hose turns into a dot on a line. -2. Drag the ant round the circle in the middle. Even when the hose looks like a line to you, the ant can still walk round it, so the hidden direction is still there. -3. Make the hose thinner, with r = 1 mm. It turns into a line much sooner. Read the number "this hose becomes a line at" below the picture. +1. Set r = 10 mm and D = 5 m. The model gives angular width 0.004 radians, or 4 milliradians. Increase D to 100 m; it falls to 0.2 milliradians, below the chosen threshold of 0.3. +2. Keep those settings and change a, or drag the marker around the cross-section. The circular direction remains present even when the distant view represents the hose as a line. +3. Set r = 1 mm. The threshold distance becomes about 6.7 m. This is a result of the model's fixed resolution rule, not a universal limit for every observer or camera. ## Real-life examples -- **A hose across the garden.** Standing 5 m from a hose 2 cm thick, you see how wide it is, about 13 times wider than the smallest detail your eye can separate. The ant's walk round it is easy to see. -- **The same hose from the far end of a football field.** At 100 m it is thinner than the eye can separate. It looks like a plain line, but the ant can still walk round it. -- **A thin thread across a room.** A thread 2 mm thick still looks like a thread from 4 m. Only beyond about 6.7 m does it become a line. +1. **A nearby hose.** At r = 10 mm and D = 5 m, the diameter is 0.02 m. Its angular width is about 0.02/5 = 0.004 radians, above the model's threshold. +2. **The same hose farther away.** At D = 100 m, its angular width is about 0.0002 radians. The model no longer resolves the width, although the surface still has two local directions. +3. **A thinner cylinder.** At r = 1 mm and D = 4 m, the angular width is about 0.0005 radians, still above the threshold. It falls below the threshold beyond about 6.7 m. ## Test yourself -1. Hide the hose's second dimension: make it look like a line. -2. Keep it visible from at least 100 m. How thick must the hose be? -3. Stand exactly where a hose 10 mm in radius turns into a line. +1. Choose r and D so that the model's angular width is below 0.0003 radians. +2. Keep D at least 100 m and make the angular width at least 0.0003 radians. +3. Set r = 10 mm and D close to 66.7 m to locate the model's transition. ## Intuition -Look at a garden hose from 100 m away. It looks like a line, and a line has one dimension: you can only go along it. Now think of an ant on the hose. It knows better. It can walk along the hose and also round it. The second direction is real, but it is curled up small. From far away, you cannot see it. +A cylinder's surface allows motion along its length and around its circumference. Those are two local directions on the surface. From far away, the circumference can be too small to resolve, so a drawing may represent the cylinder by a line. The surface has not lost a dimension; the observation has lost detail. -When does a curled-up direction disappear? Your eye can only separate details wider than about 0.0003 radian, which is 1/60 of a degree. A hose 2 cm thick, seen from 5 m, is much wider than that, so you see a tube. Move the distance slider. Beyond about 67 m, the hose is thinner than your eye can tell apart, and the verdict in the left picture says "you see 1 dimension". The ant is still on the hose, going round, but you cannot tell. +The circular direction is called compact because travelling around it returns to the starting position after a finite distance. This offers an analogy for proposals with compact extra spatial dimensions. It does not show that space actually has them. The hose itself remains an ordinary object in three-dimensional space. -In 1921 Theodor Kaluza, and in 1926 Oskar Klein, suggested that our universe might have an extra direction like that: curled up far too small to see. It was a clever idea, and later physicists kept coming back to it. - -String theory is a proposal that the smallest pieces of matter are tiny vibrating strings. Its maths only works with 10 dimensions: 9 of space and 1 of time. In 1995 Edward Witten showed that the five versions of string theory look like parts of one bigger theory, M-theory, with 11 dimensions: 10 of space and 1 of time. We notice 3 of space and 1 of time. The other 7 would be curled up, perhaps as small as about $10^{-35}$ m. The counter on the right adds it up: 3 + 1 + 7 = 11. - -Now the honest part. No experiment has found any sign of these extra dimensions so far, and particle colliders have looked. This is an unproven, beautiful idea, not a measured fact. This lesson shows why such directions could exist and still be invisible, not that they do exist. +The number eleven comes from theoretical physics, not from the hose calculation. M-theory is a proposed framework connecting superstring theories, with eleven-dimensional supergravity as its low-energy description. The usual count is ten spatial dimensions and one time dimension. The display's 3 + 1 + 7 represents three familiar spatial directions, time, and seven additional spatial directions in a compactification picture. These are model assumptions, not measured counts of hidden directions. See [Witten's theoretical argument](https://arxiv.org/abs/hep-th/9503124). ## Formal -A hose of radius $r$ seen from distance $D$ spans an angle of about $\theta = \frac{2r}{D}$ radians: its width $2r$ divided by the distance. The picture's sliders give $r$ in mm and $D$ in m, so $r$ is divided by 1000 first. +For a side-on cylinder of radius r at distance D, with r much smaller than D and both lengths in the same unit, its angular width is approximately $\theta\approx2r/D$ radians. The slider gives r in millimetres, so the calculation first converts it to metres by dividing by 1000. -A healthy human eye separates details only if they span more than about 0.0003 radian. If $\theta < 0.0003$ the hose looks like a line and its second dimension has "vanished" from view. Solving $\frac{2r}{D} = 0.0003$ gives the distance at which this happens, $D = \frac{2r}{0.0003}$. For $r = 10$ mm that is about 67 m. +The display uses a fixed threshold $\theta_0=0.0003$ radians and marks the width unresolved when $\theta<\theta_0$. The transition occurs at $D\approx2r/\theta_0$. For r = 0.01 m, this gives about 66.7 m. Real visibility also depends on contrast, lighting and the observing system. ## Advanced -The analogy is about a limit of seeing, not a proof of anything. Real searches do not use eyes. A particle collider probes small sizes with high-energy particles, because higher energy means shorter wavelength and finer detail. The sizes colliders reach are still many orders of magnitude bigger than $10^{-35}$ m, so they can only rule out some models in which the extra dimensions are large. - -Everything in this lesson about 10 and 11 dimensions rests on M-theory, which is a proposal that has not been confirmed by any experiment. Many physicists find it promising, and others are doubtful. Treat it as an open question. +A compact dimension need not be a literal cylinder embedded in a larger visible room. The analogy only illustrates how a small length scale can be unresolved. It neither derives eleven dimensions nor fixes the size or shape of proposed extra dimensions. Mathematical consistency and experimental confirmation are separate requirements. ## Derivation -1. The hose is seen side-on, so what you see is its width, the diameter: $\text{width of the hose: } 2r$. -2. For small angles, width divided by distance gives the angle in radians: $\theta = \frac{2r}{D}$. -3. If the angle is below what the eye can separate, the hose looks like a line: $\text{it looks like a line when } \theta < 0.0003$. +1. The cylinder's physical width is its diameter, 2r. Convert radius and distance to the same unit. +2. For a small angular width, divide that width by distance to obtain approximately 2r/D radians. +3. Compare the result with the chosen threshold. Solving the equality gives the transition distance; below-threshold width is classified as unresolved in this model. ## Real world -### A power line seen from a plane - -From high above, a power line looks like a thin line, even though it is a thick cable. Its width is below what your eye can separate at that distance. - -### A hair across the room - -A hair has real width, but from across a room it looks like a line. Walk up close and its thickness appears. - -### A road on a satellite map +### Simplifying a distant view -On a satellite map, a road is a line with no visible width. It is really a strip several metres wide, and you only see that when you zoom in. +A thin cable may be drawn as a line when its width is not resolved. This changes the level of detail in the representation, not the cable's actual geometry. -### The Large Hadron Collider +### Testing physical proposals -Experiments at the Large Hadron Collider have searched for signs of extra dimensions. They have found none so far, which is why 11 dimensions is still an idea, not a fact. +Experiments test specific predicted signals. A CMS search reported in April 2025 found no significant excess in single-photon events with missing transverse momentum and used that result to constrain particular extra-dimension models. This neither confirms M-theory nor excludes every extra-dimension proposal. See [the CMS result](https://cms.cern/news/beyond-light-probing-dark-matter-and-extra-dimensions-cms). diff --git a/content/lessons/geometry/eleven-dimensions/lesson.yaml b/content/lessons/geometry/eleven-dimensions/lesson.yaml index e5c81d4d..3a6f4904 100644 --- a/content/lessons/geometry/eleven-dimensions/lesson.yaml +++ b/content/lessons/geometry/eleven-dimensions/lesson.yaml @@ -2,7 +2,7 @@ id: eleven-dimensions subject: geometry difficulty: high-school added: '2026-11-14' -equation: \theta = \frac{2r}{D} +equation: \theta \approx \frac{2r}{D} concepts: - extra-dimensions - m-theory @@ -47,8 +47,8 @@ variables: - D derivation: - '\text{width of the hose: } 2r' - - \theta = \frac{2r}{D} - - '\text{it looks like a line when } \theta < 0.0003' + - \theta \approx \frac{2r}{D} + - '\text{unresolved width in this model when } \theta < 0.0003' charts: [] primary: D presets: From 23337321d9e59656f6c17e92ed7699a80b785c7d Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:19:12 +0300 Subject: [PATCH 043/124] content: rewrite higher-dimensions for first-time learners in both languages --- .../lessons/geometry/higher-dimensions/ar.md | 68 ++++++++----------- .../lessons/geometry/higher-dimensions/en.md | 64 ++++++++--------- 2 files changed, 56 insertions(+), 76 deletions(-) diff --git a/content/lessons/geometry/higher-dimensions/ar.md b/content/lessons/geometry/higher-dimensions/ar.md index 3c27f3ad..cadebbc1 100644 --- a/content/lessons/geometry/higher-dimensions/ar.md +++ b/content/lessons/geometry/higher-dimensions/ar.md @@ -1,74 +1,62 @@ --- title: خمسة أبعاد وأكثر، حتى أحد عشر -summary: السحب نفسه يتكرر مرة بعد مرة. في 11 بُعدًا يكون للمكعب 2,048 رأسًا، والعدّ يخبرك بما لا يستطيع الرسم أن يريك. +summary: 'احسب رؤوس المكعب متعدد الأبعاد وأحرفه وأوجهه الأعلى بُعدًا دون الاعتماد على إسقاط مزدحم بالخطوط.' parameters: - n: n — عدد أبعاد المكعب - spin: spin — يدير الظل لتراه من جهة ثانية + n: 'n — عدد أبعاد المكعب، من 4 إلى 11' + spin: 'spin — يغيّر منظر الإسقاط' variables: - - عدد القطع التي لها k من الأبعاد داخل المكعب (رؤوس حين يكون k صفرًا، وأضلاع حين يكون 1، وأوجه مربعة حين يكون 2، ومكعبات حين يكون 3) - - عدد أبعاد المكعب كله - - عدد أبعاد القطعة التي نعدّها + - 'F_k: عدد الأوجه ذات البعد k، بما فيها الرؤوس والمكعب كله' + - 'n: بُعد المكعب' + - 'k: بُعد الأوجه التي نعدّها' --- ## Try it -1. حرّك n من 4 إلى 11 وراقب الرؤوس. كل خطوة تضاعفها. عند أي عدد من الأبعاد لا تعود تفهم الرسم؟ -2. اجعل n يساوي 11 واسحب الرسم يمينًا ويسارًا. الظل شبكة كثيفة، وهذا طبيعي. الشاشة المسطحة لا تستطيع أن تعرض 11 اتجاهًا. -3. اختر أي n واقرأ الجدول على الجانب. الرؤوس ضعف رؤوس الصف الذي فوقها. والأضلاع ضعف الأضلاع القديمة، زائد ضلع جديد لكل رأس قديم. +1. اضبط n = 5 ثم 6. يتضاعف عدد الرؤوس من 32 إلى 64. ويزداد عدد الأحرف من 80 إلى 192، أي ضعفي 80 القديمة مع 32 وصلة جديدة. +2. اضبط n = 8. قارن عدد الأوجه المربعة بعدد الأوجه المكعبة؛ كلاهما 1792، رغم اختلاف بُعدي هذين النوعين. +3. اضبط n = 11 وغيّر spin. يتغير الإسقاط، لكن العددين يبقيان 2048 رأسًا و11264 حرفًا. استخدم الجدول عندما تتداخل الخطوط في الصورة. ## Real-life examples -- **خمسة أسئلة بنعم أو لا.** اختبار فيه 5 أسئلة بنعم أو لا له 32 طريقة للإجابة. كل ورقة إجابة هي رأس واحد من مكعب له 5 أبعاد (n = 5). -- **بايت واحد.** البايت 8 مفاتيح، كل مفتاح مفتوح أو مغلق، فله 256 قيمة. كل قيمة هي رأس من مكعب له 8 أبعاد (n = 8). -- **أحد عشر مفتاحًا.** لوحة فيها 11 مفتاحًا لها 2,048 وضعًا، وللمكعب 11,264 ضلعًا. من أي وضع تستطيع أن تقلب أيًّا من المفاتيح الـ 11 (n = 11). +1. **خمس إجابات ثنائية.** تعطي خمسة أسئلة مستقلة، لكل منها نعم أو لا، عددًا من قوائم الإجابات يساوي 32. تمثلها رؤوس مكعب خماسي الأبعاد. +2. **قيم من ثمانية بِتّات.** تعطي ثمانية بِتّات 256 سلسلة ممكنة، تمثل رؤوس مكعب ثماني الأبعاد. تمثل أحرفه تغيير بِتّ واحد. +3. **أحد عشر مفتاحًا.** لأحد عشر مفتاح تشغيل وإيقاف مستقلًا 2048 إعدادًا. لكل إعداد أحد عشر جارًا بتبديل مفتاح واحد، فنحصل على 11264 وصلة غير موجّهة بعد إزالة العدّ المكرر. ## Test yourself -1. قبل أن تحرك المنزلق، خمّن أي عدد من الأبعاد يعطي 256 رأسًا بالضبط. (تلميح: للمكعب ذي 4 أبعاد 16 رأسًا، وكل خطوة تضاعفها.) ثم اضبط n وتأكد. -2. خمّن كم رأسًا للمكعب ذي 6 أبعاد. ثم اصنع مكعبًا له أكثر من 10,000 ضلع. ما أصغر قيمة لـ n تنجح؟ -3. ابحث عن عدد الأبعاد الذي يكون للمكعب فيه 80 ضلعًا بالضبط. -4. ابحث عن عدد الأبعاد الذي يتساوى فيه عدد الأوجه المربعة مع عدد المكعبات داخل المكعب. +1. أوجد البُعد الذي يعطي 256 رأسًا. +2. أوجد أصغر n متاحة تعطي أكثر من 10000 حرف. +3. أوجد البُعد الذي يعطي 80 حرفًا. +4. أوجد البُعد الذي يتساوى فيه عدد الأوجه المربعة وعدد الأوجه المكعبة. ## Intuition -السحب الذي تعلمناه في الدروس السابقة يصلح مرة بعد مرة. اسحب مكعبًا في اتجاه رابع فتحصل على المكعب رباعي الأبعاد. ثم اسحبه في اتجاه خامس. في كل مرة ننسخ الشكل ونصل كل رأس بنسخته. في خمسة أبعاد يصير عندنا 32 رأسًا. وفي ثمانية 256. وفي أحد عشر 2,048 رأسًا و11,264 ضلعًا. +لكل إحداثي إضافي في رأس المكعب خياران. لذلك تضاعف إضافة إحداثي عدد قوائم الرؤوس الممكنة. تستمر الأعداد من 16 في أربعة أبعاد إلى 32 في خمسة و2048 في أحد عشر، حتى عندما لا نستطيع تصور كل الاتجاهات المستقلة. -اجعل n يساوي 11. يتحول الرسم إلى شبكة كثيفة. وهذا طبيعي. الشاشة المسطحة لا تستطيع أن تعرض أحد عشر اتجاهًا، فيزدحم الظل. يبقى العدّ هو الذي يعطينا المعنى. والجدول على الجانب يعدّ لك. - -صيغة واحدة تعطي كل عدد من هذه الأعداد: القطع التي لها $k$ من الأبعاد داخل مكعب له $n$ من الأبعاد. الرؤوس هي القطع التي $k = 0$، والأضلاع $k = 1$، والأوجه المربعة $k = 2$، والمكعبات $k = 3$. حرّك n واقرأ الأرقام تحت الرسم. هي الصيغة نفسها في كل مرة. - -لماذا يريد أحد شكلًا بأحد عشر بُعدًا؟ لأن قائمة من 11 رقمًا تصف شيئًا واحدًا. صورة وجه نصفها بـ 11 قياسًا، ووصفة طبخ فيها 11 مكوّنًا، ومحطة طقس تسجل 11 قراءة. كل واحد منها نقطة واحدة في فضاء له 11 بُعدًا. ويصير السؤال «كم يشبه هذا الوجه ذاك الوجه؟» هو «كم تقترب هذه النقطة من تلك؟». درس المسافة في أي عدد من الأبعاد يعلّمك كيف تقيس ذلك. وسبب اختيار الفيزيائيين للعدد 11 في درس الأبعاد الأحد عشر. +لوصف وجه، نسمح لبعض الإحداثيات بالتغير ونثبت البقية عند قيم الأطراف. للحرف إحداثي حر واحد، وللوجه المربع اثنان، وللوجه المكعب ثلاثة. نعدّ أوجه المكعب المحددة بهذه الطريقة، لا جميع المربعات أو المكعبات الصغيرة التي يمكن رسمها داخله. ## Formal -نعدّ القطع التي لها $k$ من الأبعاد في مكعب ذي $n$ من الأبعاد باختيارين. أولًا نختار الاتجاهات الـ $k$ التي تمتد فيها القطعة، وهي $\binom{n}{k}$ طريقة. ثم تثبت كل واحدة من الإحداثيات الباقية، وعددها $n-k$، على $+1$ أو $-1$، وهي $2^{\,n-k}$ طريقة. فيكون $F_k = \binom{n}{k}\,2^{\,n-k}$. +للأعداد الصحيحة التي تحقق $0\le k\le n$، نختار الاتجاهات الإحداثية الحرة k بعدد طرق $\binom nk$. يُثبت كل إحداثي من الباقية n − k عند −1 أو +1، فيعطي $2^{n-k}$ اختيارات. إذن عدد الأوجه ذات البعد k هو $F_k=\binom nk2^{n-k}$. نعدّ الرؤوس أوجهًا صفرية البعد، والمكعب كله وجهًا واحدًا ذا بُعد n. -الرؤوس $F_0 = 2^n$. والأضلاع $F_1 = n\,2^{\,n-1}$. وعند $n = 11$ يكون عندنا $2048$ رأسًا و$11264$ ضلعًا. +بخاصة، $F_0=2^n$ و$F_1=n2^{n-1}$. عند n = 11 نحصل على 2048 رأسًا و11264 حرفًا. قد يجعل الإسقاط رؤوسًا أو أحرفًا مختلفة تتطابق على الشاشة دون أن يغيّر عددها. ## Advanced -هذه الأعداد تحقق قاعدة: مجموع القطع من كل الأبعاد هو $3^n$. نختار لكل إحداثي $+1$ أو $-1$ أو «حر»، أي ثلاثة اختيارات، وكل قطعة تقابل اختيارًا واحدًا. وهناك قاعدة ثانية: الرؤوس ناقص الأضلاع زائد الأوجه وهكذا بالتناوب يعطي 1 لكل مكعب، إذا عددنا المكعب كله قطعة واحدة. هذه نسخة المكعب من صيغة أويلر. +أعطِ كل إحداثي ثلاث حالات: مثبتًا عند −1، أو عند +1، أو حرًا. يحسب هذا جميع الأوجه غير الخالية بمختلف أبعادها، بما فيها المكعب كله، فيعطي 3^n. ويساوي مجموعها المتناوب حسب البعد 1. ويتساوى عددا الأوجه المربعة والمكعبة عند n = 8 لأن نسبتهما F3/F2 تساوي (n − 2)/6. ## Derivation -1. القطعة تمتد في $k$ من الاتجاهات. نختار أيها، وهذا $\binom{n}{k}$ طريقة. -2. كل إحداثي من الـ $n-k$ الباقية يساوي $+1$ أو $-1$، أي اختيارين لكل واحد: $2^{\,n-k}$. -3. نضرب العددين: $F_k = \binom{n}{k}\,2^{\,n-k}$. +1. نختار الإحداثيات k التي نسمح لها بالتغير، فتحدد الاتجاهات داخل الوجه. +2. نثبت كل إحداثي آخر عند إحدى قيمتي طرفيه، فتحدد هذه الاختيارات موضع الوجه في المكعب. +3. نضرب العددين لأن كل اختيار للاتجاهات الحرة يسمح بجميع اختيارات أطراف الإحداثيات الباقية. ## Real world -### الوجوه نقاط - -برامج التعرف على الوجوه تحول كل صورة إلى قائمة قياسات. وصورتان لشخص واحد تقعان قريبتين كنقطتين، حتى في فضاء له مئات الأبعاد. - -### وصفات وقراءات - -وصفة فيها 11 مكوّنًا، أو محطة طقس لها 11 قراءة، هي نقطة واحدة في 11 بُعدًا. ولا نحتاج إلى رسم شيء لنقارن بين اثنتين منها. - -### بتات ومفاتيح +### الإعدادات الثنائية -الكلمة من 8 بتات في الحاسوب هي رأس من مكعب ذي 8 أبعاد. وتغيير بت واحد ينقلك على ضلع واحد إلى الرأس المجاور. +يصف رسم المكعب متعدد الأبعاد إعدادات ثنائية مستقلة والتغيير في إعداد واحد كل مرة. تنظم هذه الهندسة فضاء الحالات، ولا تعني وجود المفاتيح في أبعاد مادية إضافية. -### لماذا شبكة +### إحداثيات البيانات -الصورة المسطحة للمكعب ذي 11 بُعدًا مزدحمة، لأن 2,048 رأسًا و11,264 ضلعًا وُضعت على شاشة واحدة. المفيد هنا هو الأعداد. +يمكن لأحد عشر قياسًا مسجلًا وصف نقطة في فضاء بيانات ذي أحد عشر إحداثيًا. وقد تقلل القيود أو العلاقات بين القياسات بُعده الفعلي، كما تحتاج مقارنة المسافات إلى وحدات ومقاييس مناسبة. ولا يلزم أن تقع هذه البيانات عند رؤوس مكعب. diff --git a/content/lessons/geometry/higher-dimensions/en.md b/content/lessons/geometry/higher-dimensions/en.md index 377f49df..300469c6 100644 --- a/content/lessons/geometry/higher-dimensions/en.md +++ b/content/lessons/geometry/higher-dimensions/en.md @@ -1,70 +1,62 @@ --- title: 'Five dimensions and beyond, up to eleven' -summary: The same drag works again and again. At 11 dimensions a cube has 2,048 corners, and counting tells you what no picture can. +summary: 'Count the vertices, edges and higher-dimensional faces of a hypercube without relying on a crowded projection.' parameters: - n: n — how many dimensions the cube has - spin: spin — turns the shadow so you can see it from another side + n: 'n — number of hypercube dimensions, from 4 to 11' + spin: 'spin — changes the projected view' variables: - - the number of pieces of dimension k inside the cube (corners when k is 0, edges when 1, square faces when 2, cubes when 3) - - the number of dimensions of the whole cube - - the number of dimensions of the piece you are counting + - 'F_k: count of k-dimensional faces, including vertices and the whole cube' + - 'n: dimension of the hypercube' + - 'k: dimension of the faces being counted' --- ## Try it -1. Move n from 4 up to 11 and watch the corners. Each step doubles them. Where does the picture stop being something you can read? -2. Set n to 11 and drag the picture left and right. The shadow is a dense web, and that is honest: a flat screen cannot show 11 directions. -3. Pick any n and check the table at the right. Corners: twice the row above. Edges: twice the old edges, plus one for every old corner. +1. Set n = 5, then 6. The vertices double from 32 to 64. Edges increase from 80 to 192: twice the old 80 plus 32 joining edges. +2. Set n = 8. Compare the square-face and cubic-face counts: both are 1792, although these faces have different dimensions. +3. Set n = 11 and vary spin. The projection changes, but the counts stay at 2048 vertices and 11264 edges. Use the table when projected edges overlap. ## Real-life examples -- **Five yes or no questions.** A quiz with 5 yes/no questions can be answered in 32 ways. Each answer sheet is one corner of the 5D cube (n = 5). -- **One byte.** A byte is 8 switches, each on or off, so it has 256 values. Each value is one corner of the 8D cube (n = 8). -- **Eleven switches.** A panel with 11 on/off switches has 2,048 settings and the cube has 11,264 edges: from each setting you can flip any one of the 11 switches (n = 11). +1. **Five binary answers.** Five independent yes/no answers give 32 possible answer lists, represented by the vertices of a 5-cube. +2. **Eight-bit values.** Eight bits give 256 possible bit strings, represented by an 8-cube's vertices. One-bit changes are its edges. +3. **Eleven switches.** Eleven independent on/off switches have 2048 configurations. Each has eleven one-switch neighbours, giving 11264 undirected connections after double counts are removed. ## Test yourself -1. Before you move the slider, guess which dimension gives exactly 256 corners. (Hint: a 4D cube has 16, and each step doubles.) Then set n and check. -2. Guess how many corners a 6D cube has. Then make a cube with more than 10,000 edges: which n is the smallest that works? -3. Find the dimension in which the cube has exactly 80 edges. -4. Find the dimension in which the cube has exactly as many square faces as cubes inside it. +1. Find the dimension giving 256 vertices. +2. Find the smallest available n giving more than 10000 edges. +3. Find the dimension giving 80 edges. +4. Find the dimension where the square-face count equals the cubic-face count. ## Intuition -The drag from the last lessons works again and again. Drag a cube in a fourth direction and you get a tesseract. Drag that in a fifth direction. Every time, the shape is copied and every corner is joined to its copy. Five dimensions: 32 corners. Eight: 256. Eleven: 2,048 corners and 11,264 edges. +Every additional hypercube coordinate has two choices at a vertex. Adding one coordinate therefore doubles the possible vertex lists. That is why the sequence continues from 16 in four dimensions to 32 in five and 2048 in eleven, even when we cannot picture all the independent directions. -Set n to 11. The picture turns into a dense web. That is honest. A flat screen cannot show eleven directions, so the shadow gets messy, and the counting carries the meaning. The table at the right counts it for you. - -One formula gives every count: the pieces of dimension $k$ inside an $n$-dimensional cube. Corners are the pieces with $k = 0$, edges with $k = 1$, square faces with $k = 2$ and cubes with $k = 3$. Move n and read the readouts under the picture: they are the same formula each time. - -Why would anyone want a shape with 11 dimensions? Because a list of 11 numbers describes one thing. A photo of a face described by 11 measurements, a recipe with 11 ingredients, a weather station with 11 readings: each one is a single point in an 11-dimensional space. And "how similar are two faces" becomes "how close are two points". The lesson on distance in any dimension shows how to measure that. The reasons physicists give for 11 are in the lesson on eleven dimensions. +To describe a face, let some coordinates vary and fix the rest at endpoints. An edge has one free coordinate; a square face has two; a cubic face has three. These are designated faces of the hypercube, not all possible smaller squares or cubes that could be drawn inside it. ## Formal -The pieces of dimension $k$ in an $n$-cube are found by two choices. First pick the $k$ directions the piece spreads in: there are $\binom{n}{k}$ ways. Then every one of the other $n-k$ coordinates is stuck at $+1$ or $-1$: $2^{\,n-k}$ ways. So $F_k = \binom{n}{k}\,2^{\,n-k}$. +For integers with $0\le k\le n$, choose the k free coordinate directions in $\binom nk$ ways. Each of the remaining n − k coordinates is fixed at −1 or +1, giving $2^{n-k}$ choices. Thus the number of k-dimensional faces is $F_k=\binom nk2^{n-k}$. We include vertices as 0-faces and the whole n-cube as one n-face. -Corners: $F_0 = 2^n$. Edges: $F_1 = n\,2^{\,n-1}$. For $n = 11$ that is $2048$ corners and $11264$ edges. +In particular, $F_0=2^n$ and $F_1=n2^{n-1}$. For n = 11 these give 2048 vertices and 11264 edges. A projection can make different vertices or edges overlap on screen without changing either count. ## Advanced -The numbers obey an identity: the pieces of all dimensions together are $3^n$. Choose for each coordinate $+1$, $-1$ or "free", which is three choices, and every piece is one such choice. Also, the alternating sum of the counts, corners minus edges plus faces and so on, is 1 for every cube, if the whole cube counts as one piece. It is a cube version of Euler's formula. +Allow each coordinate three statuses: fixed at −1, fixed at +1, or free. This counts all nonempty faces of all dimensions, including the whole cube, giving 3^n. Their alternating sum by dimension is 1. The square-face and cubic-face counts agree at n = 8 because their ratio F3/F2 is (n − 2)/6. ## Derivation -1. The piece spreads in $k$ directions. Choose which ones: $\binom{n}{k}$ ways. -2. The other $n-k$ coordinates are each $+1$ or $-1$, two choices each: $2^{\,n-k}$. -3. Multiply the two counts: $F_k = \binom{n}{k}\,2^{\,n-k}$. +1. Choose which k coordinates are allowed to vary. Their choice determines the directions within the face. +2. Fix every other coordinate at one of its two endpoints. These choices place the face within the hypercube. +3. Multiply the counts because each choice of free directions permits every endpoint assignment of the remaining coordinates. ## Real world -### Faces as points -Programs that recognise faces turn each photo into a list of measurements. Two photos of the same person end up close together as points, even in a space with hundreds of dimensions. +### Binary configurations -### Recipes and readings -A recipe with 11 ingredients, or a weather station with 11 readings, is one point in 11 dimensions. Nothing needs to be drawn to compare two of them. +A hypercube graph describes independent binary settings and changes of one setting at a time. Its geometry organizes the state space without suggesting that the switches occupy extra physical dimensions. -### Bits and switches -A computer word of 8 bits is a corner of an 8D cube. Changing one bit moves you along one edge, to a neighbour. +### Data coordinates -### Why a web -A flat picture of an 11D cube is crowded because 2,048 corners and 11,264 edges are squeezed onto a screen. The counts are the useful part. +Eleven recorded measurements can describe a point in an eleven-coordinate data space. Constraints or relationships may reduce its intrinsic dimension, and comparing distances requires sensible units and scaling. Such data need not lie at hypercube vertices. From 4f2aedbada6f6a8a9e48e21021f6d11bce22f43a Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:19:12 +0300 Subject: [PATCH 044/124] content: rewrite slicing-higher-dimensions for first-time learners in both languages --- .../geometry/slicing-higher-dimensions/ar.md | 75 ++++++++---------- .../geometry/slicing-higher-dimensions/en.md | 76 ++++++++----------- 2 files changed, 60 insertions(+), 91 deletions(-) diff --git a/content/lessons/geometry/slicing-higher-dimensions/ar.md b/content/lessons/geometry/slicing-higher-dimensions/ar.md index 689cbfc0..0bfbcd6f 100644 --- a/content/lessons/geometry/slicing-higher-dimensions/ar.md +++ b/content/lessons/geometry/slicing-higher-dimensions/ar.md @@ -1,81 +1,66 @@ --- title: كيف تبدو كرة رباعية الأبعاد وهي تمر عبر غرفتنا؟ -summary: >- - مخلوقات مسطحة تعيش على ورقة لا ترى من الكرة إلا الشريحة التي تلمس ورقتها. وبالطريقة نفسها سنرى كرة رباعية الأبعاد. +summary: 'استخدم مثلثًا قائمًا لحساب مقطع، من قرص يقطعه خط إلى كرة رياضية رباعية الأبعاد.' parameters: - n: n — عدد أبعاد الكرة (2 قرص مسطح، 3 كرة عادية، 4 كرة رباعية الأبعاد) - h: h — بعد مركز الكرة عن الورقة، بالسنتيمتر - R: R — نصف قطر الكرة، بالسنتيمتر + n: 'n — بُعد الكرة: قرص (2)، كرة عادية (3)، كرة رباعية الأبعاد (4)' + h: 'h — إزاحة المركز الموقعة عن المستوى القاطع، بالسم' + R: 'R — نصف قطر الكرة الكاملة بالسم' variables: - - نصف قطر الشريحة، أي الجزء من الكرة الذي يلمس الورقة - - نصف قطر الكرة كلها - - بعد مركز الكرة عن الورقة + - 'r: نصف قطر المقطع؛ ونصف طول القطعة عند n = 2' + - 'R: نصف قطر الكرة الكاملة' + - 'h: الإزاحة الموقعة؛ تمثل |h| المسافة العمودية' charts: [] --- ## Try it -1. أبقِ n على 3 واسحب الكرة إلى أعلى وأسفل في الرسم الأيسر. في الرسم الأيمن تظهر الشريحة من العدم. تكبر حتى تصير دائرة كاملة حين تقطع الورقة منتصف الكرة، ثم تصغر وتختفي. الصور الصغيرة في الصف تحكي القصة نفسها، وعليها علامة عند اللحظة الحالية. -2. اجعل n يساوي 4 ثم 2. للشريحة دائمًا بُعد أقل من الكرة بواحد. الكرة رباعية الأبعاد تترك كرة ثلاثية الأبعاد، والقرص المسطح لا يترك إلا قطعة مستقيمة. -3. اختر الإعداد الأول (h = 4 وR = 5). ابحث في الرسم الأيسر عن المثلث الذي أضلاعه R وh وr. ثم كبّر R وانظر كيف تكبر الشريحة وh ثابت لا يتغير. +1. اضبط n = 3 وR = 5 وh = 4. المقطع قرص نصف قطره 3 سم، لأن 5² − 4² = 9. +2. أبقِ R = 5 وحرّك h عبر 5 ثم 0 ثم −5. يكبر المقطع إلى نصف قطر 5 عند المركز، ثم يصغر. عند الطرفين يكون التقاطع الرياضي نقطة فقط، ويعاملها العرض بوصفها مقطعًا صفري الحجم. +3. اضبط n = 2 ثم 4، مع h = 0. يتغير المقطع من قطعة مستقيمة إلى كرة ثلاثية الأبعاد. يوضح المنظر الجانبي حساب نصف القطر، ولا يمثل منظرًا كاملًا لجسم رباعي الأبعاد. ## Real-life examples -- **الثلاثية 3-4-5.** كرة نصف قطرها 5 cm نقطعها على بعد 4 cm من مركزها، فتترك شريحة نصف قطرها 3 cm بالضبط. الأعداد 3 و4 و5 هي أضلاع مثلث قائم، فيخرج الجواب دقيقًا بلا تقريب. -- **كرة رباعية الأبعاد في أوسع حالاتها.** حين يكون مركز الكرة في غرفتنا تمامًا (h = 0) تبلغ الشريحة أكبر حجم لها: كرة نصف قطرها 5 cm. قبل ذلك كانت نقطة صغيرة، وبعد ذلك تعود نقطة صغيرة. -- **قرص يكاد يلمس خطًا.** قرص مسطح نصف قطره 5 cm، ومركزه يبعد 4.9 cm عن خط، بالكاد يصل إليه. المخلوقات على ذلك الخط ترى قطعة أقصر من 2 cm، وهي على وشك أن تختفي. +1. **قطع بعيد عن المركز.** عند n = 3 وR = 5 سم وh = 4 سم، يكون المقطع قرصًا نصف قطره 3 سم وقطره 6 سم. +2. **مقطع مركزي في أربعة أبعاد.** عند n = 4 وR = 5 سم وh = 0، يكون المقطع الرياضي كرة ثلاثية الأبعاد نصف قطرها 5 سم. +3. **قرب حافة قرص.** عند n = 2 وR = 5 سم وh = 4.9 سم، يكون المقطع قطعة طولها نحو 1.99 سم. نصف طولها √0.99 سم. ## Test yourself -1. اجعل نصف قطر الشريحة 3 cm بالضبط من كرة نصف قطرها 5 cm. -2. اجعل الكرة رباعية الأبعاد تختفي من غرفتنا. -3. ابحث عن أوسع شريحة ممكنة من كرة نصف قطرها 8 cm. كم يبعد مركز الكرة عن الورقة؟ -4. اجعل الشريحة نصف عرض الكرة بالضبط. +1. أبقِ R = 5 واجعل نصف قطر المقطع قريبًا من 3 سم. +2. اختر n = 4 واجعل |h| مساويًا لـR أو أكبر منه، فلا يبقى مقطع ذو نصف قطر موجب. اجعل |h| أكبر من R إذا أردت غياب التقاطع تمامًا. +3. اضبط R = 8 واجعل المستوى القاطع يمر بالمركز للحصول على أعرض مقطع. +4. اجعل نصف قطر المقطع قريبًا من نصف نصف القطر الأصلي. ## Intuition -تخيّل مخلوقًا مسطحًا يعيش على ورقة. يمشي يمينًا ويسارًا وإلى الأمام والخلف، لكنه لا يعرف معنى «فوق». في عام 1884 كتب إدوين أبوت كتابًا عن مخلوقات مثله، سمّاه Flatland، أي «الأرض المسطحة». الآن ندفع كرة من فوق الورقة إلى تحتها. ماذا يرى المخلوق؟ لا شيء في البداية. ثم تظهر نقطة من العدم، وتكبر فتصير دائرة صغيرة ثم كبيرة، ثم تصغر وتختفي. هو لا يرى الكرة كاملة أبدًا. يرى الشريحة فقط، أي الجزء الذي تلمس فيه الكرة ورقته. +اقطع كرة مصمتة مثالية بمستوى. قرب الحافة يكون المقطع قرصًا صغيرًا، وعند المركز يصبح بعرض الكرة نفسها. إذا واصلت بعد المركز، صغر المقطع من جديد. يشمل المقطع نقاط التقاء المستوى بالكرة فقط، بينما يعرض الإسقاط صورة الجسم كله على المستوى. -في الرسم الأيسر الخط الأفقي هو الورقة، والدائرة هي الكرة وهي تُرى من الجانب. اسحب الكرة إلى أعلى وأسفل. في الرسم الأيمن ترى ما يراه المخلوق. الصور الصغيرة تحته هي الرحلة كلها، صورة بعد صورة. الكرة التي فوق الورقة «لم تصل بعد»، والتي تحتها «مضت». +لكرة نصف قطرها 5 ومستوى يبعد 4 وحدات عن مركزها، ارسم عمودًا من المركز إلى المستوى، ثم ارسم نصف قطر إلى حافة المقطع. يتكون مثلث قائم من هذين الخطين ونصف قطر المقطع، وتره 5 وأحد ضلعيه 4. يكون الضلع المتبقي 3. -جهاز الأشعة المقطعية عند الطبيب يفعل هذا عن قصد. يصوّر شرائح رقيقة من جسمك، واحدة بعد واحدة، كأنها شرائح خبز. وينظر الطبيب في كومة الصور فيتخيل الجسم كله. وللشريحة دائمًا بُعد أقل بواحد من الشيء الذي تقطعه. - -جرّب الأرقام. خذ كرة نصف قطرها 5 cm، وضع الورقة على بعد 4 cm من مركزها. الشريحة دائرة نصف قطرها 3 cm، لأن 3 و4 و5 أضلاع مثلث قائم. نصف قطر الكرة هو الضلع الطويل، وبعد الورقة ضلع قصير، ونصف قطر الشريحة هو الضلع القصير الآخر. حرّك الورقة إلى المنتصف فتصير الشريحة بحجم الكرة. - -الآن خطوة أخرى. غرفتنا هي «الورقة»، وكرة رباعية الأبعاد تمر عبرها. سنرى كرة صغيرة تظهر من العدم في وسط الهواء. تكبر حتى تبلغ حجمها الكامل، ثم تصغر وتختفي. لن نرى الكرة رباعية الأبعاد كاملة أبدًا. سنرى شريحة ثلاثية الأبعاد واحدة في كل مرة. اجعل n يساوي 4 لترى ذلك. لا نستطيع أن نرسم كرة رباعية الأبعاد، فالرسم يعرض ما كنا سنراه. +يعمل الحساب نفسه في أبعاد أعلى. يعطي خط يقطع قرصًا قطعة مستقيمة، ويعطي مستوى يقطع كرة ثلاثية الأبعاد قرصًا، ويعطي مستوى فائق ثلاثي الأبعاد يقطع كرة رباعية الأبعاد كرة ثلاثية الأبعاد. الحالة الأخيرة نموذج رياضي، وليست وصفًا لجسم رُصد وهو يدخل غرفة. ## Formal -خذ كرة نصف قطرها $R$ واقطعها بورقة مستوية على بعد $h$ من مركزها. مركز الكرة وأقرب نقطة في الورقة إليه ونقطة على حافة الشريحة تصنع مثلثًا قائمًا. أطول أضلاعه $R$، وضلعاه الآخران $h$ ونصف قطر الشريحة $r$، فيكون $R^2 = r^2 + h^2$ ومنه $r = \sqrt{R^2 - h^2}$. +لكرة نصف قطرها R ومستوى فائق يبعد عموديًا $|h|$ عن مركزها، يكون نصف قطر المقطع المتقاطع $r=\sqrt{R^2-h^2}$. تسجل إشارة h جهة المركز بالنسبة إلى المستوى، ولا تؤثر في نصف القطر. تشترط الصيغة $|h|\le R$. -وهذا صحيح في أي عدد من الأبعاد. إذا قطعت ورقة مستوية كرة لها $n$ من الأبعاد، تركت كرة لها $n-1$ من الأبعاد بنصف القطر هذا. القرص يترك قطعة مستقيمة طولها $2r$، والكرة الثلاثية الأبعاد تترك قرصًا، والكرة الرباعية الأبعاد تترك كرة ثلاثية الأبعاد. وإذا كان $|h| \ge R$ فالورقة لا تصل إلى الكرة، أو تلمسها في نقطة واحدة، فلا يوجد شيء يُرى. +عندما يكون $|h|R$ فلا يوجد تقاطع. تختلف الحالتان الحديتان، رغم أن العرض يعطي نصف قطر صفريًا في كلتيهما. ## Advanced -إذا رصصنا الشرائح فوق بعضها أعدنا بناء الشكل كله، وبهذه الطريقة تُحسب الحجوم. نجمع حجوم كل شرائح الكرة الرباعية الأبعاد. كل شريحة كرة ثلاثية الأبعاد نصف قطرها $\sqrt{R^2 - h^2}$ وحجمها $\frac{4}{3}\pi r^3$، فنحصل على الحجم الرباعي $\frac{\pi^2}{2}R^4$. والطريقة نفسها تعطي كرة كل بُعد من الكرة التي تحته. - -والتقطيع أيضًا طريقة صادقة لننظر إلى جسم رباعي الأبعاد لا نستطيع تخيله. هو فيلم من شرائح ثلاثية الأبعاد، والاتجاه الرابع فيه مثل الزمن. والكرة أبسط الحالات، لأن كل شريحة منها كرة أخرى. أما المكعب رباعي الأبعاد وغيره فيتغير شكل الشرائح كلما تحركت الورقة، وهذه طريقة جيدة لدراستها. +يعيد تكامل مقادير المقاطع المتوازية مقدار الكرة الكاملة. للكرة رباعية الأبعاد، نكامل أحجام المقاطع الثلاثية (4π/3)(R² − h²)^(3/2) من −R إلى R، فنحصل على π²R⁴/2. عرض المقاطع بالتتابع عبر الزمن وسيلة لتصور الإحداثي المكاني الرابع، ولا يعني أنه هو الزمن الفيزيائي. ## Derivation -1. مركز الكرة وأقرب نقطة في الورقة ونقطة على حافة الشريحة تصنع مثلثًا قائمًا ضلعه الطويل $R$ وضلعاه القصيران $r$ و$h$: $R^2 = r^2 + h^2$. -2. ننقل $h^2$ إلى الطرف الآخر: $r^2 = R^2 - h^2$. -3. نأخذ الجذر التربيعي. نصف القطر لا يكون سالبًا، فنأخذ الجذر الموجب فقط: $r = \sqrt{R^2 - h^2}$. +1. يشكل نصف القطر R والمسافة العمودية |h| ونصف قطر المقطع r مثلثًا قائمًا، لذا R² = r² + h². +2. نطرح h² فنحصل على r² = R² − h². يتطلب وجود تقاطع حقيقي أن يكون الطرف الأيمن غير سالب. +3. نأخذ الجذر التربيعي غير السالب لأن r نصف قطر. تعطي المساواة r = 0 ونقطة تماس. ## Real world -### الأشعة المقطعية والرنين المغناطيسي - -يصوّر الجهاز شرائح رقيقة من الجسم، ويرصّها الحاسوب في صورة ثلاثية الأبعاد. وهكذا ينظر الأطباء داخل جسمك دون أن يفتحوه. - -### حلقات الشجرة - -الجذع المقطوع تظهر فيه حلقات، وهو شريحة مستوية من الشجرة. وعدّ الحلقات يخبرك كم كان عمر الشجرة حين قُطعت. - -### خطوط الارتفاع في خريطة الجبل +### قطع جسم كروي -كل خط يصل نقاط الجبل التي لها الارتفاع نفسه. فهذه الخطوط شرائح من الجبل عند ارتفاعات ثابتة، ننظر إليها من فوق. +تعطي القطوع المتوازية في جسم كروي مثالي أقراصًا مختلفة الأحجام. يعتمد حجمها على البعد عن المركز، رغم ثبات نصف قطر الجسم. -### الطابعات ثلاثية الأبعاد +### نماذج من طبقات -تبني الطابعة الجسم شريحة رقيقة بعد أخرى. تضع طبقة مسطحة، ثم الطبقة التي فوقها. +يمكن وصف جسم بسلسلة من المقاطع الرقيقة. يستخدم التصنيع طبقة بعد طبقة هذه الفكرة الهندسية، ويحد السمك غير الصفري للطبقات من دقة تمثيل السطح الناعم. diff --git a/content/lessons/geometry/slicing-higher-dimensions/en.md b/content/lessons/geometry/slicing-higher-dimensions/en.md index 1f49b5c0..c48ae4d3 100644 --- a/content/lessons/geometry/slicing-higher-dimensions/en.md +++ b/content/lessons/geometry/slicing-higher-dimensions/en.md @@ -1,82 +1,66 @@ --- title: What would a 4D ball look like passing through our room? -summary: >- - Flat creatures on a sheet of paper only see the slice of a ball that touches their sheet. We would see a 4D ball - the same way. +summary: 'Use a right triangle to find the size of a cross-section, from a disk cut by a line to a mathematical four-dimensional ball.' parameters: - n: n — the dimension of the ball (2 is a flat disc, 3 an ordinary ball, 4 a 4D ball) - h: h — how far the ball's centre is from the slice, in cm - R: R — the radius of the ball, in cm + n: 'n — ball dimension: disk (2), ordinary ball (3), four-dimensional ball (4)' + h: 'h — signed centre offset from the cutting hyperplane, in cm' + R: 'R — radius of the full ball, in cm' variables: - - the radius of the slice, the part of the ball that touches the sheet - - the radius of the whole ball - - how far the ball's centre is from the sheet + - 'r: slice radius; half the segment length when n = 2' + - 'R: radius of the full ball' + - 'h: signed offset; |h| is the perpendicular distance' charts: [] --- ## Try it -1. Keep n at 3 and drag the ball up and down in the left picture. In the right picture, the slice appears from nothing, grows to a full circle when the sheet cuts through the middle, shrinks and vanishes. The row of small snapshots shows the same story, with the current moment marked. -2. Set n to 4, then to 2. The slice always has one dimension less than the ball: a 4D ball leaves a 3D ball, a flat disc leaves only a line segment. -3. Pick the first preset (h = 4, R = 5). Find the triangle with sides R, h and r in the left picture. Then make R bigger and watch the slice grow while h stays the same. +1. Set n = 3, R = 5 and h = 4. The slice is a disk of radius 3 cm because 5² − 4² = 9. +2. Keep R = 5 and move h through 5, 0 and −5. The slice grows to radius 5 at the centre, then shrinks. At either endpoint the mathematical intersection is only a point, which the display treats as zero-sized. +3. Set n = 2, then 4 with h = 0. The slice changes from a line segment to a three-dimensional ball. The side-view diagram illustrates the radius calculation; it is not a complete view of a four-dimensional object. ## Real-life examples -- **The classic 3-4-5.** A ball of radius 5 cm, cut 4 cm from its centre, leaves a slice of radius exactly 3 cm. The numbers 3, 4 and 5 are the sides of a right triangle, so the slice radius is exact, with no rounding. -- **A 4D ball at its widest.** When the middle of the ball is exactly in our room (h = 0), the slice is as big as it will ever get: a ball of radius 5 cm. Before that it was only a speck, and afterwards it shrinks to a speck again. -- **A disc barely touching a line.** A flat disc of radius 5 cm, with its centre 4.9 cm from a line, only just reaches it. The creatures on that line see a segment less than 2 cm long, and it is about to vanish. +1. **An offset cut.** With n = 3, R = 5 cm and h = 4 cm, the disk slice has radius 3 cm and diameter 6 cm. +2. **A central four-dimensional slice.** With n = 4, R = 5 cm and h = 0, the mathematical cross-section is a three-dimensional ball of radius 5 cm. +3. **Near the edge of a disk.** With n = 2, R = 5 cm and h = 4.9 cm, the slice is a segment about 1.99 cm long. Its half-length is √0.99 cm. ## Test yourself -1. Make the slice radius exactly 3 cm from a ball of radius 5 cm. -2. Make the 4D ball vanish from our room. -3. Find the widest possible slice of a ball with a radius of 8 cm. How far from the centre must the sheet be? -4. Make the slice exactly half as wide as the ball. +1. Keep R = 5 and make the slice radius approximately 3 cm. +2. Choose n = 4 and make |h| at least R, so there is no positive-radius slice. Use |h| greater than R if you want no intersection at all. +3. Set R = 8 and place the cutting plane through the centre to get the widest slice. +4. Make the slice radius approximately half the original radius. ## Intuition -Imagine a flat creature that lives on a sheet of paper. It can walk left, right, forward and back, but it has never heard of "up". In 1884 Edwin Abbott wrote a book about such creatures and called it "Flatland". Now push a ball down through the paper. What do the creatures see? Nothing at first. Then a dot appears from nowhere, grows into a small circle, then a big one, then shrinks and vanishes. They never see the whole ball. They only see the slice where the ball meets their sheet. +Cut an ideal solid ball with a flat plane. Near the edge, the cross-section is a small disk. Through the centre, it is a disk as wide as the ball. Continuing past the centre makes the cross-section smaller again. A slice includes only points where the plane meets the ball; a projection would show the whole ball mapped onto the plane. -In the left picture the horizontal line is the sheet and the circle is the ball seen from the side. Drag the ball up and down. On the right you see what the creatures see. The row of small snapshots underneath is the whole trip, one picture after another. A ball above the sheet is "not here yet". A ball below it is "already gone". +For radius 5 and a plane 4 units from the centre, draw a perpendicular from the centre to the plane. Then draw a radius to the edge of the slice. These segments and the slice radius form a right triangle with hypotenuse 5 and one leg 4. The remaining leg is 3. -A doctor's CT scan does the same on purpose. The machine takes pictures of thin flat slices of your body, one after another, like slices of bread. The doctor looks through the stack and builds the whole body in their head. A slice is always one dimension flatter than the thing it cuts. - -Try the numbers. Take a ball of radius 5 cm and put the sheet 4 cm from its centre. The slice is a circle of radius 3 cm, because 3, 4 and 5 make a right triangle: the radius of the ball is the long side, the distance to the sheet is one short side, and the slice radius is the other. Move the sheet to the middle and the slice is as big as the ball. - -Now one step up. Our room is the "sheet", and a 4D ball passes through it. We would see a small ball appear from nowhere in mid-air. It would swell to full size, then shrink and vanish. We could never see the 4D ball whole, only one 3D slice at a time. Set n to 4 to watch exactly that. We cannot draw a 4D ball, so the picture shows what we would see. +The same calculation works in more dimensions. A line through a disk gives a segment, a plane through a three-dimensional ball gives a disk, and a three-dimensional hyperplane through a four-dimensional ball gives a three-dimensional ball. The last case is a mathematical model, not an observed object entering a room. ## Formal -Take a ball of radius $R$ and cut it with a flat sheet at distance $h$ from its centre. The centre of the ball, the point of the sheet closest to it and any point on the edge of the slice form a right triangle. Its longest side is $R$ and its other two sides are $h$ and the slice radius $r$, so $R^2 = r^2 + h^2$ and $r = \sqrt{R^2 - h^2}$. +For a ball of radius R and a hyperplane at perpendicular distance $|h|$ from its centre, an intersecting slice has radius $r=\sqrt{R^2-h^2}$. The sign of h records which side of the plane the centre occupies; it does not affect the radius. The formula requires $|h|\le R$. -This works in any dimension. A ball of $n$ dimensions cut by a flat sheet leaves a ball of $n-1$ dimensions with this radius: a disc leaves a segment of length $2r$, a 3D ball leaves a disc, and a 4D ball leaves a 3D ball. If $|h| \ge R$ the sheet misses the ball (or only touches it at one point) and there is nothing to see. +When $|h|R$, the intersection is empty. These boundary cases are different even though the display gives both zero slice radius. ## Advanced -Stacking slices rebuilds the whole shape, and this is how volumes are computed. Adding up the volumes of all the slices of a 4D ball, each a 3D ball of radius $\sqrt{R^2 - h^2}$ with volume $\frac{4}{3}\pi r^3$, gives the 4D volume $\frac{\pi^2}{2}R^4$. The same recipe gives each dimension's ball from the one below it. - -Slicing is also the honest way to look at a 4D object we cannot picture: it is a movie of 3D slices, and the fourth direction plays the role of time. A ball is the simplest case, since every slice is another ball. For a 4D cube or other shapes, the slices change shape as the sheet moves, which is a good way to study them. +Integrating the measures of parallel slices reconstructs the measure of the whole ball. For a four-dimensional ball, integrate the three-dimensional slice volumes (4π/3)(R² − h²)^(3/2) from −R to R to obtain π²R⁴/2. Scanning slices over time is a way to visualize the fourth spatial coordinate; it does not identify that coordinate with physical time. ## Derivation -1. The ball's centre, the nearest point of the sheet and a point on the edge of the slice make a right triangle with long side $R$ and short sides $r$ and $h$: $R^2 = r^2 + h^2$. -2. Move $h^2$ to the other side: $r^2 = R^2 - h^2$. -3. Take the square root. The radius is never negative, so only the positive root is used: $r = \sqrt{R^2 - h^2}$. +1. The radius R, the perpendicular distance |h| and the slice radius r form a right triangle, so R² = r² + h². +2. Subtract h² to get r² = R² − h². A real intersection requires the right-hand side to be nonnegative. +3. Take the nonnegative square root because r is a radius. Equality gives r = 0 and a point of contact. ## Real world -### CT and MRI scans - -The machine photographs thin flat slices of a body, and a computer stacks them into a 3D picture. This is how doctors look inside you without cutting you open. - -### Tree rings - -A cut log shows rings, a flat slice through the trunk. Counting the rings tells you how old the tree was when it was cut. - -### Contour lines on a hiking map +### Cutting a ball-shaped object -Each line joins all the points of a mountain at one height. The lines are slices of the mountain at fixed heights, seen from above. +Parallel cuts through an ideal spherical object produce disks of different sizes. Their sizes depend on distance from the centre, even though the object's radius is fixed. -### 3D printers +### Layered models -A 3D printer builds an object one thin slice at a time, laying down one flat layer and then the next on top of it. +A solid can be described by a sequence of thin cross-sections. Layer-by-layer fabrication uses that geometric idea, while the finite layer thickness limits how closely the layers reproduce a smooth shape. From c9e4fade4645fee5bba6faffdb287621ff8817ef Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:19:12 +0300 Subject: [PATCH 045/124] content: rewrite tesseract for first-time learners in both languages --- content/lessons/geometry/tesseract/ar.md | 70 ++++++++++-------------- content/lessons/geometry/tesseract/en.md | 66 ++++++++++------------ 2 files changed, 58 insertions(+), 78 deletions(-) diff --git a/content/lessons/geometry/tesseract/ar.md b/content/lessons/geometry/tesseract/ar.md index ab60b066..32fe7dac 100644 --- a/content/lessons/geometry/tesseract/ar.md +++ b/content/lessons/geometry/tesseract/ar.md @@ -1,76 +1,64 @@ --- title: المكعب رباعي الأبعاد -summary: 'اسحب مكعبًا في اتجاه رابع فيصير له 16 رأسًا و8 مكعبات. وما تراه على الشاشة هو ظله، أي مكعب داخل مكعب.' +summary: 'كوّن مكعبًا رباعي الأبعاد رياضيًا، ثم افهم بنيته باستخدام العدّ والإسقاط.' parameters: - n: n — 3 للمكعب العادي، و4 للمكعب رباعي الأبعاد - spin: spin — يدير الشكل، فيكبر المكعب الداخلي ويأخذ مكان الخارجي - sweep: sweep — كم سحبنا المكعب في الاتجاه الرابع (100 % يعني انتهى السحب) + n: 'n — مكعب عادي (3) أو رباعي الأبعاد (4)' + spin: 'spin — يغيّر الدورانات المستخدمة في منظر الإسقاط' + sweep: 'sweep — الامتداد في الاتجاه الجديد؛ يكتمل عند 100%' variables: - - عدد أضلاع الشكل الذي له n من الأبعاد - - عدد الأبعاد + - 'E_n: عدد أحرف المكعب ذي n أبعاد' + - 'n: عدد الاتجاهات الإحداثية' --- ## Try it -1. اجعل n يساوي 4 وspin يساوي 0. يظهر مكعب صغير داخل مكعب كبير، وبينهما أضلاع تصل رؤوسهما. ثم ارفع spin ببطء. يكبر المكعب الداخلي ثم يأخذ مكان الخارجي. -2. أبقِ n على 4 وأنزل sweep من 100 إلى 0. يعود المكعب رباعي الأبعاد إلى المكعب العادي الذي بدأنا منه. الأضلاع الزرقاء هي التي صنعها الاتجاه الرابع. -3. بدّل بين n = 3 وn = 4 واقرأ الجدول على الجانب. أضلاع صف 4D ضعف أضلاع صف 3D، زائد الأضلاع الجديدة. +1. اضبط n = 3 وsweep = 100. اقرأ 8 رؤوس و12 حرفًا. ثم اجعل n = 4، فيصبح العددان 16 و32. +2. أبقِ n = 4 وغيّر sweep من 100 إلى 0. يختفي الفصل في الإحداثي الجديد، فتنطبق أزواج الرؤوس. يظل جدول الأعداد واصفًا للمكعب الرباعي المكتمل. +3. أعد sweep إلى 100 وغيّر spin من 0 إلى 90. يتغير الإسقاط مع ثبات عدد الرؤوس والأحرف. تجمع هذه الأداة عدة دورانات؛ فقيمتها ليست قياس زاوية دوران رباعي الأبعاد واحد منفرد. ## Real-life examples -- **المكعب للمقارنة.** للمكعب 8 رؤوس و12 ضلعًا و6 أوجه مربعة. تذكّر هذه الأعداد، فمنه سحبنا المكعب رباعي الأبعاد. -- **مكعب داخل مكعب.** عند spin يساوي 0 يظهر في الظل مكعبان متصلان عند الرؤوس. وكذلك يظهر في ظل المكعب على الحائط مربعان متصلان عند الرؤوس. المكعب الداخلي ليس أصغر، بل أبعد في الاتجاه الرابع. -- **في منتصف السحب الرابع.** عند sweep يساوي 40 لم تبتعد النسخة الثانية من المكعب إلا قليلًا، فالأضلاع الثمانية بين النسختين ما زالت قصيرة. +1. **المكعب المألوف.** عند n = 3 وspin = 40 وsweep = 100، يمثل الإسقاط مكعبًا بثمانية رؤوس واثني عشر حرفًا وستة أوجه مربعة. +2. **المكعب الرباعي المكتمل.** عند n = 4 وspin = 0 وsweep = 100، يمثل الرسم 16 رأسًا تصلها 32 حرفًا. اختلاف الأحجام الظاهرية في الإسقاط لا يعني اختلاف الأطوال الحقيقية للأحرف. +3. **امتداد جزئي.** عند n = 4 وspin = 40 وsweep = 40، يبلغ طول الاتجاه الجديد 40% من طوله الكامل. نحصل على صندوق رباعي الأبعاد غير مكتمل الامتداد، ويصبح مكعبًا رباعي الأبعاد منتظمًا عند اكتماله. ## Test yourself -1. خمّن أولًا: كم رأسًا للمكعب رباعي الأبعاد؟ ثم اعرضه كاملًا واقرأ العدد من الرسم. -2. قبل أن تحرك شيئًا، خمّن كم ضلعًا للمكعب العادي. ثم اعرضه وتحقق. -3. أدر المكعب رباعي الأبعاد ربع دورة، أي اجعل spin قريبًا من 90. ماذا حدث للمكعب الداخلي؟ +1. أظهر مكعبًا رباعي الأبعاد مكتملًا بضبط n = 4 وsweep = 100. +2. أظهر مكعبًا عاديًا مكتملًا بضبط n = 3 وsweep = 100. +3. اضبط n = 4 وspin قرب 90 لمقارنة منظر إسقاط آخر. ## Intuition -في غرفتنا ثلاثة اتجاهات: إلى الأمام، وإلى الجانب، وإلى الأعلى. لا اتجاه رابعًا عندنا، لكن القاعدة ما زالت صالحة. خذ المكعب واسحبه كله في اتجاه جديد، يصنع زاوية قائمة مع الاتجاهات الثلاثة. لا نستطيع أن نشير إلى هذا الاتجاه، لكننا نستطيع أن نعدّ ما نحصل عليه. +لبناء مكعب من مربع، نصنع مربعًا ثانيًا ونصل الرؤوس المتناظرة في اتجاه عمودي جديد. يمكن تكرار الإنشاء رياضيًا: نأخذ مكعبين ونصل رؤوسهما المتناظرة في اتجاه رابع مستقل. الناتج هو التيسراكت، أو المكعب رباعي الأبعاد. نستطيع تعريف هذا الإحداثي دون أن نستطيع الإشارة إلى اتجاهه في الغرفة. -العدّ سهل لأن القاعدة هي نفسها. ننسخ المكعب ونصل كل رأس بنسخته. للمكعب 8 رؤوس، فللشكل الجديد 16. وللمكعب 12 ضلعًا. النسختان تعطيان 24 ضلعًا، والوصلات تضيف 8، فالمجموع 32. وللشكل 24 وجهًا مربعًا و8 مكعبات. اسمه المكعب رباعي الأبعاد، وبالإنجليزية tesseract. +يساهم كل مكعب بثمانية رؤوس واثني عشر حرفًا. تعطي النسختان ستة عشر رأسًا وأربعة وعشرين حرفًا، ثم نضيف ثماني وصلات فيصبح عدد الأحرف اثنين وثلاثين. وللمكعب الرباعي أيضًا أربعة وعشرون وجهًا مربعًا وثماني خلايا حدية مكعبة ثلاثية الأبعاد. هذه الخلايا أجزاء من حده، وليست ثمانية مكعبات تملأ الفراغ الثلاثي العادي. -ما تراه على الشاشة هو ظل. ظل المكعب العادي على الحائط مسطح: مربعان متصلان عند الرؤوس. وظل المكعب رباعي الأبعاد في غرفتنا مكعبان متصلان عند الرؤوس: مكعب صغير داخل مكعب كبير. اجعل n يساوي 4 وspin يساوي 0 لتراه. - -المكعب الداخلي ليس أصغر في الحقيقة. هو أبعد في الاتجاه الرابع. وكذلك يبدو الوجه البعيد من المكعب أصغر في الصورة. ارفع spin فيدور الشكل في الاتجاه الرابع. يكبر المكعب الداخلي ويأخذ مكان الخارجي. لا شيء ينثني ولا ينكسر، فالشكل يدور فقط. هو يشبه ظل قطعة نقود تميلها في الضوء، فيتغير شكل الظل. - -اخترع تشارلز هاوارد هينتون اسم هذا الشكل سنة 1888. ورسم سلفادور دالي سنة 1954 في لوحته «Corpus Hypercubus» هذا الشكل مفتوحًا: 8 مكعبات على شكل صليب. هذا يشبه 6 مربعات على شكل صليب، تنطوي فتصير مكعبًا. +ما نراه على الشاشة إسقاط. كما قد يغيّر رسم المكعب أطواله الظاهرة ويجعل حوافه تتداخل، قد يجعل إسقاط المكعب الرباعي خلاياه المتساوية تبدو مختلفة الحجم. وقد يبدو أن الخطوط تمر عبر بعضها عند تغيير المنظر. لا يعني تقاطع الخطوط في الصورة أن الأحرف الأصلية تنثني أو تتقاطع في نقاط جديدة. ## Formal -الشكل الذي له $n$ من الأبعاد له $2^n$ رأس، وعند كل رأس يلتقي $n$ ضلع. لكل ضلع طرفان، فإذا عددنا الأضلاع من أطرافها عددنا كل ضلع مرتين، فنقسم على 2: $E_n = \frac{n\,2^n}{2} = n\,2^{\,n-1}$. +رؤوس المكعب القياسي ذي n أبعاد هي قوائم الإحداثيات البالغ عددها $2^n$، وكل إحداثي فيها إما −1 أو +1. يصل حرف بين رأسين عندما يختلفان في إحداثي واحد فقط. يلتقي عند كل رأس n من الأحرف؛ وبعد عدّ الأطراف والقسمة على اثنين نحصل على $E_n=n2^{n-1}$ لكل n لا يقل عن 1. -في المكعب $E_3 = 3 \cdot 4 = 12$. وفي المكعب رباعي الأبعاد $E_4 = 4 \cdot 8 = 32$. +عند n = 3، يكون $E_3=3\cdot4=12$. وعند n = 4، يكون $E_4=4\cdot8=32$. تخص الصيغ المكعبات متعددة الأبعاد، ولا تصف كل شكل ثلاثي أو رباعي الأبعاد. تنتج الخلايا المكعبة الحدية الثماني بتثبيت أحد الإحداثيات الأربعة عند إحدى قيمتي طرفيه. ## Advanced -ظل المكعب رباعي الأبعاد في الفضاء ثلاثي الأبعاد إسقاط منظوري من 4 أبعاد. يجري في الرسم مرتين: من 4 أبعاد إلى 3، ثم من 3 إلى الشاشة المسطحة. الدوران في المستوى الذي يضم المحورين الثالث والرابع، أو أي مستوى يضم المحور الرابع، هو دوران للشكل رباعي الأبعاد. وفي الظل يبدو كأن المكعب الداخلي يمر عبر الخارجي، لأن العمق في الاتجاه الرابع يتحول إلى حجم. +يدير العرض نموذج الإحداثيات في عدة مستويات إحداثية، ثم يطبق إسقاطات منظور متتابعة للوصول إلى الشاشة. صورة مكعب داخل مكعب تمثيل ممكن، وليست المظهر الوحيد. وكما يمكن بسط المكعب إلى شبكة من ستة مربعات، يمكن للمكعب الرباعي شبكة ثلاثية الأبعاد من ثمانية مكعبات؛ لكن طيها إلى الشكل الأصلي يحتاج إلى هندسة رباعية الأبعاد. ## Derivation -1. عند كل رأس يخرج ضلع واحد في كل اتجاه من الاتجاهات الـ $n$. -2. للشكل $2^n$ رأس. -3. بهذا نعدّ كل ضلع مرتين، مرة عند كل طرف، لذلك نقسم على 2: $E_n = \frac{n\,2^n}{2}$. -4. نبسّط: $E_n = n\,2^{\,n-1}$. +1. عند كل رأس للمكعب ذي n أبعاد، يغيّر حرف واحد كل إحداثي من الإحداثيات n، فيلتقي عنده n من الأحرف. +2. لكل إحداثي خياران عند الطرفين، فيكون عدد الرؤوس 2^n. +3. ضرب n في 2^n يعدّ كل حرف عند طرفيه. نقسم على اثنين لإزالة التكرار. +4. نحصل على n2^(n − 1)، أي 32 حرفًا عند n = 4. ## Real world -### صليب دالي - -رسم سلفادور دالي سنة 1954 في «Corpus Hypercubus» المكعب رباعي الأبعاد مفتوحًا على شكل صليب من 8 مكعبات. وبالحيلة نفسها تُطوى 6 مربعات على شكل صليب فتصير مكعبًا. - -### اسم من سنة 1888 - -اخترع تشارلز هاوارد هينتون اسم هذا الشكل سنة 1888. ومنذ ذلك الوقت يرسمه الناس مكعبًا داخل مكعب. - -### الظلال على الحائط +### أربعة اختيارات ثنائية -ظل المكعب على الحائط قد يكون مربعين متصلين عند الرؤوس. وظل المكعب رباعي الأبعاد في الفضاء مكعبان متصلان عند الرؤوس. فالرسم الأقل أبعادًا ظل لشكل أكثر أبعادًا. +تعطي أربعة إعدادات تشغيل وإيقاف 16 حالة. نمثل كل حالة برأس للمكعب الرباعي، ونصل الحالات التي تختلف في إعداد واحد فقط. تمثل الأحرف عندها التغييرات الممكنة بتبديل مفتاح واحد. -### فتح الشكل +### قراءة الإسقاطات -نستطيع أن نقصّ المكعب فيصير 6 مربعات مسطحة. أما المكعب رباعي الأبعاد فينفتح على 8 مكعبات. وفي درس شبكات المجسمات تجد فتح المكعب العادي. +يمثل الرسم الهندسي جسمًا ثلاثي الأبعاد على صفحة مسطحة. توسع صورة المكعب الرباعي الفكرة رياضيًا؛ فهي تفيد في معرفة الاتصالات، لكن الإسقاط وحده لا يحافظ على جميع الأطوال والزوايا. diff --git a/content/lessons/geometry/tesseract/en.md b/content/lessons/geometry/tesseract/en.md index fbecb640..d04d75a6 100644 --- a/content/lessons/geometry/tesseract/en.md +++ b/content/lessons/geometry/tesseract/en.md @@ -1,72 +1,64 @@ --- title: 'The tesseract: a cube with four dimensions' -summary: Drag a cube in a fourth direction and you get 16 corners and 8 cubes. What you see on screen is its shadow, a cube inside a cube. +summary: 'Construct a four-dimensional cube mathematically, then use counts and projections to understand its structure.' parameters: - n: n — 3 for a plain cube, 4 for the tesseract - spin: spin — turns the shape; the inner cube swells and swaps places with the outer one - sweep: sweep — how far the cube has been dragged in the fourth direction (100 % means finished) + n: 'n — ordinary cube (3) or tesseract (4)' + spin: 'spin — changes the rotations used for the projected view' + sweep: 'sweep — extension in the newest direction; 100% completes it' variables: - - the number of edges of the shape with n dimensions - - the number of dimensions + - 'E_n: number of edges of an n-cube' + - 'n: number of coordinate directions' --- ## Try it -1. Set n to 4 and spin to 0. You see a small cube inside a big one, with edges joining their corners. Then slowly raise spin and watch the inner cube grow and swap with the outer one. -2. Keep n at 4 and move sweep from 100 down to 0. The tesseract folds back into the plain cube it was made from. The blue edges are the ones the fourth direction made. -3. Switch between n = 3 and n = 4 and read the table at the right. The 4D row is always twice the 3D row, plus the new edges. +1. Set n = 3 and sweep = 100. Read 8 vertices and 12 edges. Then set n = 4: the counts become 16 and 32. +2. Keep n = 4 and change sweep from 100 to 0. The newest coordinate separation collapses, making pairs of vertices coincide. The count table still describes the completed tesseract. +3. Return sweep to 100 and change spin from 0 to 90. Watch the projection change while vertex and edge counts stay fixed. This control combines rotations; its value is not one isolated four-dimensional rotation angle. ## Real-life examples -- **The cube to compare.** A cube has 8 corners, 12 edges, 6 square faces. Keep it in mind: it is what the tesseract was dragged from. -- **A cube inside a cube.** With spin at 0 the shadow shows 2 cubes joined at the corners, like a cube's shadow on a wall shows 2 squares joined at the corners. The inner cube is not smaller, only farther away in the fourth direction. -- **Half-way through the fourth drag.** At sweep 40 the second copy of the cube has only moved part of the way, and the 8 edges between the two copies are still short. +1. **The familiar cube.** With n = 3, spin = 40 and sweep = 100, the projection represents a cube with 8 vertices, 12 edges and 6 square faces. +2. **The completed tesseract.** With n = 4, spin = 0 and sweep = 100, the drawing represents 16 vertices joined by 32 edges. Unequal apparent sizes in the projection do not mean unequal actual edge lengths. +3. **Partial extension.** With n = 4, spin = 40 and sweep = 40, the newest direction has 40% of its completed length. This is a partially extended four-dimensional box; it becomes a regular tesseract when the extension is complete. ## Test yourself -1. Guess first: how many corners does a tesseract have? Then show the finished tesseract and read the number. -2. Before you move anything, guess how many edges a plain cube has. Then show the cube and check. -3. Turn the tesseract by a quarter turn, spin near 90. What happened to the inner cube? +1. Show a completed tesseract by setting n = 4 and sweep = 100. +2. Show a completed ordinary cube by setting n = 3 and sweep = 100. +3. Set n = 4 and spin close to 90 to compare another projected view. ## Intuition -Our room has three directions: forward, sideways and up. We ran out of directions, but the rule did not run out. Take the cube and drag the whole of it in a new direction that is at right angles to all three. We cannot point to that direction, but we can count what we get. +To build a cube from a square, make a second square and join corresponding vertices in a new perpendicular direction. The mathematical construction can be repeated: make two cubes and join their corresponding vertices along a fourth independent direction. The result is a tesseract, or four-dimensional cube. We can define that coordinate direction without being able to point to it in our room. -Counting is easy, because it is the same rule as before: copy the cube and join every corner to its copy. A cube has 8 corners, so the new shape has 16. A cube has 12 edges: the copies make 24 and the joins make 8 more, so there are 32. It has 24 square faces and 8 cubes. This shape is the tesseract, a cube with four dimensions. +Each cube contributes eight vertices and twelve edges. The two copies give sixteen vertices and twenty-four edges; eight joining edges bring the edge count to thirty-two. The tesseract also has twenty-four square faces and eight three-dimensional cubic boundary cells. Those cells are parts of its boundary, not eight cubes filling ordinary three-dimensional space. -What you see on the screen is a shadow. A real cube's shadow on a wall is flat: two squares joined at their corners. The tesseract's shadow in our room is two cubes joined at their corners: a small cube inside a big one. Set n to 4 and spin to 0 to see it. - -The inner cube is not really smaller. It is farther away in the fourth direction, just as the far face of a cube looks smaller in a photograph. Raise spin and the shape turns in the fourth direction: the inner cube swells and swaps with the outer one. Nothing bends or breaks, it only turns, like the shadow of a coin you tilt in the light. - -The word tesseract was coined by Charles Howard Hinton in 1888. The painter Salvador Dalí put an unfolded tesseract in his picture "Corpus Hypercubus" in 1954: 8 cubes in the shape of a cross. It works the way 6 squares in a cross fold up into a cube. +The screen shows a projection. Just as a drawing of a cube can distort lengths and overlap edges, a tesseract projection can make equal cells look different in size. Changing the view may make lines appear to pass through each other. The underlying edges are not bending or gaining new intersections merely because their projected lines cross. ## Formal -A shape with $n$ dimensions has $2^n$ corners, and at every corner $n$ edges meet. Each edge has two ends, so counting edges by their ends counts every edge twice: $E_n = \frac{n\,2^n}{2} = n\,2^{\,n-1}$. +The vertices of a standard n-cube are the $2^n$ coordinate lists whose entries are each −1 or +1. Two vertices share an edge when exactly one coordinate differs. There are n edges at each vertex; counting endpoints and dividing by two gives $E_n=n2^{n-1}$ for n at least 1. -For the cube, $E_3 = 3 \cdot 4 = 12$. For the tesseract, $E_4 = 4 \cdot 8 = 32$. +For n = 3, $E_3=3\cdot4=12$. For n = 4, $E_4=4\cdot8=32$. These formulas describe hypercubes specifically, not every shape in three or four dimensions. A tesseract's eight cubic boundary cells arise by fixing one of four coordinates at one of its two endpoint values. ## Advanced -The shadow of the tesseract in 3D is a perspective projection from 4D, done in the picture twice: from 4D to 3D, then from 3D to the flat screen. Turning in the plane of the third and fourth axes, or any plane that includes the fourth axis, is a rotation of the 4D shape. In the shadow it looks like the inner cube passing through the outer one, because depth in the fourth direction is traded for size. +The illustration rotates the coordinate model in several coordinate planes, then applies successive perspective projections to reach the screen. A nested-cube picture is one possible representation, not a unique appearance. Like a cube's net of six squares, a tesseract can have a three-dimensional net of eight cubes; folding that net into the original object requires four-dimensional geometry. ## Derivation -1. At every corner of the shape, one edge leaves in each of the $n$ directions. -2. The shape has $2^n$ corners. -3. That counts every edge twice, once at each end, so we divide by 2: $E_n = \frac{n\,2^n}{2}$. -4. Simplify: $E_n = n\,2^{\,n-1}$. +1. At each n-cube vertex, one edge changes each of the n coordinates, giving n incident edges. +2. Each coordinate has two endpoint choices, so there are 2^n vertices. +3. Multiplying n by 2^n counts each edge at both endpoints. Divide by two to correct the double count. +4. The result is n2^(n − 1), giving 32 edges when n = 4. ## Real world -### Dalí's cross -In 1954 Salvador Dalí painted a tesseract unfolded into a cross of 8 cubes in "Corpus Hypercubus". The same trick folds 6 squares in a cross into a cube. +### Four binary choices -### A name from 1888 -Charles Howard Hinton coined the word tesseract in 1888, and the shape has been drawn as a cube inside a cube ever since. +Four on/off settings give 16 states. Represent each state by a tesseract vertex and connect states differing in exactly one setting. Its edges then describe allowed one-switch changes. -### Shadows on a wall -A cube's shadow on a wall can be 2 squares joined at the corners. A tesseract's shadow in space is 2 cubes joined at the corners. A lower-dimensional picture is always a shadow of a higher one. +### Reading projections -### Unfolding -You can cut a cube open into 6 flat squares. A tesseract opens into 8 cubes. See the lesson on nets of solids for the cube's version. +An engineering drawing represents a three-dimensional object on a flat page. A tesseract picture extends that idea mathematically: it is useful for connectivity, while the projection alone does not preserve all lengths or angles. From e8494c51e6d3389bf090377e18284da7875e0082 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:19:12 +0300 Subject: [PATCH 046/124] content: rewrite what-is-a-dimension for first-time learners in both languages --- .../geometry/what-is-a-dimension/ar.md | 74 ++++++++----------- .../geometry/what-is-a-dimension/en.md | 74 ++++++++----------- 2 files changed, 64 insertions(+), 84 deletions(-) diff --git a/content/lessons/geometry/what-is-a-dimension/ar.md b/content/lessons/geometry/what-is-a-dimension/ar.md index b7b2db8e..2590bde6 100644 --- a/content/lessons/geometry/what-is-a-dimension/ar.md +++ b/content/lessons/geometry/what-is-a-dimension/ar.md @@ -1,77 +1,67 @@ --- title: ما هو البُعد؟ -summary: البُعد هو اتجاه تستطيع أن تتحرك فيه. عدّ الأرقام التي تلزمك لتقول أين الشيء، فتعرف كم بُعدًا له. +summary: 'عدّ الإحداثيات المستقلة اللازمة لتحديد نقطة على خط، أو في مستوى، أو في الفراغ.' parameters: - n: n — عدد الاتجاهات التي يستطيع الشيء أن يتحرك فيها (1 سكة، 2 بحر، 3 سماء) - x: x — كم ابتعد الشيء في الاتجاه الأول (شرقًا، أو كيلومترات على السكة) - y: y — كم ابتعد الشيء في الاتجاه الثاني (شمالًا). لا أثر له حين يكون n يساوي 1 - z: z — كم ارتفع الشيء إلى فوق. لا أثر له حين يكون n يساوي 1 أو 2 + n: 'n — أبعاد الموضع: مسار (1)، خريطة (2)، فراغ (3)' + x: 'x — الإحداثي في الاتجاه الأول' + y: 'y — الإحداثي الثاني؛ لا يستخدم عند n = 1' + z: 'z — الارتفاع؛ يستخدم فقط عند n = 3' variables: - - المكان الذي يقف فيه الشيء - - الرقم الأول في العنوان (كم ابتعد شرقًا) - - الرقم الثاني (كم ابتعد شمالًا) - - الرقم الثالث (الارتفاع) - - عدد الأرقام التي يحتاجها العنوان، وهو عدد الأبعاد + - 'P: النقطة التي نحدد موضعها' + - 'x₁: إحداثي الموضع الأول' + - 'x₂: إحداثي الموضع الثاني عند توفره' + - 'x₃: إحداثي الارتفاع في الأبعاد الثلاثة' + - 'n: عدد إحداثيات الموضع المستقلة' --- ## Try it -1. اجعل n يساوي 1 واسحب القطار. يتغير رقم واحد فقط. ثم اجعل n يساوي 2 واسحب السفينة، فيتغير رقمان. اجعل n يساوي 3 واسحب الطائرة، فيظهر رقم ثالث هو الارتفاع. -2. اجعل n يساوي 2 واسحب السفينة إلى (2, 8). اقرأ العنوان المكتوب بالخط الكبير وتأكد أن الرقمين صحيحان. -3. اجعل n يساوي 3. اسحب الطائرة فوق أرض الصندوق، ثم حرّك المنزلق z. الخط المتقطع يصل الطائرة بظلها على الأرض. يريك أن الارتفاع رقم مستقل عن الباقي. +1. اضبط n = 1 وx = 3.5. يتكون العنوان من إحداثي واحد. غيّر y وz؛ لن يؤثر أي منهما في موضع القطار في هذا النموذج. +2. اضبط n = 2 وx = 2 وy = 8. يصبح عنوان السفينة (2, 8). غيّر إحداثيًا واحدًا كل مرة لمعرفة الاتجاه الذي يتحكم فيه. +3. اضبط n = 3 وx = 4 وy = 4 وz = 5. غيّر z فقط. يتغير ارتفاع الطائرة، بينما يبقى إسقاط موضعها على الأرض عند (4, 4). ## Real-life examples -- **قطار على سكة.** يكفي أن يقول السائق «أنا عند الكيلومتر 37». رقم واحد يكفي، لأن القطار يسير إلى الأمام أو إلى الخلف فقط. هذا بُعد واحد. -- **سفينة في البحر.** رقم واحد لا يكفي. «12 km شرقًا» قد تعني أي نقطة على خط طويل. قل «12 km شرقًا و5 km شمالًا» فيصير للسفينة مكان واحد بالضبط. هذان بُعدان. -- **طائرة في السماء.** الشرق والشمال لا يكفيان، فقد تكون الطائرة قريبة من الأرض أو عالية فوق تلك النقطة. أضف الارتفاع، مثلًا 9 km، فتصير عندك ثلاثة أرقام. +1. **على مسار.** عند n = 1 وx = 3.5، تحدد مسافة واحدة من نقطة بداية مختارة مكان القطار على هذا المسار المستقيم. +2. **على خريطة مستوية.** عند n = 2، تضع x = 6 وy = 3 السفينة على بعد ست وحدات في الاتجاه الأول وثلاث في الثاني. +3. **فوق الخريطة.** عند n = 3، يضيف العنوان (6, 3, 9) ارتفاعًا مقداره 9 إلى الموضع الأرضي نفسه. يعطي ارتفاع آخر نقطة مختلفة في الفراغ. ## Test yourself -1. ضع السفينة عند (2, 8). أي قيمة تعطي لـ n، ولماذا؟ -2. حلّق بالطائرة على ارتفاع 5، فوق النقطة (4, 4) مباشرة. -3. اعرض شيئًا يكفيه رقم واحد، عند 7. +1. اختر وضع البعدين وضع السفينة عند (2, 8). +2. اختر وضع الأبعاد الثلاثة وضع الطائرة عند (4, 4, 5). +3. اختر وضع البعد الواحد وضع القطار عند الإحداثي 7. ## Intuition -يسير القطار على سكة من بلدة إلى بلدة. لو سألت السائق «أين أنت؟» لكفاك رقم واحد: «عند الكيلومتر 37». القطار لا يتجه يمينًا ولا يسارًا. هو يتقدم أو يرجع فقط. اتجاه واحد يعني رقمًا واحدًا، ونسمي هذا بُعدًا واحدًا. في الرسم اجعل n يساوي 1 واسحب القطار على السكة. المنزلقان y وz لا يغيّران شيئًا، لأن القطار لا يخرج عن سكته. +على مسار مستقيم، يخبرنا إحداثي واحد ببعد النقطة عن أصل نختاره. التحرك للأمام أو الخلف يغيّر الإحداثي نفسه؛ فهما وجهتان على اتجاه واحد، لا بعدان مختلفان. القطار جسم ثلاثي الأبعاد، لكننا نمثل هنا موضعه على المسار فقط. -الآن سفينة في البحر. قال القبطان «أنا على بعد 12 km شرق الميناء». لا نعرف مكانه، فقد يكون في أي نقطة على ذلك الخط. نحتاج أن يضيف «و5 km شمالًا». رقمان يعطيان مكانًا واحدًا، لأن للبحر اتجاهين: شرق وغرب، وشمال وجنوب. اجعل n يساوي 2. تظهر السفينة على الخريطة، وخطان متقطعان يصلانها بالمحورين. اسحبها وانظر كيف يتغير الرقمان. +على خريطة مستوية، لا يعود إحداثي واحد كافيًا. تشترك نقاط كثيرة في الموضع الأفقي نفسه. نضيف إحداثيًا رأسيًا على الخريطة، فيحدد الزوج نقطة واحدة. يمكن تغيير الإحداثيين باستقلال، فيكون النموذج ثنائي الأبعاد. -الطائرة تحتاج ثلاثة أرقام. الشرق والشمال يحددان النقطة التي تحتها على الأرض. ثم نضيف الارتفاع: 9 km. اجعل n يساوي 3 واسحب الطائرة فوق أرض الصندوق. الخط المتقطع يصلها بظلها. الظل نقطة على الأرض لها الشرق والشمال نفسهما، لكن بلا ارتفاع. إذن عدد الأبعاد هو عدد الأرقام التي تلزمك لتقول بالضبط أين الشيء. - -وماذا لو تواعدت مع صديق؟ تقول «عند زاوية السوق، في الطابق الثالث». هذه ثلاثة أرقام، ومع ذلك لا يعرف صديقك متى يأتي. لا بد أن تقول «الساعة الخامسة». الزمن رقم رابع. لا تستطيع أن تعود في الزمن كما تعود في الشارع، لكنه رقم زائد تحتاجه. أما نقطة لا تتحرك أبدًا، مثل النقطة في آخر الجملة، فلا تحتاج أي رقم. هذه صفر من الأبعاد. +في الفراغ نضيف الارتفاع. قد تكون طائرتان فوق موضع الخريطة نفسه لكن على ارتفاعين مختلفين، فنحتاج إلى إحداثي ثالث لتمييز موضعيهما. تصل القطعة المتقطعة الطائرة بإسقاطها على الأرض؛ هذا إسقاط هندسي، وليس تحديدًا لموضع ظلها تحت ضوء الشمس. ## Formal -النقطة $P$ في $n$ من الأبعاد تُكتب قائمة من $n$ من الأرقام، وهي إحداثياتها: $P = (x_1, x_2, \dots, x_n)$. كل رقم يقيس البعد على اتجاه واحد، والاتجاهات مستقلة: تغيير رقم لا يغيّر الباقي. +في فضاء ديكارتي ذي n أبعاد، نكتب إحداثيات النقطة $P=(x_1,x_2,\dots,x_n)$ بالنسبة إلى أصل ومحاور مستقلة نختارها. يمكن تغيير كل إحداثي دون أن يفرض ذلك تغير الآخرين. في أمثلة الخط والمستوى والفراغ، تكون n على الترتيب 1 و2 و3. -على الخط ($n = 1$) تكون النقطة $P = (x_1)$. وعلى المستوى ($n = 2$) تكون $P = (x_1, x_2)$. وفي الفضاء ($n = 3$) تكون $P = (x_1, x_2, x_3)$. أما نقطة لا اتجاه حرًّا لها فـ $n = 0$ وقائمتها فارغة. +الفضاء المكوّن من نقطة واحدة بُعده $n=0$، إذ لا توجد حرية لتغيير الموضع داخله. وبوجه عام، قد تقلل القيود عدد الأبعاد. فنقطة مقيدة بالحركة على دائرة في مستوى تحتاج إلى معامل موضع محلي واحد، حتى لو وصفناها بإحداثيين ديكارتيين. ## Advanced -عدد الأرقام المستقلة اللازمة لتحديد وضع نظام ما يسمى درجات الحرية. ذراع آلية بستة مفاصل لها ست درجات حرية، مع أنها تعمل في غرفة ثلاثية الأبعاد. ويستطيع الرياضي أن يتكلم عن فضاء فيه $n = 4$ أو $n = 11$ دون أن يرسمه، لأن قائمة الأرقام وحدها تكفي. والدروس التالية تستعمل هذه الفكرة نفسها. +درجات الحرية هي عدد المعاملات المستقلة اللازمة لوصف حالة نظام. قد تكون لآلية مثالية بست زوايا مفاصل مستقلة ستة إحداثيات للحالة، رغم وجودها في فراغ عادي ثلاثي الأبعاد. وتضيف كتابة الزمن إحداثيًا يحدد متى وقع حدث، لكنها لا تضيف اتجاهًا مكانيًا آخر يتحرك فيه الجسم. ## Derivation -1. على الخط اتجاه حر واحد، فيكفي رقم واحد لتحديد النقطة: $n = 1\text{: } P = (x_1)$. -2. على المستوى نضيف اتجاهًا ثانيًا، فنحتاج رقمين: $n = 2\text{: } P = (x_1, x_2)$. -3. في الفضاء نضيف اتجاهًا ثالثًا هو الارتفاع، فنحتاج ثلاثة أرقام: $n = 3\text{: } P = (x_1, x_2, x_3)$. +1. على خط، يحدد إحداثي واحد الموضع بالنسبة إلى أصل واتجاه. +2. في مستوى، نضيف إحداثيًا ثانيًا مستقلًا لتمييز نقاط تشترك في الأول. +3. في الفراغ، نضيف إحداثيًا ثالثًا مستقلًا لتمييز نقاط فوق الموضع المستوي نفسه أو تحته. ## Real world -### عنوان البيت - -نجد البيت برقمين: رقم الشارع ورقم الباب. هو يشبه نقطة على خريطة. - -### نظام تحديد المواقع GPS - -يجد هاتفك مكانك بخط العرض وخط الطول والارتفاع عن البحر. ثلاثة أرقام، أي ثلاثة أبعاد. - -### نقطة على الشاشة +### مواضع البكسلات -كل نقطة على الشاشة لها رقمان: رقم العمود ورقم الصف. لهذا نقول إن الشاشة صورة ثنائية الأبعاد. +نحدد بكسلًا في صورة مستطيلة برقم عموده وصفه. يصفان شبكة ثنائية الأبعاد، أما اللون فهو معلومة منفصلة عن البكسل. -### موعد +### المواضع والأحداث -الموعد يحتاج مكانًا ووقتًا. المكان رقمان أو ثلاثة، والوقت رقم زائد، فيصير الموعد نقطة بأربعة أرقام. +تحتاج نقطة في غرفة إلى ثلاثة إحداثيات مكانية في هذا النموذج. ولتحديد حدث يقع فيها، نضيف الزمن. يجيب وصف الموضع ووصف الحدث عن سؤالين مختلفين. diff --git a/content/lessons/geometry/what-is-a-dimension/en.md b/content/lessons/geometry/what-is-a-dimension/en.md index 56d40ff7..5c16f5c1 100644 --- a/content/lessons/geometry/what-is-a-dimension/en.md +++ b/content/lessons/geometry/what-is-a-dimension/en.md @@ -1,77 +1,67 @@ --- title: What is a dimension? -summary: A dimension is one direction you can move in. Count how many numbers it takes to say where something is, and you have counted its dimensions. +summary: 'Count the independent coordinates needed to locate a point on a line, on a plane or in space.' parameters: - n: n — how many directions the thing can move in (1 is a track, 2 is a sea, 3 is the sky) - x: x — how far along the first direction (east, or kilometres along the track) - y: y — how far along the second direction (north); it does nothing when n is 1 - z: z — how high up; it does nothing when n is 1 or 2 + n: 'n — positional dimensions: track (1), map (2), space (3)' + x: 'x — coordinate along the first direction' + y: 'y — second coordinate; ignored when n = 1' + z: 'z — height; used only when n = 3' variables: - - the place where the thing is - - the first number of the address (how far east) - - the second number (how far north) - - the third number (how high) - - how many numbers the address needs, which is the number of dimensions + - 'P: point being located' + - 'x₁: first position coordinate' + - 'x₂: second position coordinate when available' + - 'x₃: height coordinate in three dimensions' + - 'n: number of independent positional coordinates' --- ## Try it -1. Set n to 1 and drag the train. Only one number changes. Then set n to 2 and drag the ship: now there are two. Set n to 3 and the plane needs a third number, the height. -2. Set n to 2 and drag the ship to (2, 8). Read the address in big letters and check the two numbers. -3. Set n to 3. Drag the plane across the floor, then move the z slider. The dashed line is the plane's shadow point, and it shows that the height is a separate number. +1. Set n = 1 and x = 3.5. The address has one coordinate. Change y and z: neither affects the train's position in this model. +2. Set n = 2, x = 2 and y = 8. The ship's address is (2, 8). Change one coordinate at a time to see which direction it controls. +3. Set n = 3, x = 4, y = 4 and z = 5. Change only z. The plane moves in height while its projected position on the floor stays (4, 4). ## Real-life examples -- **A train on a track.** The driver only needs to say "kilometre 37". One number is enough, because the train can only go forwards or backwards. That is one dimension. -- **A ship at sea.** One number is not enough: "12 km east" could be anywhere along a whole line. Say "12 km east and 5 km north" and the ship has one exact place. That is two dimensions. -- **A plane in the sky.** East and north are not enough, because the plane could be low or high above that spot. Add the height, say 9 km, and you have three numbers. +1. **Along a track.** At n = 1 and x = 3.5, one distance from the chosen starting point locates the train on this straight track. +2. **On a flat map.** At n = 2, x = 6 and y = 3 locate the ship six units in the first direction and three in the second. +3. **Above the map.** At n = 3, the address (6, 3, 9) adds a height of 9 to the same ground position. Another height would give a different point in space. ## Test yourself -1. Put the ship at (2, 8). What do you set n to, and why? -2. Fly the plane at height 5, straight above the point (4, 4). -3. Show something that needs only one number, at 7. +1. Choose the two-dimensional mode and place the ship at (2, 8). +2. Choose the three-dimensional mode and place the plane at (4, 4, 5). +3. Choose the one-dimensional mode and place the train at coordinate 7. ## Intuition -A train runs on a track from one town to the next. If you ask the driver "where are you?", one number is enough: "kilometre 37". The train cannot go left or right, only forwards or backwards. One free direction means one number, and we call that one dimension. In the picture, set n to 1 and drag the train along the track. The y and z sliders do nothing, because a train cannot leave its track. +On a straight track, one coordinate tells us how far a point lies from a chosen origin. Moving forward or backward changes that same coordinate; those are two senses along one direction, not two dimensions. The train is a three-dimensional object, but we are modelling only its position along the track. -Now take a ship at sea. "I am 12 km east of the harbour" is not enough, because the ship could be anywhere along that line. You also need "and 5 km north". Two numbers give one exact place, since the sea has two free directions: east-west and north-south. Set n to 2. A ship has a place on the map, and dashed lines run from it to the two axes. Drag the ship and watch both numbers change. +On a flat map, one coordinate is no longer enough. Many points share the same horizontal position. Add a vertical map coordinate and the pair identifies one point. The two coordinates can vary independently, giving a two-dimensional model. -A plane needs three numbers. East and north tell you which spot of the ground it is above. Then you add the height: 9 km. Set n to 3 and drag the plane over the floor of the box. The dashed line to the floor is its shadow point, which has the same east and north but no height. So the number of dimensions is the number of numbers you need to say exactly where something is. - -What about meeting a friend? "At the corner of the market, on the third floor" is three numbers, and your friend still does not know when to come. You must also say "at 5 o'clock". Time is a fourth number. You cannot walk back and forth in time as you can in a street, but it is still one more number you need. And a dot with no room to move at all, like a full stop on a page, needs no numbers. That is zero dimensions. +In space, add height. Two aircraft could be above the same map position at different heights, so we need a third coordinate to distinguish their locations. The dashed segment in the diagram connects the plane to its projection on the floor; this is a geometric projection, not a claim about where sunlight casts its shadow. ## Formal -A point $P$ in $n$ dimensions is written as a list of $n$ numbers, its coordinates: $P = (x_1, x_2, \dots, x_n)$. Each number measures the distance along one direction, and the directions are independent: changing one does not change any other. +In n-dimensional Cartesian space, a point has coordinates $P=(x_1,x_2,\dots,x_n)$ relative to a chosen origin and independent axes. Each coordinate can vary without forcing a change in the others. For the line, plane and space examples, n is respectively 1, 2 and 3. -On a line ($n = 1$) the point is $P = (x_1)$. On a plane ($n = 2$) it is $P = (x_1, x_2)$. In space ($n = 3$) it is $P = (x_1, x_2, x_3)$. A single point with no free direction has $n = 0$ and an empty list. +A space consisting of a single point has dimension $n=0$: there is no positional freedom within it. More generally, constraints can reduce dimension. A point constrained to a circle in a plane needs one local position parameter even though we may describe it using two Cartesian coordinates. ## Advanced -The number of independent numbers needed to fix a position is called the degrees of freedom of a system. A robot arm with six joints has six, even though it works in a 3D room. A mathematician can also ask for a space with $n = 4$ or $n = 11$ without drawing it, because the list of numbers is all that is needed. The next lessons use exactly that idea. +Degrees of freedom count independent parameters needed to describe a configuration. An ideal mechanism with six independently variable joint angles can have six configuration coordinates while occupying ordinary three-dimensional space. Recording time adds a coordinate for when an event occurs; it does not create another spatial direction in which the object can move. ## Derivation -1. On a line there is one free direction, so one number fixes the point: $n = 1\text{: } P = (x_1)$. -2. On a plane we add a second direction, so two numbers are needed: $n = 2\text{: } P = (x_1, x_2)$. -3. In space we add a third direction, the height, so three numbers are needed: $n = 3\text{: } P = (x_1, x_2, x_3)$. +1. On a line, one coordinate specifies the position relative to an origin and direction. +2. On a plane, add a second independent coordinate to distinguish points sharing the first. +3. In space, add a third independent coordinate to distinguish points above or below the same planar position. ## Real world -### A street address - -A house is found with two numbers: the street and the number on the door. It works like a point on a map. - -### GPS - -Your phone finds you with latitude, longitude and height above the sea. Three numbers, so three dimensions. - -### A pixel on a screen +### Pixel locations -Every dot on a screen is named by two numbers: its column and its row. That is why a screen is a two-dimensional picture. +A pixel in a rectangular image is indexed by its column and row. These describe a two-dimensional grid; colour is separate information about the pixel. -### An appointment +### Places and events -A meeting needs a place and a time. The place is two or three numbers and the time is one more, so the whole appointment is a point with four numbers. +A point in a room needs three spatial coordinates in this model. To specify an event at that point, also give a time. The spatial position and event description answer different questions. From cd4966ac536721c50b1ae5f2c15c6b4c08443fe4 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:19:12 +0300 Subject: [PATCH 047/124] docs: record completed bilingual Geometry review --- content/lessons/EDITORIAL_REVIEW.md | 18 +++++++++--------- content/lessons/STYLE.en.md | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/content/lessons/EDITORIAL_REVIEW.md b/content/lessons/EDITORIAL_REVIEW.md index 38e242a0..053f205a 100644 --- a/content/lessons/EDITORIAL_REVIEW.md +++ b/content/lessons/EDITORIAL_REVIEW.md @@ -1,6 +1,6 @@ # Bilingual editorial review -61 of 390 lessons reviewed. 329 remain. +68 of 390 lessons reviewed. 322 remain. A checked lesson has had both language files rewritten or reviewed against its configuration and visualization source. Automated validation alone does not mark a lesson reviewed. Browser interaction and independent learner review remain separate checks. @@ -293,27 +293,27 @@ Scope: every lesson, including summaries, parameter labels, examples, exercises, - [x] [slope](functions/slope/en.md) · [Arabic](functions/slope/ar.md) - [x] [transformations-of-graphs](functions/transformations-of-graphs/en.md) · [Arabic](functions/transformations-of-graphs/ar.md) -## geometry (12/19) +## geometry (19/19) - [x] [angles-and-parallel-lines](geometry/angles-and-parallel-lines/en.md) · [Arabic](geometry/angles-and-parallel-lines/ar.md) - [x] [area-and-perimeter](geometry/area-and-perimeter/en.md) · [Arabic](geometry/area-and-perimeter/ar.md) -- [ ] [building-dimensions](geometry/building-dimensions/en.md) · [Arabic](geometry/building-dimensions/ar.md) +- [x] [building-dimensions](geometry/building-dimensions/en.md) · [Arabic](geometry/building-dimensions/ar.md) - [x] [circle](geometry/circle/en.md) · [Arabic](geometry/circle/ar.md) - [x] [circle-theorems](geometry/circle-theorems/en.md) · [Arabic](geometry/circle-theorems/ar.md) - [x] [congruence-and-similarity](geometry/congruence-and-similarity/en.md) · [Arabic](geometry/congruence-and-similarity/ar.md) - [x] [coordinate-geometry](geometry/coordinate-geometry/en.md) · [Arabic](geometry/coordinate-geometry/ar.md) -- [ ] [distance-in-any-dimension](geometry/distance-in-any-dimension/en.md) · [Arabic](geometry/distance-in-any-dimension/ar.md) -- [ ] [eleven-dimensions](geometry/eleven-dimensions/en.md) · [Arabic](geometry/eleven-dimensions/ar.md) -- [ ] [higher-dimensions](geometry/higher-dimensions/en.md) · [Arabic](geometry/higher-dimensions/ar.md) +- [x] [distance-in-any-dimension](geometry/distance-in-any-dimension/en.md) · [Arabic](geometry/distance-in-any-dimension/ar.md) +- [x] [eleven-dimensions](geometry/eleven-dimensions/en.md) · [Arabic](geometry/eleven-dimensions/ar.md) +- [x] [higher-dimensions](geometry/higher-dimensions/en.md) · [Arabic](geometry/higher-dimensions/ar.md) - [x] [nets-and-solids](geometry/nets-and-solids/en.md) · [Arabic](geometry/nets-and-solids/ar.md) - [x] [polygons-and-tessellation](geometry/polygons-and-tessellation/en.md) · [Arabic](geometry/polygons-and-tessellation/ar.md) - [x] [pythagorean-theorem](geometry/pythagorean-theorem/en.md) · [Arabic](geometry/pythagorean-theorem/ar.md) -- [ ] [slicing-higher-dimensions](geometry/slicing-higher-dimensions/en.md) · [Arabic](geometry/slicing-higher-dimensions/ar.md) +- [x] [slicing-higher-dimensions](geometry/slicing-higher-dimensions/en.md) · [Arabic](geometry/slicing-higher-dimensions/ar.md) - [x] [surface-area-and-volume](geometry/surface-area-and-volume/en.md) · [Arabic](geometry/surface-area-and-volume/ar.md) -- [ ] [tesseract](geometry/tesseract/en.md) · [Arabic](geometry/tesseract/ar.md) +- [x] [tesseract](geometry/tesseract/en.md) · [Arabic](geometry/tesseract/ar.md) - [x] [transformations-and-symmetry](geometry/transformations-and-symmetry/en.md) · [Arabic](geometry/transformations-and-symmetry/ar.md) - [x] [triangle-angles-and-sides](geometry/triangle-angles-and-sides/en.md) · [Arabic](geometry/triangle-angles-and-sides/ar.md) -- [ ] [what-is-a-dimension](geometry/what-is-a-dimension/en.md) · [Arabic](geometry/what-is-a-dimension/ar.md) +- [x] [what-is-a-dimension](geometry/what-is-a-dimension/en.md) · [Arabic](geometry/what-is-a-dimension/ar.md) ## networking (0/15) diff --git a/content/lessons/STYLE.en.md b/content/lessons/STYLE.en.md index 020ce3ac..1c35f5f4 100644 --- a/content/lessons/STYLE.en.md +++ b/content/lessons/STYLE.en.md @@ -37,6 +37,6 @@ Run `pnpm check` after editing. It validates structure, formulas and challenge s ## Reviewed examples and remaining work -See [the lesson-by-lesson review checklist](EDITORIAL_REVIEW.md) for coverage. The Numbers, Functions, Algebra and Discrete sections and the derivative lesson have received a complete bilingual editorial pass under this guide. +See [the lesson-by-lesson review checklist](EDITORIAL_REVIEW.md) for coverage. The Numbers, Functions, Algebra, Discrete and Geometry sections and the derivative lesson have received a complete bilingual editorial pass under this guide. The remaining lessons still need individual review of their summaries, controls, explanations, examples and challenges. Do not treat a global phrase replacement or a successful build as an editorial review. From a614b95f1b876ac0785e77fbff54ea651bbbc224 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:34:17 +0300 Subject: [PATCH 048/124] content: rewrite angles-of-elevation-and-depression for first-time learners in both languages --- .../angles-of-elevation-and-depression/ar.md | 59 +++++++++--------- .../angles-of-elevation-and-depression/en.md | 60 +++++++++---------- .../lesson.yaml | 48 +++++++-------- 3 files changed, 78 insertions(+), 89 deletions(-) diff --git a/content/lessons/trigonometry/angles-of-elevation-and-depression/ar.md b/content/lessons/trigonometry/angles-of-elevation-and-depression/ar.md index 42605515..735b749c 100644 --- a/content/lessons/trigonometry/angles-of-elevation-and-depression/ar.md +++ b/content/lessons/trigonometry/angles-of-elevation-and-depression/ar.md @@ -1,66 +1,61 @@ --- title: زاوية الارتفاع وزاوية الانخفاض -summary: >- - انظر إلى سطح مبنى من الأسفل. الزاوية فوق أفق نظرك تحوّل المسافة إلى ارتفاع. +summary: 'استخدم زاوية النظر والمسافة الأفقية لحساب فرق الارتفاع بين نقطتين.' parameters: - a: الارتفاع a - b: المسافة b + a: 'a — فرق الارتفاع بالمتر' + b: 'b — المسافة الأفقية بالمتر' variables: - - فرق الارتفاع بين الراصد والجسم - - المسافة الأفقية الفاصلة بينهما - - الزاوية θ فوق الأفق (ارتفاع) أو تحته (انخفاض) + - 'a: فرق الارتفاع بين الراصد والهدف' + - 'b: المسافة الأفقية بينهما' + - 'θ: الزاوية الحادة بين الأفق وخط النظر' --- ## Try it -1. اسحب طرف الضلع «الارتفاع a» إلى الأعلى والأسفل، وراقب θ تدور معه، وهذه زاوية الارتفاع من الأرض إلى الأعلى. -2. الآن اسحب طرف الضلع «المسافة b» بدلًا منه، مقرّبًا الراصد من القاعدة أو مبعدًا إياه عنها. -3. اضبط a وb حتى تقترب θ من 3°، وهي الزاوية اللطيفة التي تنزل بها معظم الطائرات نحو المدرج. +1. اضبط a = 30 م وb = 40 م. تبلغ الزاوية المقابلة للضلع a نحو 36.87°. يمثل a فرق ارتفاع ويمثل b مسافة أفقية، رغم أن المثلث مدوّر في الرسم ويظهر a أفقيًا على الشاشة. +2. أبقِ a = 30 وارفع b إلى 80. تنخفض الزاوية إلى نحو 20.56°؛ ففرق الارتفاع نفسه يبدو بزاوية أصغر من مسافة أبعد. +3. اضبط a = 52 وb = 1000. اقرأ زاوية تقارب 2.98°. اعتمد على المنزلقات والقيم العددية؛ فالرسم يغيّر مقياسه ليلائم المساحة المتاحة. ## Real-life examples -1. **قياس ارتفاع مبنى من الشارع.** بالوقوف على بعد 40 م من قاعدته، تعطي زاوية ارتفاع قدرها 36.9° إلى سطحه مبنى ارتفاعه نحو 30 م، دون تسلّق. -2. **مسار هبوط طائرة.** أثناء النزول على مسار الهبوط المعتاد، تفقد الطائرة نحو 52 م ارتفاعًا مقابل كل 1000 م تقطعها أفقيًا، أي زاوية انخفاض قريبة من 3°. -3. **مسح برج من مسافة.** بالوقوف على بعد 150 م من قاعدته، تخبر زاوية ارتفاع قدرها 33.7° إلى قمته المساح أن البرج يرتفع نحو 100 م. +1. **سطح أعلى من مستوى العين.** فرق ارتفاع 30 م ومسافة أفقية 40 م يعطيان زاوية نحو 36.87°. إذا كانت العين أعلى من أرض المبنى بمقدار 1.6 م، كان ارتفاع السطح عن تلك الأرض 31.6 م. +2. **زاوية نظر صغيرة.** ارتفاع 52 م مقابل 1000 م أفقيًا يعطي زاوية نحو 2.98°. هذا مثال هندسي، وليس تعليمات للطيران. +3. **قمة برج بعيد.** فرق ارتفاع 100 م ومسافة أفقية 150 م يعطيان زاوية نحو 33.69°. تقاس المئة متر هنا من مستوى عين الراصد. ## Test yourself -1. اضبط الزاوية عند نحو 3°، مسار الهبوط المعتاد للطائرات. -2. اجعل الزاوية أشد انحدارًا من 45°، بحيث يصبح الارتفاع أكبر من المسافة. -3. أبقِ الارتفاع فوق 80 م مع تسطيح الزاوية إلى أقل من 20°. +1. اجعل الزاوية قريبة من 3°، بفارق لا يتجاوز 0.3°. +2. اجعل الزاوية أكبر من 45°. +3. أبقِ a أكبر من 80 م، واجعل الزاوية أقل من 20°. ## Intuition -قف على بعد 40 م من مبنى وانظر إلى أعلى. تتبع عينك خطًا من مستوى الأرض صعودًا حتى سطح المبنى، والزاوية التي يصنعها ذلك الخط مع الأفق المستوي أمامك هي زاوية الارتفاع. اسحب طرف الضلع a وراقب θ تنفتح، فمبنى أطول على المسافة نفسها يعني دائمًا نظرة أكثر انحدارًا إلى الأعلى. +انظر إلى سطح مبنى، وتخيّل خطًا أفقيًا يمر بعينيك. الزاوية بين هذا الخط وخط نظرك الصاعد هي زاوية الارتفاع. الضلع الرأسي في المثلث هو الفرق بين ارتفاع السطح ومستوى عينيك، وليس بالضرورة ارتفاع المبنى كاملًا. إذا كان الفرق 30 م والمسافة الأفقية 40 م، كانت النسبة 30/40 = 0.75. -أما زاوية الانخفاض فهي الفكرة نفسها مقلوبة. طيار ينظر إلى أسفل نحو مدرج، أو منقذ ينظر من برج المراقبة إلى سبّاح، وكل منهما يقيس الزاوية تحت خط نظره الأفقي بدلًا من فوقه. ولأن الأرض وخط نظر الراصد خطان أفقيان متوازيان، فإن زاوية الارتفاع المرئية من الأسفل تساوي دائمًا زاوية الانخفاض المرئية من الأعلى، وكلتاهما الزاوية نفسها، تُقاس فقط من طرفي الخط نفسه. +تخيّل الآن أنك تنظر من السطح إلى موضعك السابق. تقيس الزاوية إلى أسفل من خط أفقي يمر بالنقطة العليا؛ وهذه زاوية الانخفاض. في نموذج الأرض المستوية، يتوازى الخطان الأفقيان، فتتساوى زاويتا الارتفاع والانخفاض بين النقطتين نفسيهما. تدوير المثلث على الصفحة لا يغيّر أطواله ولا زواياه. ## Formal -زاوية الارتفاع هي الزاوية $\theta$ بين الأفق وخط نظر يصعد نحو جسم أعلى منك، وزاوية الانخفاض الزاوية نفسها من نوعها لكنها تقاس نازلة نحو جسم أسفل منك. +لفرق ارتفاع موجب a ومسافة أفقية موجبة b، لدينا $\tan\theta=a/b$ و$\theta=\arctan(a/b)$. الزاوية الحادة المعروضة تقابل الضلع a. نستخدم وحدة طول واحدة للضلعين، وتظهر الزاوية بالدرجات. -وبمجرد رسمها مثلثًا قائمًا ضلعاه فرق الارتفاع $a$ والمسافة الأفقية $b$، تصبح $\theta$ زاوية عادية في مثلث قائم: $\tan\theta = a/b$. +إذا عرفنا b وθ حسبنا $a=b\tan\theta$. ولحساب ارتفاع الجسم عن مستوى أرض مشترك نضيف ارتفاع عين الراصد. المسافة المائلة هي الوتر، ولا يجوز وضعها مكان b في هذه الصيغة. ## Advanced -عمليًا يمثّل $a$ الفرق بين ارتفاع الجسم ومستوى عين الراصد نفسه، لا ارتفاع الجسم كاملًا عن الأرض، وهذا تفصيل تتجاهله المسائل المبسطة غالبًا، لكنه يهم متى لم يكن الراصد واقفًا على الأرض، كأن يرصد من نافذة طابق علوي. +يفترض تساوي زاويتي الارتفاع والانخفاض أن الأفقيين المحليين متوازيان. يهمل هذا النموذج المستوي انحناء الأرض والانكسار على المسافات الطويلة. وعند ثبات الزاوية المقيسة، تؤدي مضاعفة b إلى مضاعفة a؛ لذلك تؤثر أخطاء المسافة أو الزاوية في الارتفاع المحسوب. ## Derivation -1. خط نظر الراصد الأفقي والأرض المستوية خطان أفقيان متوازيان. -2. خط النظر الفعلي، الممتد بين الراصد والجسم، يقطع كليهما قاطعًا، فتتساوى زاوية الارتفاع المقاسة من الأرض مع زاوية الانخفاض المقاسة من الجسم، بحكم الزوايا المتبادلة. -3. بمجرد رسم المثلث القائم بضلعيه $a$ و$b$، تتبع $\theta$ نسبة المثلث القائم المعتادة: $\tan\theta = a/b$. +1. نرسم خطًا أفقيًا مرجعيًا عند كل طرف من طرفي خط النظر. يتوازى الخطان في النموذج المستوي. +2. يقطع خط النظر المستقيمين المتوازيين، فتتساوى الزاويتان المتبادلتان داخليًا: زاوية الارتفاع عند طرف وزاوية الانخفاض عند الآخر. +3. في المثلث القائم نقسم الضلع المقابل a على المجاور b فنحصل على ظل الزاوية. ## Real world -### الطيران -تراقب أجهزة التحكم الجوي وأدوات الطائرة نفسها زاوية انخفاض الطائرة أثناء الهبوط، مبقيةً إياها قريبة من مسار الهبوط المعتاد 3° حتى لمس المدرج. +### قياس نقطة يصعب الوصول إليها -### الإنقاذ البحري -يقدّر المراقب فوق سفينة كبيرة أو منارة مسافة سبّاح أو قارب من زاوية الانخفاض نحوه، مع معرفة ارتفاع نقطة المراقبة نفسها. +تعطينا زاوية ارتفاع مقيسة ومسافة أفقية ارتفاع السطح فوق أداة القياس. نضيف ارتفاع الأداة لنحسب الارتفاع عن الأرض. -### الهندسة المعمارية والبناء -قبل ترميم مبنى، يقيس المهندسون ارتفاعه الحالي من الأرض بهذه الزاوية نفسها، دون حاجة لإرسال أحد إلى السطح. +### النظر من منصة مرتفعة -### تركيب الألواح الشمسية -يميل الفنيون الألواح الشمسية لتطابق زاوية ارتفاع الشمس عند ظهيرة الموقع، لأن اللوح المواجه للشمس مباشرة يلتقط ضوءًا أكثر بكثير من لوح مسطح. +إذا عرفنا ارتفاع المنصة فوق الهدف وزاوية الانخفاض إليه، حسبنا المسافة الأفقية من $b=a/\tan\theta$. diff --git a/content/lessons/trigonometry/angles-of-elevation-and-depression/en.md b/content/lessons/trigonometry/angles-of-elevation-and-depression/en.md index 8f7de51c..ac92a165 100644 --- a/content/lessons/trigonometry/angles-of-elevation-and-depression/en.md +++ b/content/lessons/trigonometry/angles-of-elevation-and-depression/en.md @@ -1,67 +1,61 @@ --- title: Angles of elevation and depression -summary: >- - Look up at a rooftop or down from a plane's cockpit, and the angle above or - below your own eye-level horizon turns a height and a distance into each other. +summary: 'Use a viewing angle and a horizontal distance to calculate the height difference between two points.' parameters: - a: height a - b: distance b + a: 'a — height difference (m)' + b: 'b — horizontal distance (m)' variables: - - the height difference between observer and object - - the horizontal distance separating them - - the angle θ above (elevation) or below (depression) the horizontal + - 'a: vertical difference between observer and target' + - 'b: horizontal separation' + - 'θ: acute angle between horizontal and line of sight' --- ## Try it -1. Drag the far vertex of leg «height a» up and down, and watch θ swing with it — this is the angle of elevation looking up from the ground. -2. Now drag the vertex on leg «distance b» instead, moving the observer closer to or farther from the base. -3. Set a and b so θ reads close to 3° — the shallow angle almost every airliner flies down to a runway. +1. Set a = 30 m and b = 40 m. The angle opposite a is about 36.87°. Here a represents a height difference and b a horizontal distance, although the drawing rotates the triangle and places a horizontally on screen. +2. Keep a = 30 and increase b to 80. The angle falls to about 20.56°: the same height difference looks smaller from farther away. +3. Set a = 52 and b = 1000. Read an angle of about 2.98°. Use the controls and numerical values; the diagram rescales to fit. ## Real-life examples -1. **Measuring a building from the street.** Standing 40 m from its base, a 36.9° angle of elevation to the roofline gives a building about 30 m tall, no climbing required. -2. **An aircraft's landing approach.** Descending on the standard glide slope, a plane drops about 52 m for every 1000 m it covers — an angle of depression close to 3°. -3. **Surveying a tower from a distance.** Standing 150 m from its base, a 33.7° angle of elevation to the top tells a surveyor the tower is about 100 m tall. +1. **A roof above eye level.** A height difference of 30 m over a horizontal distance of 40 m gives about 36.87°. If the observer's eyes are 1.6 m above the building's ground level, the roof is 31.6 m above that level. +2. **A shallow line of sight.** A rise of 52 m over 1000 m horizontally gives about 2.98°. This is a geometric example, not a flight instruction. +3. **A distant tower top.** A difference of 100 m over 150 m horizontally gives about 33.69°. The 100 m is measured from the observer's eye level. ## Test yourself -1. Set the angle to about 3°, the standard aircraft glide slope. -2. Make the angle steeper than 45° — now the height is bigger than the distance. -3. Keep the height above 80 m while flattening the angle under 20°. +1. Make the angle approximately 3°, within 0.3°. +2. Make the angle greater than 45°. +3. Keep a greater than 80 m while making the angle less than 20°. ## Intuition -Stand 40 m from a building and look up: your eyes trace a line from level ground straight up to the roofline, and the angle that line makes with the flat horizontal in front of you is the angle of elevation. Drag the far vertex of leg a and watch θ swing open — a taller building at the same distance always means looking up at a steeper angle. +Look toward a roof and imagine a horizontal line through your eyes. The angle between that line and your upward line of sight is the angle of elevation. The triangle's vertical side is the difference between the roof and your eyes, not automatically the building's full height. With a difference of 30 m and a horizontal distance of 40 m, the ratio is 30/40 = 0.75. -Depression is the same idea turned upside down: a pilot looking down at a runway, or a lifeguard looking down at a swimmer from a tower, measures the angle below their own horizontal line of sight instead of above it. Because the ground and the observer's sightline are parallel horizontal lines, the angle of elevation seen from below and the angle of depression seen from above are always the same angle, just measured from opposite ends of the same line. +Now imagine looking back from the roof. Measure downward from a horizontal line through that higher point: this is the angle of depression. In a flat-ground model, the two horizontal reference lines are parallel, so the elevation and depression angles between the same two points are equal. Rotating the triangle on the page changes neither the lengths nor the angle. ## Formal -The angle of elevation is the angle $\theta$ between the horizontal and a line of sight rising to an object above; the angle of depression is the same kind of angle measured downward to an object below. +For positive height difference a and horizontal distance b, $\tan\theta=a/b$ and $\theta=\arctan(a/b)$. The displayed acute angle is opposite side a. Use consistent length units; the angle readout is in degrees. -Once drawn as a right triangle with the height difference $a$ and horizontal distance $b$ as the two legs, $\theta$ is an ordinary right-triangle angle: $\tan\theta = a/b$. +If b and θ are known, $a=b\tan\theta$. To find an object's height above a shared ground level, add the observer's eye height. A sloping distance is the hypotenuse and cannot replace b in this formula. ## Advanced -In practice $a$ is the difference between the object's height and the observer's own eye level, not the object's full height above the ground — a detail simple textbook problems often round away, but one that matters whenever the observer is not standing at ground level, such as sighting from an upper-floor window. +Equality of elevation and depression angles assumes parallel local horizontals. This flat model omits curvature and refraction over long distances. For the same measured angle, doubling b doubles a; errors in distance or angle therefore affect the inferred height. ## Derivation -1. The observer's horizontal line of sight and the flat ground are two parallel horizontal lines. -2. The actual line of sight, running between observer and object, cuts across both as a transversal, so the angle of elevation measured from the ground equals the angle of depression measured from the object, by alternate angles. -3. Once the right triangle is drawn with legs $a$ and $b$, $\theta$ follows the ordinary right-triangle ratio: $\tan\theta = a/b$. +1. Draw a horizontal reference line through each endpoint of the line of sight. In the flat model these lines are parallel. +2. The line of sight crosses both parallels, giving equal alternate interior angles: elevation at one endpoint and depression at the other. +3. In the right triangle, divide the opposite side a by the adjacent side b to obtain the tangent of the angle. ## Real world -### Aviation -Air traffic control and onboard instruments both track a landing aircraft's angle of depression, keeping it close to the standard 3° glide slope all the way to touchdown. +### Measuring an inaccessible point -### Search and rescue at sea -A lookout on a tall ship or lighthouse estimates a swimmer's or boat's distance from the angle of depression down to it, combined with the lookout's known height. +A measured elevation angle and horizontal distance can give a roof's height above the measuring instrument. Add the instrument's height to refer the result to ground level. -### Architecture and construction -Before renovating a building, architects measure its existing height from the ground using exactly this angle, without needing to send anyone onto the roof. +### Looking down from a platform -### Solar panel installation -Installers tilt solar panels to match the sun's angle of elevation at local noon, since a panel facing the sun squarely captures far more light than a flat one. +If a platform's height above a target is known, its depression angle gives the horizontal distance through $b=a/\tan\theta$. diff --git a/content/lessons/trigonometry/angles-of-elevation-and-depression/lesson.yaml b/content/lessons/trigonometry/angles-of-elevation-and-depression/lesson.yaml index 969b3c39..a06fa97c 100644 --- a/content/lessons/trigonometry/angles-of-elevation-and-depression/lesson.yaml +++ b/content/lessons/trigonometry/angles-of-elevation-and-depression/lesson.yaml @@ -3,15 +3,15 @@ subject: trigonometry difficulty: high-school equation: \tan\theta = \dfrac{a}{b} concepts: -- angle of elevation -- angle of depression -- alternate angles -- right triangle + - angle of elevation + - angle of depression + - alternate angles + - right triangle prerequisites: -- solving-right-triangles + - solving-right-triangles related: -- sine-rule -- cosine-rule + - sine-rule + - cosine-rule visualization: type: right-triangle options: {} @@ -29,25 +29,25 @@ parameters: value: 40 unit: m variables: -- a -- b -- \theta + - a + - b + - \theta derivation: -- \text{the observer's horizontal sightline and the ground are parallel lines} -- \text{the line of sight is a transversal, so the angle of elevation equals the angle of depression measured from the other end} -- \tan\theta = \dfrac{a}{b} + - \text{horizontal reference lines through the two endpoints are parallel in the flat model} + - \text{the line of sight is a transversal, so alternate interior angles give equal elevation and depression angles} + - \tan\theta = \dfrac{a}{b} charts: [] primary: a presets: -- a: 30 - b: 40 -- a: 52 - b: 1000 -- a: 100 - b: 150 + - a: 30 + b: 40 + - a: 52 + b: 1000 + - a: 100 + b: 150 challenges: -- check: 'atan2(a,b)*180/pi' - target: 3 - tol: 0.3 -- check: 'atan2(a,b)*180/pi > 45' -- check: 'a > 80 and atan2(a,b)*180/pi < 20' + - check: 'atan2(a,b)*180/pi' + target: 3 + tol: 0.3 + - check: 'atan2(a,b)*180/pi > 45' + - check: 'a > 80 and atan2(a,b)*180/pi < 20' From 9eefab3fb0abd9c0c3a2d62296ea67e18b871369 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:34:17 +0300 Subject: [PATCH 049/124] content: rewrite cosine-rule for first-time learners in both languages --- .../lessons/trigonometry/cosine-rule/ar.md | 63 +++++++++--------- .../lessons/trigonometry/cosine-rule/en.md | 64 +++++++++---------- 2 files changed, 58 insertions(+), 69 deletions(-) diff --git a/content/lessons/trigonometry/cosine-rule/ar.md b/content/lessons/trigonometry/cosine-rule/ar.md index 519e9f19..16302ef1 100644 --- a/content/lessons/trigonometry/cosine-rule/ar.md +++ b/content/lessons/trigonometry/cosine-rule/ar.md @@ -1,68 +1,63 @@ --- title: قاعدة جيب التمام -summary: >- - اعرف أضلاع المثلث الثلاثة، فتعطيك قاعدة جيب التمام أي زاوية فيه، حتى بلا زاوية قائمة. +summary: 'احسب زاوية من أطوال الأضلاع الثلاثة، أو احسب ضلعًا من ضلعين والزاوية المحصورة بينهما.' parameters: - a: الضلع a - b: الضلع b - c: الضلع c — مقابل الزاوية C + a: 'a — طول الضلع بالمتر' + b: 'b — طول الضلع بالمتر' + c: 'c — طول الضلع المقابل لـC بالمتر' variables: - - أحد أضلاع المثلث - - ضلع ثانٍ - - الضلع الثالث، المقابل للزاوية C - - الزاوية C، المقابلة للضلع c، محسوبة من الأضلاع الثلاثة + - 'a: الضلع المقابل للزاوية A' + - 'b: الضلع المقابل للزاوية B' + - 'c: الضلع المقابل للزاوية C' + - 'C: الزاوية المحصورة بين a وb' --- ## Try it -1. اضبط المنزلقات الثلاثة على 3 م و4 م و5 م. راقب قراءة الزاوية C، فهي تستقر عند 90° بالضبط. -2. الآن ادفع المنزلق c نحو 9 م مع إبقاء a وb عند 3 م و4 م. تكبر الزاوية C متجاوزة 90° بكثير، ويتمدد إطار المثلث إلى شكل عريض ومسطح. -3. تابع رفع c حتى يقترب من مجموع a وb. عندها يكاد الضلعان الأقصران لا يصلان أحدهما إلى الآخر، وبعد تلك النقطة تظهر رسالة «لا مثلث». +1. اضبط a = 3 وb = 4 وc = 5 م. تكون الزاوية C المقابلة للضلع c مساوية لـ90°. +2. ثبّت a وb وارفع c إلى 6. تكبر الزاوية إلى نحو 117.28°. ثم ارفع c إلى 6.9 لترى مثلثًا يكاد يصبح مسطحًا. +3. اضبط c = 7. بما أن a + b = c، ينكمش الشكل إلى خط، ويبيّن العرض أن الأطوال لا تكوّن مثلثًا. وكذلك لا تصلح قيم c الأكبر. ## Real-life examples -1. **التحقق من زاوية ركن بلا زاوية قائمة جاهزة.** أضلاع 3 م و4 م و5 م تعطي زاوية محسوبة تساوي 90° بالضبط، وهي حيلة الأرقام 3-4-5 نفسها التي تستخدمها نظرية فيثاغورس، لكن من اتجاه مختلف. -2. **خيمة يحملها عمودان طول كل منهما 5 م، مثبتان على بعد 8.8 م.** الزاوية بين العمودين عند القمة تخرج أوسع من 120° بكثير، قمة عريضة ومنخفضة. -3. **مسح قطعة أرض مثلثة.** أضلاع قِيست بالشريط، 5 م و7 م و9 م، تكفي المساح لحساب كل زاوية في القطعة دون تحريك منقلة واحدة. +1. **التحقق من زاوية قائمة.** تعطي الأطوال 3 و4 و5 م زاوية C = 90°، لأن 3² + 4² = 5². +2. **قضيبان متساويان.** إذا اتصل قضيبان طول كل منهما 5 م عند طرف واحد، وكانت المسافة بين طرفيهما الآخرين 8.8 م، بلغت زاوية الوصل نحو 123.28°. +3. **قطعة أرض مثلثة.** تعطي الأطوال 5 و7 و9 م زاوية C ≈ 95.74° مقابل الضلع ذي الطول 9 م. تحدد ثلاثة أطوال صالحة زوايا المثلث كلها. ## Test yourself -1. اجعل الزاوية C تساوي 90° بالضبط. -2. اجعل الزاوية C أوسع من 120° مع إبقاء الضلع a أكبر من 6 م. -3. ادفع الضلعين الأقصرين حتى يقترب مجموعهما من الضلع الأطول بفارق أقل من 1 م، دون أن ينكسر المثلث. +1. اجعل C تساوي 90°. +2. اجعل C أكبر من 120° مع إبقاء a أكبر من 6 م. +3. اختر أطوالًا يزيد فيها a + b على c بأقل من 1 م، مع بقاء المثلث صالحًا. ## Intuition -اضبط المنزلقات على 3 م و4 م و5 م وراقب قراءة الزاوية C. تقرأ 90° بالضبط، رغم أن لا شيء أخبر المثلث مباشرة بأن يكون قائم الزاوية، بل كفت الأضلاع الثلاثة وحدها لتحديد الزاوية. هذا هو وعد قاعدة جيب التمام كله. بمجرد أن تعرف الأضلاع الثلاثة، تتبع كل زاوية منها بلا حاجة إلى منقلة. +تخيّل قضيبين متصلين عند طرف واحد، يمكن فتحهما وإغلاقهما مثل مفصلة. طولاهما a وb، والمسافة بين طرفيهما الحرين c. عندما نفتح الزاوية C، تزداد c رغم ثبات طولي القضيبين. تصف قاعدة جيب التمام هذه العلاقة حتى عندما لا تكون الزاوية قائمة. -الآن اسحب c إلى ما فوق 5 م بينما يبقى a وb ثابتين. يضطر المثلث إلى الانفتاح أكثر فأكثر ليتسع لذلك الضلع الأطول بين النقطتين نفسيهما، وتكبر الزاوية C لتواكب ذلك. ادفع c بعيدًا بما يكفي فلن يصل الضلعان الأقصران أحدهما إلى الآخر إطلاقًا، فينكسر الشكل ويتحول الرسم إلى تحذير بدل المثلث. +إذا كان a = 3 وb = 4، أعطت الزاوية القائمة c = 5. تقرّب الزاوية الحادة الطرفين الحرين، وتباعد بينهما الزاوية المنفرجة. تضيف القاعدة حدًا إلى علاقة فيثاغورس ليأخذ اختلاف الزاوية عن 90° في الحسبان. ## Formal -في مثلث أضلاعه $a$ و$b$ و$c$، حيث $C$ الزاوية المقابلة للضلع $c$: $c^2 = a^2+b^2-2ab\cos C$. +لمثلث غير منعدم المساحة، أطوال أضلاعه موجبة a وb وc، وزاويته C تقابل c، لدينا $c^2=a^2+b^2-2ab\cos C$. تقع C بين الضلعين a وb. وتحقق الأطوال الصالحة $|a-b|- - Know all three sides of any triangle, even one with no right angle, and the - cosine rule hands you an angle — including the exact right angle Pythagoras predicts. +summary: 'Find an angle from three side lengths, or a side from two lengths and the angle between them.' parameters: - a: side a - b: side b - c: side c — opposite angle C + a: 'a — side length (m)' + b: 'b — side length (m)' + c: 'c — length opposite C (m)' variables: - - one side of the triangle - - a second side - - the third side, opposite the angle C - - the angle C, opposite side c, worked out from the three sides + - 'a: side opposite angle A' + - 'b: side opposite angle B' + - 'c: side opposite angle C' + - 'C: angle between sides a and b' --- ## Try it -1. Set the three sliders to 3 m, 4 m and 5 m. Look at the angle readout C: it lands exactly on 90°. -2. Now push slider c up toward 9 m while keeping a and b at 3 m and 4 m. Angle C grows well past 90°, and the triangle's outline stretches into a wide, flat shape. -3. Keep pulling c up until it nearly equals a + b. The two shorter sides almost fail to reach each other, and past that point the "no triangle" message appears. +1. Set a = 3, b = 4 and c = 5 m. The angle C, opposite c, is 90°. +2. Keep a and b fixed and increase c to 6. The angle grows to about 117.28°. Increase c to 6.9 to see a nearly flat triangle. +3. Set c = 7. Since a + b = c, the shape collapses to a line and the display reports an invalid triangle. Larger c values cannot form a triangle either. ## Real-life examples -1. **Checking a corner without a set-square.** Sides of 3 m, 4 m and 5 m give a computed angle of exactly 90° — the same 3-4-5 trick as the Pythagorean theorem, reached from a different direction. -2. **A tent held up by two 5 m poles anchored 8.8 m apart.** The angle between the poles at the top comes out well over 120°, a wide and shallow peak. -3. **Surveying a triangular plot of land.** Tape-measured sides of 5 m, 7 m and 9 m let a surveyor compute every corner angle without ever swinging a protractor. +1. **Checking a right angle.** Lengths 3, 4 and 5 m give C = 90°, since 3² + 4² = 5². +2. **Two equal rods.** Rods of 5 m joined at one endpoint, with their other endpoints 8.8 m apart, form an angle of about 123.28° at the joint. +3. **A triangular plot.** Lengths 5, 7 and 9 m give C ≈ 95.74° opposite the 9 m side. Three valid side lengths determine all the angles. ## Test yourself -1. Make angle C exactly 90°. -2. Make angle C wider than 120° while keeping side a above 6 m. -3. Push the two shorter sides so their combined length comes within 1 m of the longest side, without breaking the triangle. +1. Make C equal 90°. +2. Make C greater than 120° while keeping a greater than 6 m. +3. Choose lengths with a + b greater than c by less than 1 m. Keep a valid triangle. ## Intuition -Set the sliders to 3 m, 4 m and 5 m and look at the angle readout C: it reads 90° exactly, even though nothing told the triangle directly to be a right triangle — three side lengths alone were enough to pin the angle down. That is the whole promise of the cosine rule: once you know all three sides, every angle follows, no protractor needed. +Two rods joined at one endpoint can open like a hinge. Their lengths are a and b; the distance between their free endpoints is c. Opening the angle C increases c while the rod lengths stay fixed. The cosine rule describes this relationship even when the angle is not a right angle. -Now drag c up past 5 m while a and b stay put. The triangle has to lean further and further open to let that longer side fit between the same two endpoints, and angle C grows to match. Push c far enough and the two shorter sides can no longer reach each other at all — the shape breaks, and the picture switches to a warning instead of a triangle. +For a = 3 and b = 4, a right angle gives c = 5. An acute angle brings the free endpoints closer together, while an obtuse angle moves them farther apart. The rule includes a correction to the Pythagorean sum, accounting for how far the angle differs from 90°. ## Formal -For a triangle with sides $a$, $b$ and $c$, where $C$ is the angle opposite side $c$: $c^2 = a^2+b^2-2ab\cos C$. +For a nondegenerate triangle with positive side lengths a, b and c, and C opposite c, $c^2=a^2+b^2-2ab\cos C$. The angle C is between sides a and b. Valid lengths satisfy $|a-b| Date: Mon, 16 Nov 2026 11:34:17 +0300 Subject: [PATCH 050/124] content: rewrite degrees-and-radians for first-time learners in both languages --- .../trigonometry/degrees-and-radians/ar.md | 55 +++++++++--------- .../trigonometry/degrees-and-radians/en.md | 56 +++++++++---------- 2 files changed, 50 insertions(+), 61 deletions(-) diff --git a/content/lessons/trigonometry/degrees-and-radians/ar.md b/content/lessons/trigonometry/degrees-and-radians/ar.md index ad7c57f2..8c430e69 100644 --- a/content/lessons/trigonometry/degrees-and-radians/ar.md +++ b/content/lessons/trigonometry/degrees-and-radians/ar.md @@ -1,64 +1,59 @@ --- title: الدرجات والراديان -summary: >- - الدرجة تقسم الدائرة 360 جزءًا بعادة قديمة. الراديان يقيس الزاوية بطول القوس. +summary: 'عبّر عن الدوران نفسه بالدرجات والراديان، واربط قياس الراديان بطول القوس.' parameters: - theta: الزاوية θ + theta: 'θ — الزاوية بالدرجات' variables: - - الزاوية بالوحدة المألوفة، حيث الدورة الكاملة 360° - - الزاوية نفسها بالراديان، أي كم طول نصف القطر يساوي طول القوس الذي مشته حول الدائرة + - 'θ°: قياس الزاوية بالدرجات، والدورة الكاملة 360°' + - 'θ بالراديان: طول القوس مقسومًا على نصف القطر' --- ## Try it -1. حرّك النقطة حول الدائرة وراقب القراءتين أسفل الرسم تتغيران معًا. -2. ادفع النقطة حتى ربع دورة. تقرأ الدرجة 90°، وتقرأ الراديان قريبًا من 1.57، أي نصف π. -3. تابع حتى تقترب قراءة الراديان من 1.00 بالضبط. هذه هي الزاوية «الطبيعية» الوحيدة. عندها يساوي طول القوس الذي مشته النقطة طول نصف القطر نفسه. +1. اضبط θ = 90°. تعرض القراءتان 90° ونحو 1.5708 راديان؛ وحدتان لقياس ربع الدورة نفسه. +2. ارجع إلى 57°. تعادل هذه الزاوية نحو 0.9948 راديان، أي قريبًا من راديان واحد. +3. اضبط θ على 180° ثم 360°. تكون القيمتان بالراديان π و2π. تكمل النقطة نصف دورة ثم دورة كاملة. ## Real-life examples -1. **تدوير مقود السيارة ربع دورة.** هذا يعادل 90°، أو π/2 ≈ 1.57 راديان. -2. **قطعة بيتزا قُطعت بحيث يساوي طول حافتها المقوّسة نصف قطر البيتزا.** لا أحد يطلب قطعة بهذا الشكل، لكن زاويتها 1 راديان بالضبط، أي نحو 57°. -3. **ريشة مروحة سقف تدور ثلاثة أرباع الدورة.** هذا يعادل 270°، أو 3π/2 ≈ 4.71 راديان. +1. **ربع دورة.** إذا دارت علامة على عجلة بزاوية 90°، فقد دارت π/2 راديان، أي نحو 1.57. +2. **قرب راديان واحد.** عند 57° يبلغ طول القوس نحو 0.9948 من نصف القطر. الراديان الواحد يساوي نحو 57.30°، لذا فهذا الإعداد تقريبي. +3. **ثلاثة أرباع دورة.** تعادل 270° زاوية 3π/2 راديان، أي نحو 4.71. ## Test yourself -1. اجعل الزاوية نصف دورة بالضبط، 180°، واقرأ قيمتها بالراديان. يجب أن تصل إلى π ≈ 3.14. -2. جد الزاوية التي تقترب قيمتها بالراديان من 1 بفارق أقل من 0.03. -3. ادفع الزاوية إلى ما بعد 90°، مع إبقاء قيمتها بالراديان أقل من 2. +1. اضبط نصف دورة بالضبط، 180°، واقرأ قيمتها بالراديان. +2. أوجد زاوية لا يختلف قياسها بالراديان عن 1 بأكثر من 0.03. +3. اختر زاوية أكبر من 90° وأقل من 2 راديان. ## Intuition -الدرجة موجودة فقط لأن الفلكيين القدماء أحبوا الرقم 360. فهو يقبل القسمة على نصفين وأثلاث وأرباع وأكثر، ويقارب عدد أيام السنة تقريبًا. لا شيء في طبيعة الدائرة نفسها يفرض 360 من أي شيء، إنها مجرد عادة قديمة مريحة، تمامًا كما تحتوي الساعة على 60 دقيقة. +تقسم الدرجات الدورة الكاملة إلى 360 جزءًا متساويًا. أما الراديان فيقيس الدوران باستخدام الدائرة نفسها: نقسم طول القوس المقطوع على نصف القطر. إذا تساوى الطولان، كانت الزاوية راديانًا واحدًا. وإذا كان القوس ضعف نصف القطر، كانت الزاوية راديانين. -الراديان مختلف تمامًا. حرّك النقطة حول حافة الدائرة وراقبها ترسم قوسًا. الراديان الواحد هو الزاوية التي يساوي طول قوسها نصف القطر بالضبط. ولأن نصف قطر هذه الدائرة يساوي 1، فإن قراءة الراديان أسفل الرسم ليست مجرد زاوية، بل هي طول المنحنى الذي مشته النقطة، بالوحدة نفسها لنصف القطر. +لا تعتمد هذه النسبة على حجم الدائرة. عند مضاعفة نصف القطر يتضاعف طول القوس للزاوية نفسها، فتبقى النسبة ثابتة. على دائرة الوحدة يكون نصف القطر 1، فتساوي القيمة العددية لطول القوس قياس الزاوية بالراديان. نستخدم طول القوس المنحني، لا طول الوتر المستقيم الذي يصل طرفيه. ## Formal -في دائرة نصف قطرها $r$، تقاس الزاوية التي يقابلها قوس طوله $s$ بالراديان عبر $\theta_{\text{rad}} = s/r$. وعلى دائرة الوحدة، حيث $r = 1$، تصبح $\theta_{\text{rad}}$ مساوية لطول القوس نفسه. +لنصف قطر $r>0$ وقوس طوله s مقيسين بوحدة الطول نفسها، يكون $\theta_{\mathrm{rad}}=s/r$. ومنه $s=r\theta_{\mathrm{rad}}$. الراديان نسبة بين طولين، وليس وحدة طول جديدة. -الدورة الكاملة تقابل قوسًا طوله $2\pi r$، وهي أيضًا $360°$، فيصف $2\pi$ راديان و$360°$ الدوران نفسه. واقسم هذه النسبة، فتحصل على التحويل لأي زاوية: $\theta_{\text{rad}} = \dfrac{\pi}{180}\,\theta^\circ$. +طول قوس الدورة الكاملة $2\pi r$، ولذلك $360^\circ=2\pi\ \mathrm{rad}$. نحول قيمة الدرجات باستخدام $\theta_{\mathrm{rad}}=(\pi/180)\theta_{\mathrm{deg}}$، ونعود إلى الدرجات بالضرب في $180/\pi$. ## Advanced -الراديان هو الوحدة التي تفترضها كل معادلة في التفاضل والتكامل بصمت: $\dfrac{d}{dx}\sin x = \cos x$ لا تصح إلا حين تكون $x$ بالراديان، لأنها الوحدة التي يكون فيها التقريب $\sin x \approx x$ دقيقًا عند الاقتراب من الصفر. والسرعة الزاوية $\omega$ في الفيزياء تُقاس دائمًا بالراديان في الثانية. +تفترض صيغة الاشتقاق d(sin x)/dx = cos x أن x مقيس بالراديان. إذا كان المدخل u بالدرجات، كتبنا الدالة sin(πu/180)، وظهر العامل π/180 في مشتقتها. يمكن التعبير عن السرعة الزاوية بالدرجات في الثانية أو بالدورات في الدقيقة؛ نحول إلى الوحدة التي تتطلبها الصيغة المستخدمة. ## Derivation -1. عرِّف الراديان الواحد بحيث يساوي طول القوس $s$ الذي يقابله نصف القطر مضروبًا في الزاوية: $s = r\theta_{\text{rad}}$. -2. عند إتمام دورة كاملة، يصبح طول القوس هو محيط الدائرة كله $2\pi r$، وتكون الزاوية بالدرجات $360°$، فهذان وصفان لدورة واحدة. -3. اقسم علاقة المحيط على $r$، فيتحول $2\pi$ راديان إلى $360°$، وبتحجيم النسبة تحصل على تحويل أي زاوية: $\theta_{\text{rad}} = \dfrac{\pi}{180}\,\theta^\circ$. +1. نعرّف قياس الراديان بقسمة طول القوس على نصف القطر، ثم نعيد ترتيب العلاقة لنعبر عن طول القوس. +2. في الدورة الكاملة نعوّض بمحيط الدائرة عن طول القوس. تعادل هذه الدورة 360° أيضًا. +3. نقسم على نصف القطر، ثم نستخدم التناسب نفسه لأي جزء من الدورة لنحصل على معامل التحويل. ## Real world -### المحركات والعجلات -تُقاس سرعة محرك السيارة بالدورة في الدقيقة، لكن معادلات الفيزياء التي تتنبأ بعزمه وقدرته تستخدم السرعة الزاوية بالراديان في الثانية. +### حافة عجلة -### رسوميات الحاسوب -كل دالة دوران في مكتبة رسوميات أو محرك ألعاب، سواء لتدوير صورة أو نموذج ثلاثي الأبعاد، تأخذ الزاوية بالراديان لا بالدرجة، لأن هذا ما تتوقعه الدوال المثلثية في الأساس. +إذا كان نصف قطر عجلة 0.5 م ودارت راديانين، قطعت علامة على حافتها مترًا واحدًا على مسارها الدائري بالنسبة إلى المركز. -### الفلك -اختلاف منظر النجم، وهو الإزاحة الصغيرة التي تُقاس بها المسافة إليه، يُقاس بثانية القوس، وهي كسر صغير من الدرجة يحوّله الفلكيون غالبًا إلى الراديان لتسهيل الحساب. +### برمجة الدوران -### التزلج الفني والغطس -قفزة «ثلاثة أضعاف» في التزلج الفني هي ثلاث دورات ونصف في الهواء، يكتبها الحكام 1260°، لكن فيزياء السرعة التي يحتاجها المتزلج لإتمامها تُحسب بالراديان في الثانية. +نتحقق من الوحدة التي تقبلها الدالة. لإعطاء دالة تستخدم الراديان دورانًا قدره 90°، نمرر π/2؛ أما تمرير 90 فيحدد دورانًا مختلفًا. diff --git a/content/lessons/trigonometry/degrees-and-radians/en.md b/content/lessons/trigonometry/degrees-and-radians/en.md index 9967b10b..468c4f5f 100644 --- a/content/lessons/trigonometry/degrees-and-radians/en.md +++ b/content/lessons/trigonometry/degrees-and-radians/en.md @@ -1,65 +1,59 @@ --- title: Degrees and radians -summary: >- - Degrees split a circle into 360 pieces by old habit; radians measure an angle - by the arc it actually sweeps, which is why the formulas of calculus need them. +summary: 'Measure the same turn in degrees and radians, then connect radians to arc length.' parameters: - theta: angle θ + theta: 'θ — angle in degrees' variables: - - the angle in the everyday unit, where one full turn is 360° - - the same angle in radians, counted as how many radius-lengths of arc it sweeps + - 'θ°: degree measure, with 360° per turn' + - 'θ in radians: swept arc length divided by radius' --- ## Try it -1. Drag the point around the circle and watch both angle readouts change together at the bottom. -2. Push the point to a quarter turn. The degree readout reads 90°, and the radian readout reads close to 1.57 — half of π. -3. Keep going until the radian readout reads close to 1.00. That is the one truly "natural" angle: where the arc already walked is exactly as long as the radius. +1. Set θ = 90°. The two angle readouts show 90° and approximately 1.5708 radians: two units for the same quarter-turn. +2. Move back to 57°. This is approximately 0.9948 radians, close to one radian. +3. Set θ = 180°, then 360°. The radian values are π and 2π. The point completes half a turn, then a full turn. ## Real-life examples -1. **Turning a steering wheel a quarter turn.** That is 90°, or π/2 ≈ 1.57 radians. -2. **A pizza slice cut so its curved crust is exactly as long as the pizza's radius.** Nobody orders a slice that way, but its angle is exactly 1 radian, about 57°. -3. **A ceiling fan blade sweeping three quarters of a turn.** That is 270°, or 3π/2 ≈ 4.71 radians. +1. **A quarter-turn.** A marked wheel turning through 90° rotates through π/2 radians, about 1.57. +2. **Nearly one radian.** At 57°, the swept arc is about 0.9948 times the radius. Exactly one radian is about 57.30°, so this preset is an approximation. +3. **Three quarters of a turn.** At 270°, the angle is 3π/2 radians, about 4.71. ## Test yourself -1. Set the angle to exactly half a turn, 180°, and read off its radian value: it should land on π ≈ 3.14. -2. Find the angle whose radian value is within 0.03 of exactly 1 — the "natural" angle. -3. Push the angle past 90° in degrees, yet keep its radian value under 2. +1. Set exactly half a turn, 180°, and read its radian value. +2. Find an angle whose radian value differs from 1 by at most 0.03. +3. Choose an angle greater than 90° but less than 2 radians. ## Intuition -A degree only exists because ancient astronomers liked the number 360: it splits evenly into halves, thirds, quarters and more, and it roughly matches the days in a year. There is nothing about a circle itself that demands 360 of anything — it is just a convenient old habit, the same way an hour has 60 minutes. +Degrees divide a full turn into 360 equal parts. Radians measure a turn using the circle itself: divide the length of the swept arc by the radius. If the arc has the same length as the radius, the angle is one radian. If the arc is twice as long as the radius, the angle is two radians. -A radian is different: drag the point around the rim and watch it trace out arc. One radian is the angle where that arc is exactly as long as the radius. Because this circle has radius 1, the radian readout at the bottom is not just an angle — it is literally the length of the curve the point has walked, in the same units as the radius itself. +The ratio does not depend on the circle's size. Doubling the radius also doubles the arc length for a fixed angle, leaving their ratio unchanged. On the unit circle, the radius is 1, so the numerical arc length equals the angle in radians. The curved arc, not the straight chord joining its endpoints, is the length used here. ## Formal -For a circle of radius $r$, an angle swept out over an arc length $s$ measures $\theta_{\text{rad}} = s/r$ radians. On the unit circle, where $r = 1$, this means $\theta_{\text{rad}}$ equals the arc length itself. +For radius $r>0$ and swept arc length s measured in the same length unit, $\theta_{\mathrm{rad}}=s/r$. Thus $s=r\theta_{\mathrm{rad}}$. Radians are a ratio of lengths, not a new length unit. -A full turn covers an arc of $2\pi r$, which is $360°$, so $2\pi$ radians and $360°$ describe the same rotation; scaling that ratio down gives $\theta_{\text{rad}} = \dfrac{\pi}{180}\,\theta^\circ$ for any angle. +One full turn has arc length $2\pi r$, so $360^\circ=2\pi\ \mathrm{rad}$. Convert degree values using $\theta_{\mathrm{rad}}=(\pi/180)\theta_{\mathrm{deg}}$; convert back by multiplying by $180/\pi$. ## Advanced -Radians are the unit every calculus formula silently assumes: $\dfrac{d}{dx}\sin x = \cos x$ only holds when $x$ is in radians, because that is the unit in which the small-angle approximation $\sin x \approx x$ is exact in the limit. Angular velocity $\omega$ in physics is likewise always in radians per second. +The derivative formula d(sin x)/dx = cos x assumes x is a radian measure. With a degree-valued input u, the function is sin(πu/180), whose derivative includes the factor π/180. Angular speed may be given in degrees per second or revolutions per minute; convert to the units a formula expects. ## Derivation -1. One radian is defined so that the arc length $s$ it sweeps out equals the radius times the angle: $s = r\theta_{\text{rad}}$. -2. Going once all the way around, the arc length is the full circumference $2\pi r$, and the angle in degrees is $360°$ — two descriptions of the same full turn. -3. Dividing the circumference relation by $r$ turns $2\pi$ radians into $360°$, and scaling gives the conversion for any angle: $\theta_{\text{rad}} = \dfrac{\pi}{180}\,\theta^\circ$. +1. Define radian measure as arc length divided by radius, then rearrange to express arc length. +2. For a full turn, substitute the circumference for arc length. This turn is also 360°. +3. Divide by the radius and use the same proportion for any fraction of a turn to obtain the conversion factor. ## Real world -### Engines and wheels -A car engine's speed is quoted in RPM (turns per minute), but the physics equations that predict its torque and power use angular velocity in radians per second. +### A wheel's rim -### Computer graphics -Every rotation function in a graphics library or game engine — turning a sprite, spinning a 3D model — takes an angle in radians, not degrees, because that is what the underlying trigonometric functions expect. +For a wheel of radius 0.5 m rotating through 2 radians, a marked point travels 1 m along its circular path relative to the centre. -### Astronomy -A star's parallax, the tiny shift used to measure its distance, is measured in arcseconds — fractions of a degree so small that astronomers often convert them to radians to keep the arithmetic simple. +### Programming rotations -### Figure skating and diving -A skater's "triple axel" is three and a half turns in the air, which judges write as 1260°, but the physics of how fast they must spin to complete it is worked out in radians per second. +Check which unit a function accepts. To supply a radian-based function with a 90° rotation, pass π/2; passing 90 would specify a different rotation. From 950c91d43c59c914d3069ed4854350cba94526b9 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:34:17 +0300 Subject: [PATCH 051/124] content: rewrite inverse-trig-functions for first-time learners in both languages --- .../trigonometry/inverse-trig-functions/ar.md | 61 +++++++++--------- .../trigonometry/inverse-trig-functions/en.md | 63 +++++++++---------- 2 files changed, 56 insertions(+), 68 deletions(-) diff --git a/content/lessons/trigonometry/inverse-trig-functions/ar.md b/content/lessons/trigonometry/inverse-trig-functions/ar.md index 09a98423..c4f6ab8f 100644 --- a/content/lessons/trigonometry/inverse-trig-functions/ar.md +++ b/content/lessons/trigonometry/inverse-trig-functions/ar.md @@ -1,67 +1,62 @@ --- title: الدوال المثلثية العكسية -summary: >- - الجيب يأخذ زاوية ويعطي نسبة. الدوال العكسية تأخذ النسبة وتعيد لك الزاوية. +summary: 'استخرج زاوية من نسبة بين ضلعين، وافهم لماذا تعطي الدالة المثلثية العكسية جوابًا مختارًا واحدًا.' parameters: - a: a — الضلع المقابل (الارتفاع) - b: b — الضلع المجاور (الامتداد) + a: 'a — الضلع المقابل لـθ' + b: 'b — الضلع المجاور لـθ' variables: - - طول الارتفاع (اسحب رأسه البعيد) - - طول الامتداد (اسحب رأسه البعيد) - - طول الضلع المائل الواصل بينهما - - الزاوية التي تحصل عليها، المقابلة للضلع a + - 'a: طول الضلع المقابل' + - 'b: طول الضلع المجاور' + - 'c: طول الوتر' + - 'θ: الزاوية الحادة المقابلة لـa' --- ## Try it -1. اسحب الرأس البعيد لـ «a — الضلع المقابل» وراقب الزاوية θ ترتفع مع ازدياد الارتفاع. -2. اسحب «b — الضلع المجاور» بدلًا منها، وراقب θ تصغر مع امتداد القاعدة. -3. اجعل a و b متساويين. تستقر θ عند 45° بالضبط، الزاوية الوحيدة التي يتساوى فيها الارتفاع مع الامتداد. +1. اضبط a = 3 وb = 4. يكون الوتر c = 5 والزاوية θ نحو 36.87°. النسبة a/b تساوي 0.75. +2. ضاعف الطولين إلى a = 6 وb = 8. يكبر المثلث، لكن النسبة والزاوية تبقيان كما هما. +3. اضبط a = b = 1. تصبح النسبة 1 والزاوية 45°. زد a مع تثبيت b لتكبر الزاوية. ## Real-life examples -1. **منحدر ارتفاعه 3 m وامتداده 4 m.** لم يقس أحد زاويته مباشرة، فـ arctan(3/4) ≈ 36.9° تأتي من طولين يقيسهما البنّاء بشريط قياس فقط. -2. **سقف ارتفاعه وامتداده متساويان، متر لكل منهما.** arctan(1/1) = 45°، أشد ميل يمكن المشي عليه بأمان. -3. **منحدر كرسي متحرك، ارتفاعه 1.5 m فوق امتداد 6 m.** arctan(1.5/6) ≈ 14°، أشد انحدارًا مما تسمح به أغلب أكواد إتاحة الوصول. +1. **زاوية من طولين.** يعطي الضلعان 3 و4 وترًا طوله 5. تعطي arcsin(3/5) وarccos(4/5) وarctan(3/4) الزاوية نفسها، نحو 36.87°. +2. **ضلعان قائمان متساويان.** يعطي الطولان 1 و1 زاوية θ = 45°. طول الوتر √2، لذا نسبة الجيب هي 1/√2 وليست 1. +3. **زاوية أصغر.** يعطي الطولان 1.5 و6 قيمة arctan(0.25) ≈ 14.04°. تقابل النسبة الصغيرة بين المقابل والمجاور زاوية حادة صغيرة. ## Test yourself -1. اجعل الزاوية 20° بالضبط. -2. اجعل الزاوية 45° بالضبط. -3. اجعل a أكبر من b وادفع الزاوية فوق 70°. +1. اضبط الطولين لتجعل θ نحو 20°. +2. اجعل θ تساوي 45°. +3. اجعل a أكبر من b، وθ أكبر من 70°. ## Intuition -الجيب وجيب التمام والظل تبدأ كلها من زاوية وتعطيك نسبة. هنا تعمل بالاتجاه المعاكس. اسحب رأسًا لتحدد الارتفاع والامتداد بنفسك، فتظهر الزاوية θ محسوبة مسبقًا، كأنك قست ضلعين بشريط وسألت «أي زاوية أنتجت هذا؟». هذا السؤال بالضبط هو ما تجيب عنه arcsin وarccos وarctan. +تأخذ الدالة المثلثية زاوية وتعطي نسبة. أما الدالة المثلثية العكسية فتأخذ النسبة وتعيد زاوية. في مثلث قائم، إذا كان الضلع المقابل 3 والمجاور 4، كانت نسبة الظل 0.75. تعيد لنا arctan(0.75) الزاوية الحادة، وهي نحو 36.87°. -لاحظ أمرًا على الشاشة. مهما سحبت، لا تُظهر θ إلا زاوية بين 0° و90°، لأن كلا الضلعين هنا موجبان دائمًا. زوايا أخرى كثيرة، مثل 150° أو 330°، تشارك الجيب أو الظل نفسه مع زاوية في ذلك المدى. الآلة الحاسبة يجب أن تختار جوابًا واحدًا لـ arcsin، فبُنيت لتعيد فقط ذلك المدى القريب من الربع الأول، لا غيره، رغم أن الزوايا الأخرى حلول صحيحة بالقدر نفسه للنسبة الأصلية. +خارج سياق المثلث القائم، قد تعطي زوايا مختلفة النسبة نفسها. فجيب 30° وجيب 150° كلاهما 0.5. تعيد دالة الجيب العكسية 30° لأن نواتجها محصورة في فترة مختارة. لا يعني ذلك أن 150° خطأ؛ إنما نختار قيمة واحدة كي تكون العلاقة العكسية دالة. في هذا الرسم، تعطي أطوال الضلعين الموجبة زاوية حادة دائمًا. ## Formal -القوس الجيبي والقوس جيب التمامي والقوس الظلي هي معكوسات الجيب وجيب التمام والظل: $\theta = \arcsin(x)$ يعني أن $\sin\theta = x$، وكذلك الحال للدالتين الأخريين. +للضلعين الموجبين المعروضين، يكون $c=\sqrt{a^2+b^2}$ و$\theta=\arcsin(a/c)=\arccos(b/c)=\arctan(a/b)$. الضلع a مقابل لـθ، وb مجاور لها، وc هو الوتر. يعرض الرسم الدرجات؛ تحقق من وضع الزوايا عند استخدام الحاسبة. -بما أن الجيب وجيب التمام والظل تتكرر إلى ما لا نهاية، فإن معكوساتها معرَّفة على مدى مقيَّد تكون فيه الدالة الأصلية متقابلة: تعيد $\arcsin$ و $\arctan$ قيمًا في $[-90°, 90°]$، وتعيد $\arccos$ قيمًا في $[0°, 180°]$. +تقبل دالتا الجيب العكسية وجيب التمام العكسية مدخلات في $[-1,1]$. وفترتا نواتجهما الرئيسيتين هما، بالترتيب، $[-90^\circ,90^\circ]$ و$[0^\circ,180^\circ]$. تقبل دالة الظل العكسية كل عدد حقيقي، وتعطي زاوية في $(-90^\circ,90^\circ)$ دون الطرفين. ## Advanced -يمكن استرجاع أي زاوية أخرى تشارك النسبة نفسها من القيمة الأساسية بالتناظر: $\pi - \theta$ للجيب، و $-\theta$ أو $2\pi - \theta$ لجيب التمام، ودور الظل نفسه $\pi$، فالمدى المقيَّد لا يفقد أي معلومة، بل يسمّي فقط ممثلًا واحدًا لكل عائلة لا نهائية من الحلول. +الدالة العكسية ليست المقلوب: arcsin(x) زاوية، أما 1/sin(x) فهو مقلوب قيمة الجيب. لحل معادلة مثلثية نستخدم القيمة الرئيسية مع التناظر والدورية. ولإيجاد اتجاه متجه في أي ربع، نستخدم إشارتي الإحداثيين، كما في atan2(y, x)، بدل الاعتماد على arctan(y/x) وحدها. ## Derivation -1. من المثلث، $\sin\theta = a/c$. -2. طبّق arcsin على الطرفين، يُلغى الجيب، فيبقى $\theta = \arcsin(a/c)$. -3. الزاوية نفسها تساوي أيضًا $\arccos(b/c)$ و $\arctan(a/b)$، لأن النسب الثلاث تصف المثلث نفسه بالضبط. +1. في هذا المثلث القائم، جيب θ هو طول الضلع المقابل a مقسومًا على الوتر c. +2. بما أن θ حادة وتقع في الفترة الرئيسية، فإن تطبيق دالة الجيب العكسية يعيد θ. +3. تطبيق جيب التمام العكسي على b/c، أو الظل العكسي على a/b، يعيد الزاوية الحادة نفسها. ## Real world -### قياس مرتفع بالمساحة -يقيس المساح مسافة أفقية ورأسية بشريط، ثم يستخدم arctan ليعبّر عن الانحدار بزاوية بدل كسر. +### التعبير عن ميل -### أذرع الروبوت والرسوم المتحركة -يعرف محرك المفصل موضعه (x, y)، فيستخرج البرنامج الزاوية اللازمة بـ arctan ليَنثني الذراع بشكل صحيح. +يعطينا ارتفاع مقيس وامتداد أفقي نسبة الميل. تعبّر دالة الظل العكسية عن الميل نفسه بزاوية. -### زاوية الإطلاق في الرياضة والفيزياء -من مركّبتي سرعة الكرة الأفقية والرأسية، يسترجع arctan زاوية الإطلاق التي أنتجتهما. +### اتجاه من مركبتين -### ميل السقف -يحوّل عمال السقوف ارتفاعًا وامتدادًا مقيسين إلى زاوية ميل بهذه العلاقة العكسية نفسها، ليقارنوها بكود البناء. +إذا كانت مركبتا السرعة الأفقية والرأسية موجبتين، أعطانا الظل العكسي لنسبتهما اتجاه السرعة فوق الأفق. أما الإشارات الأخرى فتحتاج إلى تحديد الربع أيضًا. diff --git a/content/lessons/trigonometry/inverse-trig-functions/en.md b/content/lessons/trigonometry/inverse-trig-functions/en.md index 727ec4a9..56236d59 100644 --- a/content/lessons/trigonometry/inverse-trig-functions/en.md +++ b/content/lessons/trigonometry/inverse-trig-functions/en.md @@ -1,69 +1,62 @@ --- title: Inverse trig functions -summary: >- - Sine, cosine and tangent turn an angle into a ratio; arcsin, arccos and - arctan run the machine backward, turning a ratio you measured into the - angle that made it. +summary: 'Recover an angle from a side ratio, and understand why an inverse trig function returns one selected answer.' parameters: - a: a — opposite side (rise) - b: b — adjacent side (run) + a: 'a — side opposite θ' + b: 'b — side adjacent to θ' variables: - - length of the rise (drag its far vertex) - - length of the run (drag its far vertex) - - length of the slanted side joining them - - the angle you get back, opposite side a + - 'a: opposite leg length' + - 'b: adjacent leg length' + - 'c: hypotenuse length' + - 'θ: acute angle opposite a' --- ## Try it -1. Drag the far vertex of «a — opposite side» and watch the angle θ climb as the rise grows. -2. Drag «b — adjacent side» instead, and watch θ shrink as the run stretches out. -3. Make a and b equal. θ locks onto exactly 45° — the one angle where rise and run match. +1. Set a = 3 and b = 4. The hypotenuse c is 5 and θ is about 36.87°. The ratio a/b is 0.75. +2. Double both sides to a = 6 and b = 8. The triangle grows but the ratio and angle stay the same. +3. Set a = b = 1. The ratio is 1 and θ is 45°. Increase a while holding b fixed to increase the angle. ## Real-life examples -1. **A ramp with a 3 m rise and a 4 m run.** Nobody measured its angle directly: arctan(3/4) ≈ 36.9° comes straight from the two lengths a builder can tape-measure. -2. **A roof with equal rise and run, 1 m each.** arctan(1/1) = 45°, the steepest pitch before walking on it stops being safe. -3. **A wheelchair ramp: 1.5 m of rise over a 6 m run.** arctan(1.5/6) ≈ 14°, still steeper than most accessibility codes allow. +1. **Angle from two lengths.** Legs 3 and 4 give c = 5. Arcsin(3/5), arccos(4/5) and arctan(3/4) all give about 36.87°. +2. **Equal legs.** Legs 1 and 1 give θ = 45°. The hypotenuse is √2, so the sine ratio is 1/√2 rather than 1. +3. **A smaller angle.** Legs 1.5 and 6 give arctan(0.25) ≈ 14.04°. A small opposite-to-adjacent ratio corresponds to a small acute angle. ## Test yourself -1. Make the angle exactly 20°. -2. Make the angle exactly 45°. -3. Make a bigger than b and push the angle past 70°. +1. Adjust the lengths to make θ approximately 20°. +2. Make θ equal 45°. +3. Make a greater than b and θ greater than 70°. ## Intuition -Sine, cosine and tangent all start from an angle and hand you a ratio. Here you work in the other direction: drag a vertex to set the rise and the run yourself, and the angle θ appears already computed, as if you had measured two sides with a tape and asked "what angle made this?" That question is exactly what arcsin, arccos and arctan answer. +A trigonometric function starts with an angle and gives a ratio. An inverse trigonometric function starts with the ratio and returns an angle. In a right triangle with opposite side 3 and adjacent side 4, the tangent ratio is 0.75. Asking for arctan(0.75) recovers the acute angle, about 36.87°. -There is a catch worth noticing on screen: however you drag, θ only ever shows an angle between 0° and 90°, because both sides here are stuck positive. Countless other angles, like 150° or 330°, share the very same sine or tangent as some angle in that range. A calculator's arcsin has to pick one answer, so it is built to return only that first-quadrant-and-a-bit range and never the others, even though they are equally valid solutions to the original ratio. +Outside a right triangle, several angles can have the same ratio. For example, 30° and 150° both have sine 0.5. Arcsine returns 30° because its output is restricted to a chosen interval. It does not say that 150° is wrong; it selects one value so that the inverse is a function. Positive legs in this diagram always give an acute angle. ## Formal -Arcsine, arccosine and arctangent are the inverses of sine, cosine and tangent: $\theta = \arcsin(x)$ means $\sin\theta = x$, and likewise for the other two. +For the positive legs shown, $c=\sqrt{a^2+b^2}$ and $\theta=\arcsin(a/c)=\arccos(b/c)=\arctan(a/b)$. Side a is opposite θ, side b is adjacent, and c is the hypotenuse. The display reports degrees; check the angle mode when using a calculator. -Because sine, cosine and tangent each repeat forever, their inverses are defined on a restricted range where the original function is one-to-one: $\arcsin$ and $\arctan$ return values in $[-90°, 90°]$, and $\arccos$ returns values in $[0°, 180°]$. +Arcsine and arccosine accept inputs in $[-1,1]$. Their principal output intervals are respectively $[-90^\circ,90^\circ]$ and $[0^\circ,180^\circ]$. Arctangent accepts every real input and returns an angle in $(-90^\circ,90^\circ)$, excluding both endpoints. ## Advanced -Any other angle with the same ratio can be recovered from the principal value by symmetry — $\pi - \theta$ for sine, $-\theta$ or $2\pi - \theta$ for cosine and tangent's own period of $\pi$ — so the restricted range loses no information, it just names one representative per infinite family of solutions. +Inverse does not mean reciprocal: arcsin(x) is an angle, whereas 1/sin(x) is the reciprocal of a sine value. To solve a trig equation, use the principal value together with symmetry and periodicity. To recover a vector's direction in every quadrant, use both coordinate signs, as in atan2(y, x), rather than arctan(y/x) alone. ## Derivation -1. From the triangle, $\sin\theta = a/c$. -2. Applying arcsin to both sides undoes the sine, leaving $\theta = \arcsin(a/c)$. -3. The same angle also equals $\arccos(b/c)$ and $\arctan(a/b)$, since all three ratios describe the very same triangle. +1. In this right triangle the sine of θ is opposite side a divided by hypotenuse c. +2. Since θ is acute and belongs to the principal interval, applying arcsine recovers θ. +3. Applying arccosine to b/c or arctangent to a/b recovers the same acute angle. ## Real world -### Surveying a hillside -A surveyor measures a horizontal and a vertical distance with a tape, then uses arctan to report the slope as an angle instead of a fraction. +### Reporting a slope -### Robot arms and animation -A joint's motor knows its (x, y) position; software recovers the angle to command with arctan so the arm bends correctly. +A measured rise and horizontal run give a slope ratio. Arctangent expresses that same slope as an angle. -### Launch angle in sports and physics -Given a ball's horizontal and vertical speed components, arctan recovers the launch angle that produced them. +### Direction from components -### Roof pitch -Roofers convert a measured rise and run into a pitch angle with exactly this inverse relationship, to compare it against building codes. +Positive horizontal and vertical velocity components give a direction above the horizontal through arctangent of their ratio. Components with other signs require quadrant information. From 3054041389d407eed7b28aef365064a35c548895 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:34:17 +0300 Subject: [PATCH 052/124] content: rewrite polar-coordinates for first-time learners in both languages --- .../trigonometry/polar-coordinates/ar.md | 63 +++++++++--------- .../trigonometry/polar-coordinates/en.md | 65 +++++++++---------- .../polar-coordinates/lesson.yaml | 4 +- 3 files changed, 60 insertions(+), 72 deletions(-) diff --git a/content/lessons/trigonometry/polar-coordinates/ar.md b/content/lessons/trigonometry/polar-coordinates/ar.md index b4081e82..e89759b6 100644 --- a/content/lessons/trigonometry/polar-coordinates/ar.md +++ b/content/lessons/trigonometry/polar-coordinates/ar.md @@ -1,68 +1,63 @@ --- title: الإحداثيات القطبية -summary: >- - بدل «كم يمينًا وكم أعلى»، قل «كم بعيدًا وفي أي اتجاه». هذه لغة الرادار والبوصلة. +summary: 'صف موضع نقطة بمسافتها واتجاهها عن الأصل، وحوّل بين هذا الوصف والإحداثيين الأفقي والرأسي.' parameters: - a: a — الموضع الجانبي - b: b — الموضع الرأسي - n: n — لفّات الحلزون + a: 'a — الإحداثي الأفقي' + b: 'b — الإحداثي الرأسي' + n: 'n — الأس في zⁿ' variables: - - الموضع الجانبي للنقطة عن المركز - - الموضع الرأسي للنقطة عن المركز - - المسافة المستقيمة للنقطة عن المركز - - اتجاه النقطة، مقيسًا من المحور الأفقي + - 'a: الإحداثي الأفقي بإشارته' + - 'b: الإحداثي الرأسي بإشارته' + - 'r: المسافة عن الأصل' + - 'θ: الاتجاه عكس عقارب الساعة من الاتجاه الأفقي الموجب' --- ## Try it -1. اسحب النقطة الزرقاء. القراءة «|z|, arg z» هي بالضبط مسافة نقطتك واتجاهها عن المركز، أي إحداثياها القطبيان. -2. حرّك النقطة إلى الخارج مباشرة دون أن تديرها. تكبر المسافة بينما يبقى الاتجاه كما هو، فالرقمان مستقلان فعلًا. -3. ارفع «n — لفّات الحلزون» من 1 إلى 5. يظهر أثر من النقاط، كل واحدة أبعد دورانًا وأبعد مسافة من سابقتها، فيتشكل حلزون. +1. اضبط a = 1.5 وb = 0.8 وn = 1. تعطي قراءة |z|, arg z مسافة 1.7 وزاوية نحو 28.1° من الاتجاه الأفقي الموجب. +2. اضبط a = −1 وb = 1.2. تقع النقطة في الربع العلوي الأيسر عند نحو 129.8°. نحتاج إلى إشارتي الإحداثيين لاختيار الاتجاه الصحيح. +3. اضبط a = 1.1 وb = 0.4 وارفع n من 1 إلى 5. النقاط الإضافية هي قوى العدد المركب z؛ يعدّ n مرات الضرب، لا الدورات الكاملة. ## Real-life examples -1. **بقعة على شاشة رادار.** تظهر طائرة على بُعد 1.7 وحدة وباتجاه نحو 28° عن خط المرجع، مسافة واتجاه تُقرآن مباشرة من الشاشة. -2. **منارة خلفك وإلى يسارك.** يسجّلها ربّان السفينة باتجاه نحو 130° ومسافة 1.56 وحدة، وهما الرقمان نفسهما اللذان يسميهما البحّار المدى والاتجاه. -3. **صدفة نوتيلس أو ذراع مجرة حلزونية.** ضبط «n» على 5 يرسم خمس لفّات تدور كل واحدة نحو 20° إضافية وتمتد نحو 1.17 ضعفًا أبعد، القاعدة نفسها التي تنمو بها هذه الحلزونات الطبيعية دورانًا وتمددًا. +1. **مسافة واتجاه.** تبعد النقطة (1.5, 0.8) مسافة 1.7 وحدة عن الأصل، بزاوية نحو 28.1° عكس عقارب الساعة من جهة اليمين. +2. **ربع آخر.** تبعد النقطة (−1, 1.2) نحو 1.562 وحدة بزاوية 129.8°. استخدام arctan(b/a) وحدها يختار ربعًا خاطئًا. +3. **تكرار دوران وتحجيم.** للعدد z = 1.1 + 0.4i، تضرب كل عملية المسافة في نحو 1.170 وتضيف نحو 19.98°. عند n = 5، تكون مسافة الناتج نحو 2.197 وزاويته نحو 99.92°؛ لم يكمل خمس لفات. ## Test yourself -1. ضع النقطة على بُعد 1.5 وحدة بالضبط من المركز. -2. وجّه المتجه شبه رأسي، بعد 80° من الأفقي، وأبقِه أبعد من وحدة واحدة عن المركز. -3. مع ضبط «n» على 5 أو أكثر، اجعل أبعد نقطة في الحلزون تقع على أكثر من 5 وحدات من المركز. +1. ضع z على مسافة تختلف عن 1.5 بأقل من 0.05 وحدة. +2. اجعل زاوية z أكبر من 1.4 وأصغر من 1.7 راديان، أي نحو 80.2° إلى 97.4°، ومسافته أكبر من 1. +3. اضبط n على 5 أو أكثر، واجعل مسافة zⁿ أكبر من 5. استخدم القراءة العددية إذا خرج الناتج من نافذة الرسم. ## Intuition -تحدد موضع نقطة عادة بمسطرتين متعامدتين، أي كم تبعد يمينًا وكم تبعد لأعلى. أما الإحداثيات القطبية فتسأل سؤالين مختلفين عن النقطة نفسها. كم تبعد؟ وفي أي اتجاه؟ على الشاشة هاتان ليستا صورتين منفصلتين، فالسهم الواحد من المركز إلى نقطتك يجيب عن السؤالين معًا. طوله هو المسافة، والزاوية التي يميل بها هي الاتجاه. +يخبرنا الإحداثيان (a, b) بمقدار الحركة أفقيًا ورأسيًا من الأصل. تصف الإحداثيات القطبية النقطة نفسها بطول السهم من الأصل إليها واتجاهه. نسمي الطول r، ونقيس الزاوية θ عكس عقارب الساعة من الاتجاه الأفقي الموجب. تختلف هذه الطريقة عن اتجاه البوصلة الذي يقاس مع عقارب الساعة من الشمال. -تثبت الإحداثيات القطبية فائدتها كلما كان الاتجاه بأهمية المسافة. فلا يهم مشغّل الرادار أن طائرة تبعد «3 كم شرقًا و4 كم شمالًا»، بل يهمه أنها «تبعد 5 كم باتجاه 37°». ارفع «n» فترى سببًا آخر لأهمية الإحداثيات القطبية: الحلزونات. كل دورة إضافية تضرب المسافة في العامل نفسه وتضيف الزاوية نفسها، وهذه بالضبط الطريقة التي تنمو بها صدفة نوتيلس أو ذراع مجرة حلزونية، دورة بعد دورة من المركز نحو الخارج. +لا تكفي النسبة b/a لتحديد الاتجاه. للنقطتين (1, 1) و(−1, −1) النسبة نفسها، لكنهما تقعان في اتجاهين متعاكسين. تستخدم atan2 الإشارتين للتمييز بينهما. أما نقطة الأصل فلا اتجاه محددًا لها، حتى لو عرض البرنامج زاوية عددية عندها. ## Formal -لنقطة موضعها الجانبي a وموضعها الرأسي b، بُعدها القطبي $r = \sqrt{a^2+b^2}$ واتجاهها $\theta = \arctan(b/a)$، مع تصحيح بمقدار 180° إذا كانت a سالبة لتقع الزاوية في نصف المستوى الصحيح. +لنقطة غير الأصل، يكون $r=\sqrt{a^2+b^2}$ و$\theta=\operatorname{atan2}(b,a)$. يعرض الرسم الزاوية بالدرجات. إضافة أي عدد صحيح من الدورات الكاملة إلى θ تعطي الاتجاه نفسه، لذا لا تنفرد النقطة بزوج واحد من الإحداثيات القطبية. -وبالاتجاه المعاكس، تُستعاد النقطة نفسها من إحداثييها القطبيين بـ $a = r\cos\theta$ و $b = r\sin\theta$، فالوصفان معكوسان تمامًا لبعضهما. +التحويل العكسي هو $a=r\cos\theta$ و$b=r\sin\theta$. نستخدم هنا $r\geq0$. عند r = 0 تعطي كل الزوايا نقطة الأصل، التي ليس لها اتجاه معرّف. تثبت r على دائرة مركزها الأصل، ويثبت الاتجاه على شعاع ينطلق منه. ## Advanced -كتابة النقطة على هيئة $a+bi$ تجعل هذا هو الشكل القطبي لعدد مركّب، $r(\cos\theta+i\sin\theta)$، ورفعه إلى القوة n يضرب الزاوية في n ويرفع المسافة إلى القوة n، وهذا بالضبط الحلزون من النقاط الذي يرسمه «n» على الشاشة. +يعامل العرض (a, b) أيضًا بوصفه العدد المركب z = a + bi. تبعد قوته النونية مسافة rⁿ، وزاويتها nθ مع تجاهل الدورات الكاملة. تتباعد النقاط عن الأصل عندما تكون r > 1، وتقترب منه عندما تكون 0 < r < 1، وتبقى على دائرة الوحدة عندما تكون r = 1. ليس لازمًا أن تشكل القطع الواصلة بينها حلزونًا سلسًا. تعيد قراءة الزاوية الناتج إلى زاوية رئيسية بدل عدّ الدوران المتراكم. ## Derivation -1. بحكم التعريف، $a = r\cos\theta$ و $b = r\sin\theta$، أي موضع النقطة من مسافتها واتجاهها. -2. ربّع الطرفين واجمعهما، فتستخدم بذلك متطابقة فيثاغورس لإلغاء الزاوية: $a^2+b^2 = r^2\cos^2\theta + r^2\sin^2\theta = r^2$، فـ $r=\sqrt{a^2+b^2}$. -3. اقسم بدل ذلك، فتُلغى r: $b/a = \tan\theta$، فـ $\theta = \arctan(b/a)$. +1. نحلل نصف القطر r إلى مركبتين أفقية ورأسية باستخدام جيب التمام والجيب. +2. نربع المركبتين ونجمعهما. تترك متطابقة دائرة الوحدة r²، فيعطي الجذر غير السالب المسافة. +3. تعطي نسبة الإحداثيين الظل عندما لا يساوي a صفرًا، لكنها تفقد معلومة الربع. نستخدم atan2 مع الإحداثيين لاختيار الاتجاه، ونستبعد نقطة الأصل. ## Real world -### الرادار ومراقبة الحركة الجوية -تُخزَّن كل بقعة على شاشة رادار وتُعرض كمسافة واتجاه عن محطة الرادار، لا كإزاحة شرق-غرب وشمال-جنوب. +### تحديد موضع من مرجع -### الملاحة البحرية والجوية -يعطي البحّارة والطيارون مواقعهم ويستقبلونها بصيغة «المدى والاتجاه» عن معلَم أو منارة، الرقمان نفسهما r وθ هنا. +يمكن لمسافة واتجاه من معلم مختار تحديد نقطة على خريطة مستوية. نوضح الاتجاه المرجعي، وهل تزداد الزاوية مع عقارب الساعة أم عكسها. -### النمو الحلزوني في الطبيعة -تنمو صدفات نوتيلس وأكواز الصنوبر والمجرات الحلزونية بقاعدة دوران وتمدد شبه ثابتة كل خطوة، وهذا يوصف طبيعيًا بالصيغة القطبية، بينما يصعب وصفه بإحداثيي الجانب والارتفاع وحدهما. +### أنماط دائرية -### الموائد الدوّارة ومسح الرادار -يُبلغ طبق رادار دوّار أو مائدة مخرطة دوّارة عمّا يستشعره بزاوية يواجهها الآن ومسافة يقيسها الآن. +لرسم نقاط متساوية التباعد على دائرة، نثبت r ونزيد θ بمقادير متساوية، ثم نحول كل نقطة إلى إحداثيين أفقي ورأسي. diff --git a/content/lessons/trigonometry/polar-coordinates/en.md b/content/lessons/trigonometry/polar-coordinates/en.md index 987e0233..a38d1fd3 100644 --- a/content/lessons/trigonometry/polar-coordinates/en.md +++ b/content/lessons/trigonometry/polar-coordinates/en.md @@ -1,70 +1,63 @@ --- title: Polar coordinates -summary: >- - Instead of saying how far right and how far up, polar coordinates say how - far from the centre and in which direction — the way a radar screen or a - compass bearing already describes a point. +summary: 'Describe a point by its distance and direction from the origin, and convert to horizontal and vertical coordinates.' parameters: - a: a — sideways position - b: b — upward position - n: n — spiral turns + a: 'a — horizontal coordinate' + b: 'b — vertical coordinate' + n: 'n — exponent in zⁿ' variables: - - the point's sideways position from the centre - - the point's upward position from the centre - - the point's straight-line distance from the centre - - the point's bearing, measured from the horizontal axis + - 'a: signed horizontal coordinate' + - 'b: signed vertical coordinate' + - 'r: distance from the origin' + - 'θ: direction counterclockwise from the positive horizontal axis' --- ## Try it -1. Drag the blue point. The readout "|z|, arg z" is exactly your point's distance and bearing from the centre — its polar coordinates. -2. Slide the point straight outward without turning it. The distance grows while the bearing stays put: the two numbers really are independent. -3. Raise «n — spiral turns» from 1 to 5. A trail of dots appears, each one further round and further out — a spiral. +1. Set a = 1.5, b = 0.8 and n = 1. The readout |z|, arg z gives distance 1.7 and angle about 28.1° from the positive horizontal axis. +2. Set a = −1 and b = 1.2. The point lies in the upper-left quadrant, at about 129.8°. Its coordinate signs are needed to select the correct direction. +3. Set a = 1.1, b = 0.4 and increase n from 1 to 5. The extra dots are powers of the complex number z; n counts multiplications, not complete turns. ## Real-life examples -1. **A radar blip.** A plane shows up 1.7 units out at a bearing of about 28° from the reference line — distance and bearing, read straight off the screen. -2. **A lighthouse behind and to the left.** A ship logs it at a bearing of about 130° and a distance of 1.56 units, using the same two numbers a sailor calls range and bearing. -3. **A nautilus shell or a spiral galaxy arm.** Setting «n» to 5 draws five loops that each turn about 20° further and stretch about 1.17× further out — the same steady turn-and-grow rule these natural spirals follow. +1. **Distance and direction.** The point (1.5, 0.8) is 1.7 units from the origin at about 28.1° counterclockwise from the right. +2. **A different quadrant.** The point (−1, 1.2) is about 1.562 units away at 129.8°. Using arctan(b/a) alone would select the wrong quadrant. +3. **Repeated rotation and scaling.** For z = 1.1 + 0.4i, each multiplication scales distance by about 1.170 and adds about 19.98°. At n = 5, the result has distance about 2.197 and angle about 99.92°; it has not made five loops. ## Test yourself -1. Place the point exactly 1.5 units from the centre. -2. Point the vector almost straight up, past 80° from the horizontal, while keeping it more than 1 unit out. -3. With «n» at 5 or more, make the outermost spiral point land more than 5 units from the centre. +1. Place z within 0.05 units of distance 1.5 from the origin. +2. Give z an angle strictly between 1.4 and 1.7 radians, about 80.2° to 97.4°, and a distance greater than 1. +3. Set n to at least 5 and make the distance of zⁿ greater than 5. Use the readout if the result leaves the visible plot. ## Intuition -You normally locate a point by two rulers laid out at right angles: how far right, how far up. Polar coordinates ask two different questions about the very same point: how far away is it, and in what direction? On screen these are not two separate pictures — the single arrow from the centre to your point already answers both at once. Its length is the distance, and the angle it leans at is the direction. +The coordinates (a, b) tell us how far to move horizontally and vertically from the origin. Polar coordinates describe the same point by the length and direction of the arrow from the origin. The length is r, and the angle θ is measured counterclockwise from the positive horizontal axis. This convention differs from a compass bearing measured clockwise from north. -Polar coordinates earn their keep whenever direction matters as much as distance: a radar operator does not care that a plane is "3 km east and 4 km north," only that it is "5 km out, bearing 37°." Raising «n» shows the other reason polar coordinates matter — spirals. Each extra turn multiplies the distance by the same factor and adds the same angle, which is precisely how a nautilus shell or a spiral galaxy grows, turn after turn, from the centre outward. +Direction needs more than the ratio b/a. The points (1, 1) and (−1, −1) have the same ratio, but lie in opposite directions. The function atan2 uses both signs to distinguish them. At the origin there is no preferred direction, even if software displays a numerical angle there. ## Formal -A point with sideways position a and upward position b has polar distance $r = \sqrt{a^2+b^2}$ and bearing $\theta = \arctan(b/a)$, adjusted by 180° when a is negative so the angle lands in the correct half of the plane. +For a point other than the origin, $r=\sqrt{a^2+b^2}$ and $\theta=\operatorname{atan2}(b,a)$. The displayed angle is in degrees. Adding any whole turn to θ describes the same direction, so polar coordinates are not unique. -Going the other way, the same point is recovered from its polar coordinates by $a = r\cos\theta$ and $b = r\sin\theta$ — the two descriptions are exact inverses of each other. +The reverse conversion is $a=r\cos\theta$ and $b=r\sin\theta$. Here $r\geq0$. At r = 0 every angle gives the origin, whose direction is undefined. The circles centred on the origin have constant r; rays from it have constant direction. ## Advanced -Writing the point as $a+bi$ makes this the polar form of a complex number, $r(\cos\theta+i\sin\theta)$; raising it to the power n multiplies the angle by n and raises the distance to the power n, which is exactly the spiral of dots «n» draws on screen. +The display also treats (a, b) as z = a + bi. Its nth power has distance rⁿ and angle nθ modulo a full turn. The points expand when r > 1, contract when 0 < r < 1, and stay on the unit circle when r = 1. Their connected segments need not form a smooth spiral. The angle readout wraps to a principal angle instead of counting total rotation. ## Derivation -1. By definition, $a = r\cos\theta$ and $b = r\sin\theta$ — the point's position from its distance and bearing. -2. Squaring and adding uses the Pythagorean identity to cancel the angle: $a^2+b^2 = r^2\cos^2\theta + r^2\sin^2\theta = r^2$, so $r=\sqrt{a^2+b^2}$. -3. Dividing instead cancels r: $b/a = \tan\theta$, so $\theta = \arctan(b/a)$. +1. Resolve a radius r into its horizontal and vertical components using cosine and sine. +2. Square and add the components. The unit-circle identity leaves r², so the nonnegative square root gives distance. +3. The coordinate ratio gives tangent when a is nonzero, but it loses quadrant information. Use atan2 with both coordinates to select a direction; exclude the origin. ## Real world -### Radar and air traffic control -Every blip on a radar screen is stored and displayed as a distance and a bearing from the radar station, not as an east-west and north-south offset. +### Locating a point from a reference -### Navigation at sea and in the air -Sailors and pilots give and receive positions as "range and bearing" from a landmark or beacon, the same two numbers as r and θ here. +Distance and direction from a chosen landmark can locate a point on a flat map. State the reference direction and the sense in which angles increase. -### Spiral growth in nature -Nautilus shells, pinecones and spiral galaxies all grow by a near-constant turn-and-scale rule each step, which is naturally described in polar form and awkward to describe with sideways-and-up coordinates alone. +### Circular patterns -### Turntables and radar sweeps -A rotating radar dish or a lathe's turntable naturally reports what it senses in terms of the angle it is currently facing and the distance it currently measures. +To draw equally spaced points on a circle, keep r fixed and increase θ by equal amounts, then convert each point to horizontal and vertical coordinates. diff --git a/content/lessons/trigonometry/polar-coordinates/lesson.yaml b/content/lessons/trigonometry/polar-coordinates/lesson.yaml index 7e0d4dec..8c898819 100644 --- a/content/lessons/trigonometry/polar-coordinates/lesson.yaml +++ b/content/lessons/trigonometry/polar-coordinates/lesson.yaml @@ -1,7 +1,7 @@ id: polar-coordinates subject: trigonometry difficulty: high-school -equation: r = \sqrt{a^2 + b^2}, \quad \theta = \arctan\!\left(\dfrac{b}{a}\right) +equation: r = \sqrt{a^2 + b^2}, \quad \theta = \operatorname{atan2}(b,a) concepts: - polar-coordinates - distance-and-bearing @@ -41,7 +41,7 @@ variables: derivation: - a = r\cos\theta, \quad b = r\sin\theta - a^2+b^2 = r^2\cos^2\theta + r^2\sin^2\theta = r^2 \quad\Rightarrow\quad r=\sqrt{a^2+b^2} - - \dfrac{b}{a} = \dfrac{r\sin\theta}{r\cos\theta} = \tan\theta \quad\Rightarrow\quad \theta = \arctan\!\left(\dfrac{b}{a}\right) + - \theta = \operatorname{atan2}(b,a), \quad (a,b)\ne(0,0) charts: [] primary: a presets: From 6c78219b4942a3189f4caedbbb37f91c440c5b29 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:34:17 +0300 Subject: [PATCH 053/124] content: rewrite sine-function-parameters for first-time learners in both languages --- .../sine-function-parameters/ar.md | 67 +++++++++--------- .../sine-function-parameters/en.md | 68 +++++++++---------- 2 files changed, 62 insertions(+), 73 deletions(-) diff --git a/content/lessons/trigonometry/sine-function-parameters/ar.md b/content/lessons/trigonometry/sine-function-parameters/ar.md index 6a3ce053..4c36039c 100644 --- a/content/lessons/trigonometry/sine-function-parameters/ar.md +++ b/content/lessons/trigonometry/sine-function-parameters/ar.md @@ -1,70 +1,65 @@ --- title: السعة والتردد والطور والإزاحة -summary: >- - أربعة أرقام تصف أي موجة جيبية: ارتفاعها وسرعتها ونقطة بدايتها وموضعها. +summary: 'غيّر سعة المنحنى الجيبي وتباعد قممه وموضعه، وافهم الفرق بين السعة وارتفاع خط الوسط.' parameters: - A: السعة A - w: التردد الزاوي ω - phi: الطور φ - D: الإزاحة الرأسية D - x: x (اسحب على طول المنحنى) + A: 'A — السعة' + w: 'ω — التردد الزاوي' + phi: 'φ — الطور بالراديان' + D: 'D — ارتفاع خط الوسط' + x: 'x — المدخل المختار' variables: - - السعة، مدى ابتعاد التذبذب فوق وتحت خط الوسط - - التردد الزاوي، مدى سرعة تقدّم الوسيطة - - الطور، يزيح النمط كله يمينًا أو يسارًا - - الإزاحة الرأسية، خط الوسط الذي يتذبذب المنحنى حوله + - 'A: المسافة من خط الوسط إلى القمة' + - 'ω: زيادة الزاوية داخل الجيب لكل وحدة من x' + - 'φ: الزاوية المضافة داخل دالة الجيب' + - 'D: ارتفاع خط الوسط' --- ## Try it -1. راقب المنحنى، فهو موجة ترتفع وتنخفض بين أعلى نقطة وأدنى نقطة. -2. ارفع «السعة A». تتمدد الموجة رأسيًا دون أن يتحرك خط وسطها. -3. ارفع «الإزاحة الرأسية D» بدلًا منها. تنزلق الموجة كلها، خط الوسط وكل شيء معه، إلى الأعلى مباشرة. +1. اضبط A = 2 وω = 1 وφ = 0 وD = 0. تتراوح قيم المنحنى بين −2 و2. غيّر A إلى 3؛ يبقى خط الوسط عند الصفر. +2. أبقِ A = 3 واضبط D = 1. يصبح المدى من −2 إلى 4، لأن كل قيمة ارتفعت بمقدار 1. +3. ارفع ω من 1 إلى 2 فتقل المسافة بين القمم إلى النصف. ثم غيّر φ لتحريك النمط أفقيًا. اسحب x لفحص قيمة الدالة وميل المماس عند نقطة محددة. ## Real-life examples -1. **الكهرباء المتناوبة.** يتذبذب جهد التيار المنزلي بسعة كبيرة ويكمل دورات كثيرة كل ثانية، فاضبط «السعة A» على 3 و«التردد الزاوي ω» على 3 لترى موجة سريعة وعالية مثله. -2. **المدّ والجزر.** يرتفع مستوى سطح البحر وينخفض ببطء حول ارتفاع متوسط، بسعة 1.5 وتردد زاوي بطيء قدره 0.2 وإزاحة أساس قدرها 2. -3. **تقلّب درجة الحرارة الموسمي.** يتقلّب متوسط درجة الحرارة اليومية بمقدار 4 وحدات عبر السنة حول خط أساس قدره 1، مكمّلًا دورة بطيئة واحدة فقط، أي تردد زاوي 0.2. +1. **دورة أقصر.** عند A = 3 وω = 3 وφ = 0 وD = 0، تتراوح القيم بين −3 و3، ويبلغ طول الدورة نحو 2.09 وحدة من x. +2. **خط وسط مرتفع.** عند A = 1.5 وω = 0.2 وφ = 1 وD = 2، تتراوح القيم بين 0.5 و3.5. طول الدورة نحو 31.42، أي أكبر من النافذة المعروضة. +3. **دورة بطيئة بسعة أكبر.** عند A = 4 وω = 0.2 وφ = 3 وD = 1، يمتد مدى الدورة الكاملة من −3 إلى 5، ويبقى طولها نحو 31.42. ليس لازمًا أن تظهر القمة والقاع معًا في الجزء المرئي. ## Test yourself -1. اجعل قمة الموجة، أي الإزاحة الرأسية زائد السعة، تبلغ 5. -2. اجعل الدور أطول من 20 وحدة مع إبقاء السعة فوق 3. -3. ادفع قاع الموجة، أي الإزاحة الرأسية ناقص السعة، دون 2-، واجعلها تتذبذب بسرعة، بدور أقل من 5. +1. اجعل القيمة العظمى خلال دورة كاملة، D + A، تساوي 5. +2. اجعل طول الدورة أكبر من 20 وحدة من x، والسعة A أكبر من 3. +3. اجعل القيمة الصغرى خلال دورة كاملة، D − A، أقل من −2، وطول الدورة أقل من 5 وحدات من x. ## Intuition -يتذبذب جهد الكهرباء المنزلي بين أعلى قيمة وأدنى قيمة مرات كثيرة كل ثانية، وهذه دالة جيبية في الواقع. ارفع «السعة A» فيتمدد المنحنى كله على الشاشة رأسيًا دون أن يتغير موضع عبوره لخط الوسط. وارفع «الإزاحة الرأسية D» فينزلق المنحنى كله لأعلى، خط الوسط وكل شيء معه. يؤثر المنزلقان في الارتفاع والموضع كل بمعزل عن الآخر. +يصعد المنحنى الجيبي ويهبط بنمط متكرر. عندما يكون $A=2$ و$D=1$، يقع خط الوسط عند 1، ويبتعد المنحنى عنه وحدتين إلى أعلى ووحدتين إلى أسفل، فتتراوح القيم بين −1 و3. السعة هي المسافة من خط الوسط إلى القمة؛ أما المسافة من القاع إلى القمة فتساوي ضعف السعة. -ارفع «التردد الزاوي ω» فتتقارب القمم أكثر. يتكرر المنحنى بسرعة أكبر لأن الدورة الكاملة نفسها تحدث على مسافة أقصر من x. غيّر «الطور φ» فلا يتغير شكل المنحنى إطلاقًا، بل تتغير فقط نقطة بدايته، إذ ينزلق المنحنى كله يمينًا أو يسارًا فحسب. +تحدد العبارة داخل دالة الجيب التقدم خلال الدورة. زيادة $\omega$ تجعل الدورة تكتمل في مسافة أفقية أقصر. وزيادة $\varphi$ تنقل المنحنى إلى اليسار عندما تكون ω موجبة، دون تغيير ارتفاعه أو طول دورته. أما منزلق x فيختار النقطة التي نفحصها، ولا يغيّر المنحنى نفسه. ## Formal -الدور $T = 2\pi/\omega$، ويتذبذب المنحنى بين $D - A$ و$D + A$. +للدالة $f(x)=A\sin(\omega x+\varphi)+D$، مع قيمتي A وω الموجبتين المستخدمتين هنا، يكون خط الوسط $y=D$، ومدى الدورة الكاملة $[D-A,D+A]$، وطول الدورة $T=2\pi/\omega$. تقاس الزاوية داخل الجيب بالراديان. وإذا مثل x الزمن، كان التردد العادي $1/T=\omega/(2\pi)$ دورة لكل وحدة زمن. -ميل المماس عند أي $x$ هو $A\omega\cos(\omega x + \varphi)$، ويبلغ أقصى انحداره عند نقاط عبور خط الوسط، ويصير صفرًا عند القمم والقيعان. +الإزاحة الأفقية هي $-\varphi/\omega$. وميل المماس هو $f'(x)=A\omega\cos(\omega x+\varphi)$؛ يساوي صفرًا عند القمم والقيعان، وتبلغ قيمته المطلقة أكبر مقدار عند عبور خط الوسط. الميل معدل تغير، وليس ارتفاع الموجة. ## Advanced -يمكن إعادة كتابة أي دالة جيبية $A\sin(\omega x + \varphi)$ على صورة $a\sin(\omega x) + b\cos(\omega x)$ حيث $a = A\cos\varphi$، $b = A\sin\varphi$. فصيغة السعة والطور وصيغة مجموع الجيب وجيب التمام تحملان درجتي الحرية نفسيهما، لكن بإحداثيات قطبية مقابل إحداثيات ديكارتية. +إذا سمحنا بمعامل A سالب، كانت السعة |A|، وعكس المعامل السالب المنحنى حول خط الوسط. وإذا كانت ω سالبة وغير صفرية، كان طول الدورة 2π/|ω|. يبقي المنزلقان هنا القيمتين موجبتين. وقد تخفي حدود نافذة الرسم جزءًا من منحنى مرتفع أو بطيء التغير. ## Derivation -1. ابدأ من الصيغة العامة. -2. اشتق باستخدام قاعدة السلسلة، إذ مشتقة الوسيطة الخطية الداخلية هي $\omega$. -3. تحدث القيم القصوى حيث $f'=0$، ونستنتج الدور من اللحظة التي تتقدم فيها الوسيطة بمقدار $2\pi$. +1. نبدأ بدالة الجيب، ونضرب قيمها في A، ونغيّر الزاوية التي تدخلها، ثم نضيف D إلى كل ناتج. +2. عند الاشتقاق تتغير الزاوية الداخلية بمعدل ω، فتضرب قاعدة السلسلة جيب التمام في Aω. +3. تتراوح قيم الجيب بين −1 و1، ومنها نحسب القيمتين العظمى والصغرى. وتتطلب الدورة الكاملة زيادة الزاوية الداخلية بمقدار 2π، ومنها نحسب طول الدورة. ## Real world -### الكهرباء المتناوبة -جهد التيار الكهربائي المنزلي هو $A\sin(\omega t + \varphi)$. يحدد $\omega$ تردد 50 أو 60 هرتز، ويعبّر $\varphi$ عن فروق الطور بين الدوائر. +### نموذج لحركة متكررة -### المد والجزر -يتذبذب مستوى سطح البحر بسعة معينة، ودور يقارب 12 ساعة، وطور يعتمد على شكل الساحل. +الإحداثي الرأسي لنقطة تدور بانتظام يتبع دالة جيبية. يحدد نصف القطر السعة، ومعدل الدوران طول الدورة، وموضع المركز خط الوسط. -### التوليف الصوتي -تتكوّن النغمة الموسيقية من دوال جيبية، سعتها الجهر وتردّدها طبقة الصوت. +### تقريب قياسات متكررة -### البيانات الموسمية -يتوافق متوسط درجة الحرارة اليومية على مدار السنة جيدًا مع دالة جيب دورها 12 شهرًا وإزاحتها الرأسية تساوي المتوسط السنوي. +قد يقرّب منحنى جيبي نمطًا سلسًا يتكرر في البيانات. نراجع القياسات قبل افتراض ثبات السعة وطول الدورة. diff --git a/content/lessons/trigonometry/sine-function-parameters/en.md b/content/lessons/trigonometry/sine-function-parameters/en.md index 67cc10d9..ae353bdd 100644 --- a/content/lessons/trigonometry/sine-function-parameters/en.md +++ b/content/lessons/trigonometry/sine-function-parameters/en.md @@ -1,71 +1,65 @@ --- title: 'Amplitude, frequency, phase and shift' -summary: >- - Four numbers fully describe any sinusoid: how tall it is, how fast it - oscillates, where it starts, and where it sits vertically. +summary: 'Change the height, spacing and position of a sine curve, and distinguish amplitude from its midline.' parameters: - A: amplitude A - w: angular frequency ω - phi: phase φ - D: vertical shift D - x: x (drag along the curve) + A: 'A — amplitude' + w: 'ω — angular frequency' + phi: 'φ — phase in radians' + D: 'D — midline height' + x: 'x — selected input' variables: - - amplitude — how far above and below the midline it swings - - angular frequency — how quickly the argument advances - - phase — shifts the whole pattern left or right - - vertical shift — the midline the curve oscillates around + - 'A: distance from midline to peak' + - 'ω: increase in the sine angle per x-unit' + - 'φ: angle added to the sine input' + - 'D: height of the midline' --- ## Try it -1. Watch the curve: it's a wave rising and falling between a highest and lowest point. -2. Drag «amplitude A» up. The wave stretches taller without moving its midline. -3. Drag «vertical shift D» up instead. The whole wave, midline and all, slides straight up. +1. Set A = 2, ω = 1, φ = 0 and D = 0. The curve ranges from −2 to 2. Change A to 3: the midline stays at zero. +2. Keep A = 3 and set D = 1. The range becomes −2 to 4 because every output increases by 1. +3. Increase ω from 1 to 2 to halve the distance between peaks. Then change φ: the pattern moves horizontally. Drag x to inspect the value and tangent slope at a point. ## Real-life examples -1. **AC electricity.** Mains voltage swings with a large amplitude and completes many cycles per second — set «amplitude A» to 3 and «angular frequency ω» to 3 to see a fast, tall wave like it. -2. **Ocean tide.** Sea level rises and falls slowly around an average height: amplitude 1.5, a slow angular frequency of 0.2, and a baseline shift of 2. -3. **Seasonal temperature swing.** Average daily temperature swings by 4 units over the year around a baseline of 1, completing just one slow cycle — angular frequency 0.2. +1. **A shorter cycle.** A = 3, ω = 3, φ = 0 and D = 0 give a range of −3 to 3 and a period of about 2.09 x-units. +2. **A shifted midline.** A = 1.5, ω = 0.2, φ = 1 and D = 2 give a range of 0.5 to 3.5. The period is about 31.42, longer than the displayed window. +3. **A larger slow cycle.** A = 4, ω = 0.2, φ = 3 and D = 1 give a full-cycle range of −3 to 5 and the same period of about 31.42. The visible segment need not contain both extremes. ## Test yourself -1. Make the wave's peak, vertical shift plus amplitude, reach 5. -2. Make the period longer than 20 units while keeping the amplitude above 3. -3. Push the wave's trough, vertical shift minus amplitude, below −2, while making it oscillate fast with a period under 5. +1. Make the full-cycle maximum D + A equal 5. +2. Make the period greater than 20 x-units and A greater than 3. +3. Make the full-cycle minimum D − A less than −2 and the period less than 5 x-units. ## Intuition -Mains electricity swings between a highest and lowest voltage many times each second — that's a sinusoid in action. Increase «amplitude A» and the whole curve on screen stretches vertically without changing where it crosses its midline; increase «vertical shift D» and it slides straight up, midline and all — the two sliders affect height and position independently. +A sine curve repeats an up-and-down pattern. With $A=2$ and $D=1$, its middle level is 1 and it reaches two units above and below that level: from −1 to 3. Amplitude measures the distance from the midline to a peak, so the distance from trough to peak is twice the amplitude. -Increase «angular frequency ω» and the peaks bunch closer together — the curve repeats faster because the same full turn of angle is covered over a shorter stretch of x. Change «phase φ» and nothing about the shape changes at all, only where it starts: the whole curve just slides left or right. +The expression inside sine controls progress around the cycle. Increasing $\omega$ covers a full cycle in less horizontal distance. Increasing $\varphi$ shifts the curve left when ω is positive; it does not change the height or period. The x control selects the point being inspected, without changing the curve itself. ## Formal -Period $T = 2\pi/\omega$; the curve oscillates between $D - A$ and $D + A$. +For $f(x)=A\sin(\omega x+\varphi)+D$ with the positive A and ω used here, the midline is $y=D$, the full-cycle range is $[D-A,D+A]$, and the period is $T=2\pi/\omega$. The angle inside sine is in radians. If x represents time, ordinary frequency is $1/T=\omega/(2\pi)$ cycles per time unit. -The tangent slope at any $x$ is $A\omega\cos(\omega x + \varphi)$ — steepest at the midline crossings, zero at the peaks and troughs. +The horizontal shift is $-\varphi/\omega$. The tangent slope is $f'(x)=A\omega\cos(\omega x+\varphi)$: zero at peaks and troughs, with greatest magnitude at midline crossings. This is a rate of change, not the wave's height. ## Advanced -Any sinusoid $A\sin(\omega x + \varphi)$ can be rewritten as $a\sin(\omega x) + b\cos(\omega x)$ with $a = A\cos\varphi$, $b = A\sin\varphi$ — the amplitude/phase form and the sum-of-sine-and-cosine form are the same two degrees of freedom, just in polar versus Cartesian coordinates. +If negative amplitudes are allowed, the amplitude is |A|; a negative coefficient reverses the curve about its midline. For nonzero negative ω the period is 2π/|ω|. The sliders here keep both parameters positive. The fixed plotting window can hide part of a high or slowly varying curve. ## Derivation -1. Start from the general form. -2. Differentiate using the chain rule: derivative of the inner linear argument is $\omega$. -3. Extremes occur where $f'=0$; the period follows from when the argument advances by $2\pi$. +1. Begin with sine, stretch it vertically by A, change its angular input, and add D to each output. +2. Differentiate: the inner angle changes at rate ω, so the chain rule multiplies the cosine by Aω. +3. Sine ranges from −1 to 1, giving the extremes. One full cycle requires the inner angle to increase by 2π, giving the period. ## Real world -### AC electricity -Mains voltage is $A\sin(\omega t + \varphi)$; $\omega$ sets 50/60 Hz and $\varphi$ captures phase differences between circuits. +### A repeating motion model -### Tides -Sea level oscillates with an amplitude, a roughly 12-hour period, and a phase that depends on the coastline. +A point rotating uniformly has a sinusoidal vertical coordinate. Its radius sets the amplitude, its rotation rate sets the period, and its centre sets the midline. -### Audio synthesis -A musical tone is built from sinusoids whose amplitude sets loudness and frequency sets pitch. +### Fitting repeated measurements -### Seasonal data -Average daily temperature over a year is well fit by a sine with a 12-month period and a vertical shift equal to the yearly mean. +A sine curve can approximate a smooth repeated pattern. Check the measurements before assuming that the period and amplitude stay constant. From 8394e926820e779cf5c1d33bfbaa04c451d56434 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:34:17 +0300 Subject: [PATCH 054/124] content: rewrite sine-rule for first-time learners in both languages --- content/lessons/trigonometry/sine-rule/ar.md | 67 +++++++++---------- content/lessons/trigonometry/sine-rule/en.md | 68 +++++++++----------- 2 files changed, 62 insertions(+), 73 deletions(-) diff --git a/content/lessons/trigonometry/sine-rule/ar.md b/content/lessons/trigonometry/sine-rule/ar.md index 0888cfcd..6024f7f2 100644 --- a/content/lessons/trigonometry/sine-rule/ar.md +++ b/content/lessons/trigonometry/sine-rule/ar.md @@ -1,70 +1,65 @@ --- title: قاعدة الجيب -summary: >- - في أي مثلث، الضلع الأطول يقابل الزاوية الأكبر، بنسبة واحدة تتكرر عند الأركان الثلاثة. +summary: 'اربط كل ضلع بزاويته المقابلة، واستخدم النسبة المشتركة بين أضلاع المثلث وجيوب زواياه.' parameters: - a: الضلع a — مقابل الزاوية A - b: الضلع b — مقابل الزاوية B - c: الضلع c — مقابل الزاوية C + a: 'a — طول الضلع المقابل لـA بالمتر' + b: 'b — طول الضلع المقابل لـB بالمتر' + c: 'c — طول الضلع المقابل لـC بالمتر' variables: - - الضلع a، مقابل الزاوية A - - الضلع b، مقابل الزاوية B - - الضلع c، مقابل الزاوية C - - الزاوية A، محسوبة من الأضلاع الثلاثة - - الزاوية B، محسوبة من الأضلاع الثلاثة - - الزاوية C، محسوبة من الأضلاع الثلاثة + - 'a: الضلع المقابل لـA' + - 'b: الضلع المقابل لـB' + - 'c: الضلع المقابل لـC' + - 'A: الزاوية المقابلة لـa' + - 'B: الزاوية المقابلة لـb' + - 'C: الزاوية المقابلة لـc' --- ## Try it -1. انظر إلى القراءات الثلاث a/sin A وb/sin B وc/sin C للمثلث الأولي 5 م و6 م و7 م. تستقر الثلاثة عند الرقم نفسه. -2. حرّك المنزلق c لأعلى أو أسفل. تتغير النسب الثلاث معًا، لكنها تبقى متساوية طوال الوقت. -3. قرّب المنزلقين a وb من بعضهما حتى يتساوى الضلعان تقريبًا، وراقب الزاويتين A وB تقتربان من التساوي أيضًا. +1. اضبط a = 5 وb = 6 وc = 7 م. قارن a/sin A وb/sin B وc/sin C؛ تساوي كلها نحو 7.144 م. +2. غيّر c إلى 8 مع تثبيت a وb. تبقى النسب الثلاث متساوية، رغم تغير قيمتها المشتركة. +3. اضبط a = b = 4 وc = 7. تتساوى الزاويتان A وB. أبقِ مجموع الضلعين الأقصرين أكبر من الأطول حتى يبقى الشكل مثلثًا. ## Real-life examples -1. **حقل مثلث قيس بالشريط.** أضلاع 5 م و6 م و7 م. تحوّل قاعدة الجيب هذه الأطوال الثلاثة إلى كل زاوية في الحقل. -2. **جملون سقف طويل وضيّق.** أضلاع 4 م و4 م و7 م. الضلعان المتساويان يقابلان زاويتين صغيرتين متساويتين، بينما يأخذ الضلع المختلف زاوية القمة العريضة. -3. **مرحلتان من مسار إبحار.** مرحلتان طولهما 6 و8 و9 أميال بحرية. يستخدم الملاح النسبة نفسها ليحسب تغيّر الاتجاه عند كل تحوّل. +1. **ثلاثة أضلاع مختلفة.** تعطي الأطوال 5 و6 و7 م زوايا تقارب 44.4° و57.1° و78.5°. قسمة كل طول على جيب زاويته المقابلة تعطي القيمة نفسها. +2. **مثلث متساوي الساقين.** تعطي الأطوال 4 و4 و7 م الزاويتين A = B ≈ 29.0° والزاوية C ≈ 122.1°. عندما نجعل c قاعدة، يكون المثلث عريضًا وقليل الارتفاع. +3. **حجم وشكل مختلفان.** تعطي الأطوال 6 و8 و9 م نسبة مشتركة نحو 9.182 م. جميع الأطوال هنا بالمتر، كما في المنزلقات. ## Test yourself -1. ارفع النسبة المشتركة a/sin A حتى تقترب من 10. -2. اجعل الضلعين a وb متفقين بفارق أقل من 0.3 م مع مدّ c إلى ما بعد 8 م. -3. اجعل الضلع a أطول الأضلاع الثلاثة. +1. اجعل النسبة المشتركة نحو 10 م. +2. اختر مثلثًا صالحًا يكون فيه |a − b| أقل من 0.3 م، وc أكبر من 8 م. +3. اجعل a أطول من b ومن c، مع بقاء المثلث صالحًا. ## Intuition -حقل مثلث أضلاعه 5 م و6 م و7 م له ثلاث زوايا مختلفة، واحدة عند كل ركن، وثلاثة أطوال مختلفة تقابلها. حرّك أي منزلق وراقب القراءات الثلاث. مهما تغيّر شكل المثلث، فإذا قسمت أي ضلع على جيب الزاوية المقابلة له حصلت على الرقم نفسه الذي يعطيه الضلعان الآخران بالطريقة نفسها. +انتبه إلى الحروف قبل الحساب: الضلع a يقع مقابل الزاوية A، وليس إلى جانبها. في مثلث أضلاعه 5 و6 و7، اقسم كل ضلع على جيب زاويته المقابلة. تتفق النتائج الثلاث رغم اختلاف أطوال الأضلاع والزوايا. -هذه هي القاعدة كلها في صورة واحدة. كلما طال الضلع كبُرت الزاوية المقابلة له، لكن ليس بخط مستقيم بسيط، بل بطريقة تُبقي هذه النسبة الواحدة ثابتة. حرّك c وحده إلى الأعلى، يكبر الضلع والزاوية C المقابلة له معًا، بالضبط بما يكفي لتبقى a/sin A وb/sin B وc/sin C متساوية جميعًا. +هذا التساوي داخل المثلث الواحد؛ وقد تتغير القيمة المشتركة عندما نغيّر شكله. إذا عرفت ضلعًا وزاويته المقابلة، أمكنك حساب النسبة المشتركة. ثم تتيح لك زاوية أخرى معلومة حساب ضلعها المقابل. أما إذا عرفت الأطوال الثلاثة فقط، فاستخدم قاعدة جيب التمام لحساب زاوية أولًا؛ وهذا ما يفعله العرض. ## Formal -في مثلث أضلاعه $a$ و$b$ و$c$ تقابل الزوايا $A$ و$B$ و$C$: $\dfrac{a}{\sin A} = \dfrac{b}{\sin B} = \dfrac{c}{\sin C}$. +في كل مثلث غير منعدم المساحة، مع الأزواج المتقابلة (a, A) و(b, B) و(c, C)، تكون $a/\sin A=b/\sin B=c/\sin C$. تقع الزوايا الثلاث بين 0° و180°، فتكون جيوبها موجبة. لا يشترط وجود زاوية قائمة. -بخلاف $\sin\theta = \text{opposite}/\text{hypotenuse}$، لا تحتاج هذه العلاقة زاوية قائمة إطلاقًا، بل تصح في أي مثلث، منفرجًا كان أم ضيقًا. +مثلًا، إذا عرفنا a وA وB، حسبنا $b=a\sin B/\sin A$. يجب أن تحقق الزاويتان $A+B<180^\circ$ حتى تبقى الزاوية الثالثة موجبة. للنسبة المشتركة وحدة طول الأضلاع نفسها، وهي تساوي ضعف نصف قطر الدائرة المحيطة بالمثلث. ## Advanced -إن عرفت ضلعين وزاوية لا تقع بينهما (SSA)، فحلّ $\sin B = \dfrac{b\sin A}{a}$ من أجل $B$ قد يعطي حلّين صحيحين، لأن $\sin B$ موجب لزاوية حادة وأخرى منفرجة معًا، وهذه هي «الحالة الملتبسة»، حيث يصف القياس نفسه مثلثين مختلفين حقًا. المنزلقات هنا تثبّت الأضلاع الثلاثة مباشرة، وهذا يحدد مثلثًا واحدًا دائمًا، فلا يمكن لهذا الرسم أن يُظهر الالتباس. يظهر ذلك فقط في ترتيب SSA المختلف ذاك. +قد يحدد ضلعان وزاوية مقابلة لأحدهما صفرًا أو مثلثًا واحدًا أو مثلثين. بعد حساب sin B، نفحص B و180° − B إذا كانتا مختلفتين، ونقبل فقط ما يترك زاوية ثالثة موجبة. تحدد المنزلقات هنا الأطوال الثلاثة، لذا تعطي الإعدادات الصالحة مثلثًا واحدًا، مع إمكان نقله أو عكسه. ## Derivation -1. أنزل عمودًا من الرأس عند $C$ إلى الضلع $c$. يقسم العمود المثلث إلى مثلثين قائمين، ويساوي العمود نفسه $h = b\sin A = a\sin B$ سواء حسبته من هذا المثلث أو ذاك. -2. اقسم تعبيري $h$ على $\sin A \sin B$، فتحصل على $\dfrac{a}{\sin A} = \dfrac{b}{\sin B}$. -3. أنزل عمودًا ثانيًا، هذه المرة من $A$، فيُدخل الضلع الثالث بالطريقة نفسها، وينتج $\dfrac{a}{\sin A} = \dfrac{b}{\sin B} = \dfrac{c}{\sin C}$. +1. نرسم عمودًا من C إلى المستقيم الذي يحتوي c. يمكن التعبير عن طوله بـb sin A أو a sin B. قد تقع قدم العمود خارج الضلع في المثلث المنفرج؛ وجيب الزاوية يساوي جيب مكملتها إلى 180°. +2. نقسم مساواة الارتفاعين على sin A sin B، وهو غير صفري في مثلث صالح، فنحصل على تساوي أول نسبتين. +3. نكرر الفكرة بعمود من رأس آخر لإدخال زوج الضلع والزاوية الثالث. ## Real world -### التثليث بلا محطة مساحية شاملة -المساح الذي يستطيع قياس ضلع واحد وزاويتين من مثلث، وهو أسهل بكثير من قياس كل ضلع مباشرة، يستخدم قاعدة الجيب ليكمل الباقي. +### قياس عبر عائق -### الإبحار والملاحة التقديرية -الملاح الذي يعرف طول واتجاه مرحلة واحدة من مساره، والزاوية التي انعطفها عند كل نقطة، يستخدم قاعدة الجيب ليحسب المراحل الأخرى. +من نقطتين يمكن الوصول إليهما وتُعرف المسافة بينهما، نقيس زاويتي النظر إلى نقطة ثالثة. نحسب الزاوية الثالثة من مجموع الزوايا، ثم تعطينا قاعدة الجيب المسافتين اللتين يصعب قياسهما مباشرة. -### الفلك -قاس الفلكيون الأوائل اختلاف منظر نجم من نقطتين في مدار الأرض، ثم استخدموا قاعدة الجيب على المثلث الطويل والضيق الناتج ليحسبوا مسافات تمتد سنوات ضوئية. +### تغيير حجم تصميم مثلث -### تحديد موقع أبراج الهاتف والراديو -يمكن تقدير موقع هاتف تقريبيًا من الزوايا التي تصل بها إشارته إلى برجين معلومي المسافة بينهما، باستخدام مثلث قاعدة الجيب نفسه. +ضرب الأضلاع كلها في العامل نفسه يبقي الزوايا ثابتة، ويضرب النسبة المشتركة في قاعدة الجيب في ذلك العامل. diff --git a/content/lessons/trigonometry/sine-rule/en.md b/content/lessons/trigonometry/sine-rule/en.md index 34be3fa9..53c3a5e2 100644 --- a/content/lessons/trigonometry/sine-rule/en.md +++ b/content/lessons/trigonometry/sine-rule/en.md @@ -1,71 +1,65 @@ --- title: Sine rule -summary: >- - In any triangle, not just a right triangle, a bigger side always sits opposite - a bigger angle, in a ratio that is exactly the same at all three corners. +summary: 'Pair each side with its opposite angle to use one shared ratio throughout a triangle.' parameters: - a: side a — opposite angle A - b: side b — opposite angle B - c: side c — opposite angle C + a: 'a — length opposite A (m)' + b: 'b — length opposite B (m)' + c: 'c — length opposite C (m)' variables: - - side a, opposite angle A - - side b, opposite angle B - - side c, opposite angle C - - angle A, worked out from the three sides - - angle B, worked out from the three sides - - angle C, worked out from the three sides + - 'a: side opposite A' + - 'b: side opposite B' + - 'c: side opposite C' + - 'A: angle opposite a' + - 'B: angle opposite b' + - 'C: angle opposite c' --- ## Try it -1. Look at the three readouts a/sin A, b/sin B and c/sin C for the starting 5 m, 6 m, 7 m triangle: all three land on the same number. -2. Drag slider c up or down. All three ratios change together, yet stay equal to one another the whole time. -3. Pull sliders a and b close together, so the two sides are nearly equal, and watch angles A and B become nearly equal too. +1. Set a = 5, b = 6 and c = 7 m. Compare a/sin A, b/sin B and c/sin C: all are about 7.144 m. +2. Change c to 8 while keeping a and b fixed. The three ratios remain equal to each other, although their shared value changes. +3. Set a = b = 4 and c = 7. Angles A and B are equal. Keep the sum of the two shorter sides greater than the longest side to retain a triangle. ## Real-life examples -1. **A triangular field measured by tape.** Sides of 5 m, 6 m and 7 m: the sine rule turns those three lengths into every angle of the field. -2. **A tall, narrow roof truss.** Sides of 4 m, 4 m and 7 m: the two equal sides sit opposite two equal, small angles, while the odd side out gets the wide apex angle. -3. **Two legs of a sailing course.** Legs of 6, 8 and 9 nautical miles: a navigator uses the same ratio to work out the heading change at each turn. +1. **Three different sides.** Lengths 5, 6 and 7 m give angles about 44.4°, 57.1° and 78.5°. Dividing each length by the sine of its opposite angle gives the same value. +2. **An isosceles triangle.** Lengths 4, 4 and 7 m give A = B ≈ 29.0° and C ≈ 122.1°. With c as the base, this is a wide, low triangle. +3. **Another scale and shape.** Lengths 6, 8 and 9 m give a shared ratio of about 9.182 m. All lengths here use metres, as on the controls. ## Test yourself -1. Push the shared ratio a/sin A up to about 10. -2. Make sides a and b agree to within 0.3 m while stretching c past 8 m. -3. Make side a the longest of the three sides. +1. Make the shared ratio approximately 10 m. +2. Choose a valid triangle with |a − b| less than 0.3 m and c greater than 8 m. +3. Make a longer than both b and c in a valid triangle. ## Intuition -A 5 m, 6 m, 7 m triangular field has three different angles, one at each corner, and three different side lengths facing them. Drag any slider and watch the three ratio readouts: no matter how the triangle changes shape, a side divided by the sine of its own opposite angle always comes out the same number as the other two sides treated the same way. +Match the letters before calculating: side a is across from angle A, not beside it. For a triangle with sides 5, 6 and 7, divide each side by the sine of its own opposite angle. The three answers agree even though the side lengths and angles differ. -That is the whole rule in one picture: the longer a side is, the bigger the angle sitting across from it — but not in a simple straight-line way, in a way that keeps this one ratio locked. Drag c up on its own and both the side and its opposite angle C grow together, exactly enough to keep a/sin A, b/sin B and c/sin C all equal. +This equality holds within each triangle; the shared value can change when you reshape it. If you already know one side and its opposite angle, you know the shared ratio. Another known angle then lets you calculate its opposite side. With only three side lengths, use the cosine rule to obtain an angle first; the display does this calculation for you. ## Formal -For a triangle with sides $a$, $b$, $c$ opposite angles $A$, $B$, $C$: $\dfrac{a}{\sin A} = \dfrac{b}{\sin B} = \dfrac{c}{\sin C}$. +For any nondegenerate triangle with opposite pairs (a, A), (b, B) and (c, C), $a/\sin A=b/\sin B=c/\sin C$. All three angles are between 0° and 180°, so their sines are positive. A right angle is not required. -Unlike $\sin\theta = \text{opposite}/\text{hypotenuse}$, this relation needs no right angle at all — it holds for every triangle, however obtuse or narrow. +For example, from a, A and B, calculate $b=a\sin B/\sin A$. The angles must satisfy $A+B<180^\circ$, leaving a positive third angle. The shared ratio has the same length unit as the sides; it equals twice the circumradius. ## Advanced -Given two sides and an angle that is *not* between them (SSA), solving $\sin B = \dfrac{b\sin A}{a}$ for $B$ can have two valid solutions, since $\sin B$ is positive for both an acute and an obtuse angle — the "ambiguous case," where the same measurements describe two genuinely different triangles. The sliders here fix all three sides directly, which always pins down one triangle exactly, so this particular picture cannot show the ambiguity; it shows up only in that different SSA setup. +Two sides and an angle opposite one of them can give zero, one or two triangles. After calculating sin B, test both B and 180° − B when distinct, keeping only angles that leave a positive third angle. The sliders here specify three sides, so valid settings determine one triangle up to reflection and movement. ## Derivation -1. Drop the altitude from the vertex at $C$ down to side $c$: it splits the triangle into two right triangles, and the same altitude equals $h = b\sin A = a\sin B$ measured from either one. -2. Dividing both expressions for $h$ by $\sin A \sin B$ gives $\dfrac{a}{\sin A} = \dfrac{b}{\sin B}$. -3. Dropping a second altitude, this time from $A$, brings in the third side the same way, giving $\dfrac{a}{\sin A} = \dfrac{b}{\sin B} = \dfrac{c}{\sin C}$. +1. Draw a perpendicular from C to the line containing side c. Its length can be expressed as b sin A or a sin B. The foot may lie outside the side for an obtuse triangle; the sine of supplementary angles is equal. +2. Divide the height equality by sin A sin B, which is nonzero for a valid triangle, to obtain the first pair of equal ratios. +3. Repeat using an altitude from another vertex to include the third side-angle pair. ## Real world -### Triangulation without a total station -A surveyor who can measure one side and two angles of a triangle — far easier than measuring every side directly — uses the sine rule to fill in the rest. +### Measuring across an obstacle -### Sailing and dead reckoning -A navigator who knows the length and heading of one leg of a course, and the angle turned at each waypoint, uses the sine rule to work out the other legs. +From two accessible points with a known separation, measure the angles to a third point. The third angle follows from the angle sum, and the sine rule gives the two inaccessible distances. -### Astronomy -Early astronomers measured a star's parallax from two points on Earth's orbit, then used the sine rule on the resulting long, thin triangle to compute distances light-years across. +### Resizing a triangular design -### Radio and phone tower positioning -A phone's rough location can be estimated from the angles at which its signal reaches two towers of known separation, using the same sine rule triangle. +Multiplying all sides by the same factor keeps the angles unchanged and multiplies the shared sine-rule ratio by that factor. From a193b98a9d698d1956f86a1476f71fb3c720509e Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:34:17 +0300 Subject: [PATCH 055/124] content: rewrite solving-right-triangles for first-time learners in both languages --- .../solving-right-triangles/ar.md | 61 +++++++++--------- .../solving-right-triangles/en.md | 62 +++++++++---------- 2 files changed, 56 insertions(+), 67 deletions(-) diff --git a/content/lessons/trigonometry/solving-right-triangles/ar.md b/content/lessons/trigonometry/solving-right-triangles/ar.md index 4f9964b1..d2229e8c 100644 --- a/content/lessons/trigonometry/solving-right-triangles/ar.md +++ b/content/lessons/trigonometry/solving-right-triangles/ar.md @@ -1,67 +1,62 @@ --- title: حل المثلث القائم -summary: >- - اعرف جزأين من المثلث القائم فتجد الباقي كله، من زاوية السلم إلى ميل المنحدر. +summary: 'حدّد المقابل والمجاور والوتر، ثم اختر النسبة المناسبة لحساب ضلع أو زاوية مجهولة.' parameters: - a: الضلع a — مقابل θ - b: الضلع b — مجاور θ + a: 'a — الضلع القائم المقابل لـθ' + b: 'b — الضلع القائم المجاور لـθ' variables: - - الضلع المقابل للزاوية θ، اسحب طرفه البعيد - - الضلع المجاور للزاوية θ، اسحب طرفه البعيد - - الوتر، ويُحسب من a وb - - الزاوية θ، المقابلة للضلع a + - 'a: طول الضلع المقابل' + - 'b: طول الضلع المجاور' + - 'c: طول الوتر' + - 'θ: الزاوية الحادة المقابلة لـa' --- ## Try it -1. اسحب طرف الضلع «a — مقابل θ» إلى الأعلى والأسفل، وراقب الزاوية θ تتغيّر معه. -2. الآن اسحب طرف الضلع «b — مجاور θ» بدلًا منه، وراقب الوتر يتمدد ليطابق ذلك. -3. اضبط الضلعين حتى تقترب θ من 45°. عندها يصبح المثلث مرآة لنفسه، ويتساوى a وb. +1. اضبط a = 3 وb = 4. اقرأ c = 5 وθ ≈ 36.87°. الضلع a مقابل لـθ، رغم ظهوره أفقيًا على الشاشة. +2. اضبط a = 6 وb = 8. تتضاعف الأطوال كلها، لكن θ تبقى كما هي لأن نسب الأضلاع لم تتغير. +3. اضبط a = b = 2. تصبح θ مساوية لـ45°، ويكون c نحو 2.828. الوتر أطول من كل ضلع قائم. ## Real-life examples -1. **سلّم مائل على حائط.** يصل إلى 6 م أعلى الحائط بينما تبعد قاعدته 1.5 م، فتكون الزاوية شديدة الميل لكنها ثابتة. -2. **منحدر لكرسي متحرك.** يرتفع 1 م على مسافة 5 م، فيبقى المنحدر لطيفًا، أقل بكثير من أشد ميل تسمح به أكواد البناء. -3. **درج أو سقف مائل.** يرتفع 4 م على مسافة 2 م فقط، فيكون الميل شديدًا، أقرب إلى سلّم منه إلى درج يُمشى عليه. +1. **قطر مستطيل طويل.** يعطي الضلعان 6 و1.5 وترًا c ≈ 6.185 وزاوية θ ≈ 75.96° مقابل الضلع الأطول. +2. **قطر مستطيل عريض.** يعطي الضلعان 1 و5 وترًا c ≈ 5.099 وزاوية θ ≈ 11.31° مقابل الضلع الأقصر. +3. **نسبة اثنين إلى واحد.** يعطي الضلعان 4 و2 ظلًا يساوي 2 وزاوية θ ≈ 63.43°. الوتر √20 ≈ 4.472. ## Test yourself -1. اجعل θ تساوي 45° بالضبط. -2. اجعل الميل أشد من 70° مع إبقاء الضلع b أقل من 2 م. -3. اجعله أهدأ من 15° مع إبقاء الضلع a أكبر من 1 م. +1. اجعل θ تساوي 45°. +2. اجعل θ أكبر من 70°، مع إبقاء b أقل من وحدتي طول. +3. اجعل θ أقل من 15°، مع إبقاء a أكبر من وحدة طول واحدة. ## Intuition -علامة عند 6 م على الحائط وقاعدة سلّم تبعد 1.5 م تبدو حادة الميل بالنظر فقط، لكن «حادة» تصبح رقمًا بمجرد أن تقارن الضلعين. اسحب طرف الضلع a البعيد وستدور معه الزاوية θ. فضلع a أطول مع الضلع b نفسه يعني زاوية أكبر، تمامًا كما يزداد ميل السلّم كلما اقتربت قاعدته من الحائط. +اختر أولًا الزاوية الحادة التي ستعمل عليها. الضلع الواقع أمامها هو المقابل، والضلع القائم الذي يلامسها هو المجاور. أما الوتر فيقابل الزاوية القائمة دائمًا. لا تتغير هذه الأسماء بتدوير الرسم، لكن الانتقال إلى الزاوية الحادة الأخرى يبادل اسمي المقابل والمجاور. -النسب الثلاث sin وcos وtan ليست إلا ثلاث طرق لمقارنة أضلاع المثلث نفسه. تقارن sin θ الضلع المقابل لθ بالوتر، وتقارن cos θ الضلع المجاور لθ بالوتر، بينما تتجاوز tan θ الوتر كليًا وتقارن الضلعين مباشرة. أيًّا كان الجزآن اللذان تعرفهما من أجزاء المثلث الستة، ثلاثة أضلاع وثلاث زوايا، تعطيك إحدى هذه النسب الباقي. +للضلعين 3 و4 والوتر 5، تكون النسب للزاوية المقابلة للضلع 3: الجيب = 3/5، وجيب التمام = 4/5، والظل = 3/4. مضاعفة الأطوال كلها لا تغيّر أي نسبة. لهذا تحدد النسب زاوية، لا حجم المثلث. لتحديد المثلث كاملًا نحتاج ضلعين، أو ضلعًا وزاوية حادة؛ فلا تكفي الزوايا وحدها لتحديد الأطوال. ## Formal -في مثلث قائم ضلعاه $a$ و$b$ ووتره $c = \sqrt{a^2+b^2}$، والزاوية $\theta$ مقابلة للضلع $a$: $\sin\theta = a/c$ و$\cos\theta = b/c$. +للضلعين الموجبين a وb، مع θ مقابلة لـa، يكون $c=\sqrt{a^2+b^2}$ و$\sin\theta=a/c$ و$\cos\theta=b/c$ و$\tan\theta=a/b$. نستخدم وحدة طول واحدة للأضلاع كلها. تخص هذه التعريفات بنسب الأطوال زاوية حادة في مثلث قائم. -اقسم الأولى على الثانية، فتُلغى الوتر: $\tan\theta = \sin\theta/\cos\theta = a/b$، ومعرفة الضلعين وحدهما تعطيك الزاوية مباشرة، دون حساب $c$ أبدًا. +نختار النسبة التي تحتوي المعلوم والمجهول. مثلًا، إذا عرفنا c وθ، حسبنا $a=c\sin\theta$ و$b=c\cos\theta$. وإذا عرفنا a وb، حسبنا $\theta=\arctan(a/b)$. الزاوية الحادة الأخرى هي $90^\circ-\theta$. ## Advanced -هذه النسب الثلاث تصح فقط في المثلث القائم. يجب أن تكون $\theta$ إحدى الزاويتين الحادتين، والنسبة مبنية على الزاوية القائمة نفسها في ذلك المثلث. أما المثلث الذي لا زاوية قائمة فيه فيحتاج قاعدة الجيب أو قاعدة جيب التمام بدلًا من ذلك، وكلتاهما تؤول إلى نسب SOH-CAH-TOA هذه نفسها متى صارت إحدى الزوايا $90°$. +يلخص الاختصار الإنجليزي SOH–CAH–TOA النسب: الجيب = المقابل/الوتر، وجيب التمام = المجاور/الوتر، والظل = المقابل/المجاور. يفيد التذكّر بعد تحديد الأضلاع. وتعرّف دائرة الوحدة هذه الدوال لزوايا تتجاوز الزوايا الحادة أيضًا؛ فلا تكفي أطوال الأضلاع الموجبة وحدها لوصف قيمها ذات الإشارات. ## Derivation -1. نظرية فيثاغورس تعطي الوتر من الضلعين: $c = \sqrt{a^2+b^2}$. -2. قارن كل ضلع بهذا الوتر، فتُعرَّف بذلك الجيب وجيب التمام: $\sin\theta = a/c$، $\cos\theta = b/c$. -3. اقسم الجيب على جيب التمام، يُلغى $c$، ويبقى الظل مقارنة مباشرة بين الضلعين: $\tan\theta = a/b$. +1. نطبق نظرية فيثاغورس على الضلعين المتعامدين لحساب الوتر. +2. نقسم كل ضلع قائم على الوتر لنحصل على الجيب وجيب التمام للزاوية المختارة. +3. نقسم الجيب على جيب التمام، فيُختصر الوتر المشترك وتبقى نسبة المقابل إلى المجاور. ## Real world -### البناء وأكواد السلامة -يُعدّ السلّم آمنًا عند ميل قريب من 75° عن الأرض تقريبًا، وابتعاد قاعدته كثيرًا أو اقترابها زيادة يخرج الزاوية عن هذا المدى. +### إيجاد قطر -### منحدرات ذوي الاحتياجات -تحدّ أكواد البناء منحدر الكرسي المتحرك بنحو 4.8° (ميل 1 إلى 12)، وتحوّل قاعدة SOH-CAH-TOA هذا مباشرة إلى أقصى ارتفاع مسموح لأي مسافة أفقية معطاة. +يمثل عرض لوح مستطيل وارتفاعه ضلعي مثلث قائم. يعطينا الوتر طول القطر، وتعطينا النسب زاويته. -### المساحة -يقيس المساح ضلعًا واحدًا وزاوية واحدة من مثلث قائم بجهاز التيودوليت، ثم يستخدم هذه النسب لحساب مسافة يصعب أو يستحيل قياسها مباشرة. +### مسافة من زاوية -### النجارة وتسقيف المباني -يُعبَّر عادة عن ميل السقف بنسبة الارتفاع إلى المسافة الأفقية، وهذه النسبة هي بالضبط $\tan\theta$ للزاوية التي يصنعها السقف مع الأفق. +في نموذج قياس بمثلث قائم، يمكن لضلع معلوم وزاوية حادة تحديد طول يصعب الوصول إليه. نحدد أولًا هل المسافة المقيسة ضلع قائم أم وتر، ثم نختار الصيغة. diff --git a/content/lessons/trigonometry/solving-right-triangles/en.md b/content/lessons/trigonometry/solving-right-triangles/en.md index b513ba95..bd427172 100644 --- a/content/lessons/trigonometry/solving-right-triangles/en.md +++ b/content/lessons/trigonometry/solving-right-triangles/en.md @@ -1,68 +1,62 @@ --- title: Solving right triangles -summary: >- - Know any two pieces of a right triangle — a side and the angle, or two sides - — and SOH-CAH-TOA finds everything else, from a ladder's angle to a ramp's slope. +summary: 'Identify opposite, adjacent and hypotenuse, then choose a ratio to find a missing side or angle.' parameters: - a: leg a — opposite θ - b: leg b — adjacent to θ + a: 'a — leg opposite θ' + b: 'b — leg adjacent to θ' variables: - - the leg opposite the angle θ (drag its far vertex) - - the leg adjacent to θ (drag its far vertex) - - the hypotenuse, computed from a and b - - the angle θ, opposite side a + - 'a: opposite leg length' + - 'b: adjacent leg length' + - 'c: hypotenuse length' + - 'θ: acute angle opposite a' --- ## Try it -1. Drag the vertex at the far end of leg «a — opposite θ» up and down, and watch the angle θ change with it. -2. Now drag the vertex on leg «b — adjacent to θ» instead, and watch the hypotenuse stretch to match. -3. Set the two legs so θ reads close to 45°. At that point the triangle mirrors itself, and a and b become equal. +1. Set a = 3 and b = 4. Read c = 5 and θ ≈ 36.87°. Side a is opposite θ even though it is drawn horizontally on screen. +2. Set a = 6 and b = 8. All lengths double, but θ stays the same because the side ratios are unchanged. +3. Set a = b = 2. The angle θ is 45° and c is about 2.828. The hypotenuse is longer than either leg. ## Real-life examples -1. **A ladder against a wall.** It reaches 6 m up the wall while its foot sits 1.5 m out: a steep, sturdy angle. -2. **A wheelchair ramp.** Rising 1 m over a 5 m run keeps the ramp gentle, well under the steepest slope building codes allow. -3. **A staircase or roof pitch.** Rising 4 m over a 2 m run is a steep pitch, more like a ladder than a walkable stair. +1. **A tall rectangle's diagonal.** Legs 6 and 1.5 give c ≈ 6.185 and θ ≈ 75.96° opposite the longer leg. +2. **A wide rectangle's diagonal.** Legs 1 and 5 give c ≈ 5.099 and θ ≈ 11.31° opposite the shorter leg. +3. **A two-to-one ratio.** Legs 4 and 2 give tangent 2 and θ ≈ 63.43°. The hypotenuse is √20 ≈ 4.472. ## Test yourself -1. Make θ exactly 45°. -2. Make the triangle steeper than 70° while keeping leg b under 2 m. -3. Make it shallower than 15° while keeping leg a above 1 m. +1. Make θ equal 45°. +2. Make θ greater than 70° while keeping b below 2 length units. +3. Make θ less than 15° while keeping a above 1 length unit. ## Intuition -A 6 m ladder mark on the wall with its foot 1.5 m out looks steep just by eye — but "steep" becomes a number the moment you compare the two legs. Drag the far vertex of leg a and the angle θ swings with it: taller leg a for the same leg b means a bigger angle, exactly the way a ladder leaning closer to the wall gets steeper. +First choose the acute angle you are working with. The side across from it is opposite; the leg touching it is adjacent. The hypotenuse is always opposite the right angle. Rotating the drawing does not change these names, but switching to the other acute angle exchanges opposite and adjacent. -The three ratios sin, cos and tan are just three ways of comparing sides of this same triangle. sin θ compares the leg opposite θ to the hypotenuse; cos θ compares the leg next to θ to the hypotenuse; tan θ skips the hypotenuse entirely and compares the two legs directly. Whichever two of the triangle's six pieces (three sides, three angles) you already know, one of these three ratios gets you the rest. +For legs 3 and 4 with hypotenuse 5, the ratios are sine = 3/5, cosine = 4/5 and tangent = 3/4 for the angle opposite 3. Doubling all lengths leaves every ratio unchanged. This is why the ratios determine an angle rather than the triangle's size. To determine the whole triangle, we need two sides, or one side and one acute angle; angles alone do not determine lengths. ## Formal -In a right triangle with legs $a$ and $b$, hypotenuse $c = \sqrt{a^2+b^2}$, and angle $\theta$ opposite side $a$: $\sin\theta = a/c$ and $\cos\theta = b/c$. +With positive legs a and b and θ opposite a, $c=\sqrt{a^2+b^2}$, $\sin\theta=a/c$, $\cos\theta=b/c$ and $\tan\theta=a/b$. Use the same length unit for all sides. These side-ratio definitions refer to an acute angle in a right triangle. -Dividing one by the other cancels the hypotenuse: $\tan\theta = \sin\theta/\cos\theta = a/b$, so knowing just the two legs gives the angle directly, without ever computing $c$. +Choose the ratio containing the known and unknown quantities. For example, if c and θ are known, $a=c\sin\theta$ and $b=c\cos\theta$. If a and b are known, $\theta=\arctan(a/b)$. The other acute angle is $90^\circ-\theta$. ## Advanced -These three ratios only work for a right triangle: $\theta$ must be one of the two acute angles, and the ratio is defined against the specific right angle in the triangle. A triangle with no right angle needs the sine rule or the cosine rule instead, which reduce to these same SOH-CAH-TOA ratios the moment one angle happens to be $90°$. +The mnemonic SOH–CAH–TOA stands for sine = opposite/hypotenuse, cosine = adjacent/hypotenuse, tangent = opposite/adjacent. It helps recall the ratios after the sides are identified. Sine, cosine and tangent are also defined beyond acute angles through the unit circle; ordinary positive side lengths alone do not describe those signed values. ## Derivation -1. The Pythagorean theorem gives the hypotenuse from the two legs: $c = \sqrt{a^2+b^2}$. -2. Each leg measured against that hypotenuse defines sine and cosine: $\sin\theta = a/c$, $\cos\theta = b/c$. -3. Dividing sine by cosine cancels $c$, leaving tangent as the two legs compared directly: $\tan\theta = a/b$. +1. Apply the Pythagorean theorem to the two perpendicular legs to calculate the hypotenuse. +2. Divide each leg by the hypotenuse to get sine and cosine for the chosen angle. +3. Divide sine by cosine. The common hypotenuse cancels, leaving opposite divided by adjacent. ## Real world -### Construction and safety codes -A ladder is considered safe at roughly 75° from the ground; setting the foot too far out or too close in pushes the angle outside that range. +### Finding a diagonal -### Accessibility ramps -Building codes cap wheelchair ramps at about 4.8° (a 1-in-12 slope), which SOH-CAH-TOA turns directly into a maximum rise for any given run. +A rectangular panel's width and height are the legs of a right triangle. The hypotenuse gives its diagonal and the ratios give the diagonal's angle. -### Surveying -A surveyor measures one side and one angle of a right triangle with a theodolite, then uses these ratios to compute a distance too large or awkward to measure directly. +### Distance from an angle -### Carpentry and roofing -A roof's "pitch" is usually given as a ratio of rise to run, which is exactly $\tan\theta$ for the angle the roof makes with the horizontal. +In a right-triangle measurement model, one known side and an acute angle can determine an inaccessible length. Identify whether the measured distance is a leg or the hypotenuse before choosing a formula. From 4a754da9e76d85807a9a43b251a47f53dfa0a866 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:34:17 +0300 Subject: [PATCH 056/124] content: rewrite tangent-function for first-time learners in both languages --- .../trigonometry/tangent-function/ar.md | 55 +++++++++--------- .../trigonometry/tangent-function/en.md | 56 +++++++++---------- 2 files changed, 50 insertions(+), 61 deletions(-) diff --git a/content/lessons/trigonometry/tangent-function/ar.md b/content/lessons/trigonometry/tangent-function/ar.md index 2dbf2b11..2b28b6cc 100644 --- a/content/lessons/trigonometry/tangent-function/ar.md +++ b/content/lessons/trigonometry/tangent-function/ar.md @@ -1,64 +1,59 @@ --- title: دالة الظل ومقاربها -summary: >- - الظل نسبة تقفز إلى اللانهاية حيث يكون جيب التمام صفرًا، ثم يتكرر النمط. +summary: 'افهم الظل بوصفه ميلًا، واعرف لماذا لا تكون له قيمة عند بعض الزوايا.' parameters: - x: x + x: 'x — الزاوية بالراديان' variables: - - الزاوية بالراديان - - $\sin x / \cos x$ + - 'x: الزاوية بالراديان' + - 'tan x: الجيب مقسومًا على جيب التمام' --- ## Try it -1. راقب المنحنى، فهو يصعد بحدة كلما اقتربت النقطة من خط رأسي متقطّع. -2. اسحب النقطة «x» ببطء نحو 1.57، أي π/2. يقفز المنحنى صعودًا ثم يظهر من جديد من الأسفل البعيد. -3. واصل السحب. يتكرّر النمط المسنّن كله كل 3.14 وحدة، أي π. +1. اضبط x على 0، ثم على 0.79 راديان. يتغير الظل من 0 إلى نحو 1؛ فالزاوية الثانية قريبة من 45°. +2. قارن x = 1.50 و1.56 و1.58. قرب π/2 تكبر القيمة المطلقة للظل، وتتغير إشارته عند الانتقال إلى الجانب الآخر من الزاوية المستبعدة. اقرأ القيمة العددية عندما تخرج النقطة من نافذة الرسم. +3. قارن x = 0.50 وx = 3.64. قيمتا الظل متقاربتان لأن الفرق بين الزاويتين نحو π راديان. ## Real-life examples -1. **منحدر كرسي متحرّك.** منحدر لطيف بزاوية 0.1 راديان، نحو 6°، له ميل، أي ظل، يساوي 0.1 فقط، أي ارتفاع 1 مقابل كل 10 تقطعها. -2. **سقف حادّ الميل.** سقف بزاوية 1 راديان، نحو 57°، له ظل قريب من 1.56، وهذا حادّ بما يكفي ليصبح المشي عليه خطيرًا. -3. **ميل كاميرا شبه رأسي.** كاميرا مراقبة مائلة بزاوية 1.5 راديان، قريبة من الحد الرأسي π/2، لها ظل يتجاوز 14، فتغيّر طفيف في الزاوية يهزّ مجال رؤيتها بشدّة. +1. **ميل صغير.** عند 0.1 راديان، يساوي الظل نحو 0.1003. يقابل امتدادًا أفقيًا قدره 10 وحدات ارتفاعٌ يقارب 1.003 وحدة. +2. **خط أشد ميلًا.** عند 1 راديان، يساوي الظل نحو 1.557. تقابل كل وحدة أفقية نحو 1.557 وحدة رأسية. +3. **قرب الاتجاه الرأسي.** عند 1.5 راديان، يساوي الظل نحو 14.10. قد يقابل امتدادًا أفقيًا قصيرًا ارتفاعٌ كبير. وعند π/2 تمامًا يصبح الخط رأسيًا، فلا تكون نسبة الارتفاع إلى الامتداد الأفقي معرّفة. ## Test yourself -1. جِد زاوية يكون عندها الظل يساوي 1، أي ميل بزاوية 45 درجة. -2. اقترب من الخط الرأسي المتقطّع، بين 1.4 و1.57، وادفع الظل فوق 20. -3. في الجهة السالبة، بين 1.57- و1-، ادفع الظل دون 10-. +1. أوجد زاوية يساوي ظلها نحو 1. +2. اختر x أكبر من 1.4 وأصغر من 1.57 راديان، بحيث يتجاوز الظل 20. +3. اختر x أكبر من −1.57 وأصغر من −1 راديان، بحيث يقل الظل عن −10. ## Intuition -اسحب النقطة ببطء نحو $x = \pi/2 \approx 1.57$، فيقفز المنحنى صعودًا بسرعة، لأن $\cos x$ يتجه إلى الصفر في المقام بينما يبقى $\sin x$ قريبًا من الواحد. وبعد تلك النقطة مباشرة يظهر المنحنى مجددًا من الأسفل البعيد، بالصيغة نفسها، لكن بإشارة معاكسة لـ $\cos x$. +لحساب ميل خط، نقسم التغير الرأسي على التغير الأفقي. على دائرة الوحدة يمثل الجيب التغير الرأسي وجيب التمام التغير الأفقي، لذلك $\tan x=\sin x/\cos x$. عند 45° يتساويان، فتكون النسبة 1. أما النسبة السالبة فتصف خطًا يهبط كلما اتجهنا إلى اليمين. -واصل السحب فيتكرر النمط كله كل $\pi$ وحدة، أي نصف دور الجيب أو جيب التمام منفردين، لأن قيمة الظل تعتمد على النسبة وحدها، وهذه النسبة تعود إلى نفسها ضعف عدد مرات عودة الجيب وجيب التمام كل على حدة. +عندما تقترب الزاوية من $\pi/2$ من القيم الأصغر، يقترب الإحداثي الأفقي من الصفر ويبقى الرأسي قريبًا من 1. القسمة على عدد موجب أصغر تعطي ناتجًا أكبر. وبعد هذه الزاوية مباشرة يصبح الإحداثي الأفقي سالبًا، فتكون النسبة سالبة وكبيرة بالقيمة المطلقة. لا توجد قيمة للظل عند الزاوية الفاصلة؛ ولا يتصل فرعا المنحنى عبر اللانهاية. ## Formal -$\tan x$ غير معرّفة أينما كان $\cos x = 0$، أي عند $x = \pi/2 + n\pi$ لعدد صحيح $n$، وهذه مقاربات رأسية. +تقاس x بالراديان. يستبعد مجال الدالة $x=\pi/2+n\pi$ لكل عدد صحيح n، لأن $\cos x=0$ عندها. هذه الزوايا مواقع مقاربات رأسية: تكبر القيمة المطلقة للدالة بلا حد عند الاقتراب منها. -دور الدالة $\pi$، إذ يتحقق $\tan(x + \pi) = \tan x$ لكل $x$ في المجال. +دور الدالة $\pi$، أي إن $\tan(x+\pi)=\tan x$ حيث تكون الدالة معرّفة. تعكس نصف دورة إشارتي الجيب وجيب التمام معًا، فتبقى نسبتهما كما هي. ## Advanced -بالقرب من كل مقارب، لدى $\tan x$ نهايتان جانبيتان متعاكستان، $+\infty$ عند الاقتراب من $\pi/2$ من اليسار، و$-\infty$ من اليمين. لذا فإن للدالة انقطاعًا جوهريًا هناك وليس انقطاعًا قابلًا للإزالة، ولهذا فإن «النهاية عند $\pi/2$» غير موجودة رغم أن كلتا النهايتين الجانبيتين لا نهائية. +عند π/2، النهاية من اليسار موجبة لا نهائية، ومن اليمين سالبة لا نهائية. لذلك لا توجد نهاية واحدة من الجهتين، ولن تصبح الدالة متصلة بإسناد قيمة إلى الزاوية الناقصة. تعرض النافذة مدى رأسيًا محدودًا، فتخرج الفروع الشديدة الميل من الجزء المرئي قبل بلوغ المقارب. ## Derivation -1. التعريف كنسبة بين الجيب وجيب التمام. -2. ينعدم المقام عند هذه النقاط، مما ينتج مقاربات رأسية. -3. تنقلب إشارة كل من الجيب وجيب التمام بعد $\pi$، لذا لا تنقلب إشارة نسبتهما، ومن هنا يكون الدور $\pi$. +1. نقسم الإحداثي الرأسي على الأفقي على دائرة الوحدة فنحصل على الظل. +2. نستبعد الزوايا التي يكون عندها المقام صفرًا. لا يساوي الجيب صفرًا عند هذه الزوايا، لذا تكبر القيمة المطلقة للنسبة بلا حد بالقرب منها. +3. إضافة نصف دورة تغيّر إشارتي البسط والمقام معًا، فتبقى النسبة ثابتة. ## Real world -### الميول والزوايا -ظل زاوية الانحدار هو حرفيًا ميلها، أي الارتفاع على الامتداد الأفقي. +### حساب فرق ارتفاع -### المساحة والملاحة -نستنتج الارتفاعات والمسافات من الزوايا المقاسة باستخدام دالة الظل. +إذا كانت المسافة الأفقية d وزاوية الارتفاع θ، كان فرق الارتفاع d tan θ. يجب أن تكون المسافة أفقية، لا مقيسة على خط النظر المائل. -### البصريات -يظهر ظل زاوية السقوط في حسابات العدسات والموشورات. +### مجال الرؤية -### مجال رؤية الكاميرا -التغطية الأفقية للكاميرا على مسافة $d$ هي $2d\tan(\theta/2)$ من أجل زاوية مجال رؤية $\theta$. +لرؤية متناظرة نحو مستوى عمودي على اتجاه النظر ويبعد مسافة d، يكون العرض $2d\tan(\theta/2)$، حيث θ زاوية مجال الرؤية الكاملة، بين 0° و180°. diff --git a/content/lessons/trigonometry/tangent-function/en.md b/content/lessons/trigonometry/tangent-function/en.md index 8054c3b0..471040bb 100644 --- a/content/lessons/trigonometry/tangent-function/en.md +++ b/content/lessons/trigonometry/tangent-function/en.md @@ -1,65 +1,59 @@ --- title: The tangent function and its asymptotes -summary: >- - Tangent is a ratio that suddenly shoots off toward infinity wherever cosine - hits zero, then the same pattern repeats over and over. +summary: 'Understand tangent as a slope, and see why it is undefined at some angles.' parameters: - x: x + x: 'x — angle in radians' variables: - - angle in radians - - $\sin x / \cos x$ + - 'x: angle in radians' + - 'tan x: sine divided by cosine' --- ## Try it -1. Watch the curve: it climbs steeply as the point approaches a vertical dashed line. -2. Drag the point «x» slowly toward 1.57 — that's π/2. The curve rockets upward, then reappears far below. -3. Keep dragging. The whole zig-zag pattern repeats every 3.14 units — that's π. +1. Set x = 0, then x = 0.79 radians. The tangent changes from 0 to approximately 1: the second angle is close to 45°. +2. Compare x = 1.50, 1.56 and 1.58. Near π/2 the values become very large in magnitude and change sign across the excluded angle. Use the numerical readout when the point is outside the plot. +3. Compare x = 0.50 with x = 3.64. Their tangents are nearly equal because the angles differ by approximately π radians. ## Real-life examples -1. **Wheelchair ramp.** A gentle ramp angled at 0.1 radians, about 6°, has a slope — its tangent — of just 0.1: a rise of 1 for every 10 you travel. -2. **Steep roof pitch.** A roof pitched at 1 radian, about 57°, has a tangent near 1.56 — steep enough that walking on it is dangerous. -3. **Near-vertical camera tilt.** A security camera tilted to 1.5 radians, close to the vertical limit at π/2, has a tangent above 14 — a tiny change in angle now swings its view wildly. +1. **A shallow slope.** At 0.1 radians, the tangent is about 0.1003. A horizontal run of 10 units corresponds to a rise of about 1.003 units. +2. **A steeper line.** At 1 radian, the tangent is about 1.557. Each horizontal unit corresponds to about 1.557 vertical units. +3. **Almost vertical.** At 1.5 radians, the tangent is about 14.10. A short horizontal run can correspond to a large rise; at exactly π/2, a vertical line has no defined rise-over-run slope. ## Test yourself -1. Find an angle where the tangent equals 1 — a 45-degree slope. -2. Get close to the vertical dashed line, between 1.4 and 1.57, and push the tangent above 20. -3. On the negative side, between −1.57 and −1, push the tangent below −10. +1. Find an angle whose tangent is approximately 1. +2. Choose x strictly between 1.4 and 1.57 radians with tangent greater than 20. +3. Choose x strictly between −1.57 and −1 radians with tangent less than −10. ## Intuition -Drag the point slowly toward $x = \pi/2 \approx 1.57$: the curve rockets upward, because $\cos x$ is heading to zero in the denominator while $\sin x$ stays near one. Just past that point the curve reappears from far below — same formula, opposite sign of $\cos x$. +For a sloping line, divide the vertical change by the horizontal change to find its slope. On the unit circle these changes are sine and cosine, so $\tan x=\sin x/\cos x$. At 45° they are equal and the ratio is 1. A negative ratio describes a line that falls as you move to the right. -Keep dragging and the whole pattern repeats every $\pi$ units, half the period of sine or cosine alone, because tangent only cares about the ratio, which returns to itself twice as often as sine and cosine individually do. +As the angle approaches $\pi/2$ from below, the horizontal coordinate approaches zero while the vertical coordinate stays near 1. Dividing by a smaller positive number makes the result larger. Just beyond that angle the horizontal coordinate is negative, so the ratio is large and negative. There is no tangent value at the intervening angle; the branches do not connect through infinity. ## Formal -$\tan x$ is undefined wherever $\cos x = 0$, i.e. at $x = \pi/2 + n\pi$ for integer $n$; these are vertical asymptotes. +Angles x are in radians. The domain excludes $x=\pi/2+n\pi$ for every integer n, because $\cos x=0$ there. These excluded angles are vertical asymptotes: nearby values grow without bound in magnitude. -Period $\pi$: $\tan(x + \pi) = \tan x$ for all $x$ in the domain. +The period is $\pi$: $\tan(x+\pi)=\tan x$ wherever the function is defined. A half-turn reverses both sine and cosine, leaving their ratio unchanged. ## Advanced -Near each asymptote $\tan x$ has opposite one-sided limits — $+\infty$ approaching $\pi/2$ from the left, $-\infty$ from the right — so the function has an essential discontinuity there rather than a removable one; this is why "the limit at $\pi/2$" does not exist even though both one-sided limits are infinite. +At π/2, the left-hand limit is positive infinity and the right-hand limit is negative infinity. There is no two-sided limit, and assigning a value at the missing angle would not make the function continuous. The graph shows only a finite vertical window, so steep branches leave the visible area before reaching an asymptote. ## Derivation -1. Definition as a ratio of sine and cosine. -2. The denominator vanishes at these points, producing vertical asymptotes. -3. Both sine and cosine flip sign after $\pi$, so their ratio does not — period $\pi$. +1. Divide the vertical coordinate on the unit circle by the horizontal coordinate to obtain tangent. +2. Exclude angles where the denominator is zero. Sine is nonzero at those angles, so nearby ratios grow without bound. +3. Adding a half-turn changes the sign of numerator and denominator together; their ratio stays the same. ## Real world -### Slopes and angles -The tangent of an incline angle is literally its slope — rise over run. +### Finding a height difference -### Surveying and navigation -Heights and distances are recovered from measured angles via the tangent function. +With horizontal distance d and elevation angle θ, the height difference is d tan θ. The distance must be horizontal, not measured along the sloping line of sight. -### Optics -The tangent of the angle of incidence appears in lens and prism calculations. +### Field of view -### Camera field of view -A camera's horizontal coverage at distance $d$ is $2d\tan(\theta/2)$ for field-of-view angle $\theta$. +For a symmetric view of a plane perpendicular to the viewing direction at distance d, the width is $2d\tan(\theta/2)$, where θ is the full field-of-view angle between 0° and 180°. From da947be5257a42e73fcab6a403434a79b0f1de12 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:34:17 +0300 Subject: [PATCH 057/124] content: rewrite trig-equations for first-time learners in both languages --- .../lessons/trigonometry/trig-equations/ar.md | 59 +++++++++--------- .../lessons/trigonometry/trig-equations/en.md | 60 +++++++++---------- .../trigonometry/trig-equations/lesson.yaml | 2 +- 3 files changed, 55 insertions(+), 66 deletions(-) diff --git a/content/lessons/trigonometry/trig-equations/ar.md b/content/lessons/trigonometry/trig-equations/ar.md index 9ee29100..88cfee33 100644 --- a/content/lessons/trigonometry/trig-equations/ar.md +++ b/content/lessons/trigonometry/trig-equations/ar.md @@ -1,66 +1,61 @@ --- title: معادلات مثلثية — زوايا كثيرة لجيب واحد -summary: >- - الجيب يتكرر، فكل ارتفاع على الموجة يخص أكثر من زاوية. هنا تجد البقية. +summary: 'أوجد زوايا مختلفة لها الجيب نفسه باستخدام التناظر والدورات الكاملة.' parameters: - x: x — الزاوية الأولى - h: h — الفجوة إلى الزاوية الثانية + x: 'x — الزاوية الأولى بالراديان' + h: 'h — الفرق بين الزاويتين بالراديان وبإشارته' variables: - - الزاوية الأولى، بالراديان - - المسافة التي تبعدها الزاوية الثانية عن x - - عدد الدورات الكاملة حول الدائرة + - 'x: الزاوية الأولى' + - 'h: الزاوية الثانية ناقص الأولى' + - 'k: عدد صحيح من الدورات الكاملة في صيغ الحل' --- ## Try it -1. راقب النقطتين على المنحنى. يُظهر المستطيل المتقطع الفجوة بينهما، أفقيًا (h) ورأسيًا (الارتفاعان). -2. اسحب «h — الفجوة إلى الزاوية الثانية» حتى يستوي المستطيل المتقطع. تقف النقطتان الآن على الارتفاع نفسه، فللزاويتين الجيب نفسه. -3. اسحب «x — الزاوية الأولى» بدلًا منها، مع إبقاء المستطيل مستويًا. الفجوة h التي تُبقيه مستويًا تتغير مع x، فلكل زاوية بداية تقريبًا شريكة مختلفة. +1. اضبط x = 0.5 وh = 2.14. تتقارب قيمتا الجيب عند x وx + h. يقترب الجزء الرأسي المتقطع وقراءة الفرق الرأسي من الصفر. +2. غيّر x إلى 1 واضبط h على 1.14. يتطلب تساوي الارتفاعين الآن فرقًا مختلفًا لأن النقطتين على جانبي القمة نفسها. +3. اضبط h = 6.28 وغيّر x. هذا الفرق قريب من 2π، لذلك تبقى القيمتان متقاربتين خلال الدورة. اختر إعدادات تُظهر النقطتين داخل نافذة الرسم. ## Real-life examples -1. **مقعد دولاب هواء.** وهو يصعد عند x = 0.5 راديان بعد القاع، يبلغ المقعد الارتفاع نفسه ثانية عند x + h = 2.64 راديان في طريقه نحو القمة. -2. **المد عند ميناء.** يبلغ الماء عمقًا معينًا مرة وهو يرتفع، عند x = 1.0 راديان في الدورة، ومرة أخرى وهو ينخفض، عند x + h = 2.14 راديان. -3. **أرجوحة تحت نقطة سكونها.** بعد x = 4.0 راديان في دورتها تكون الأرجوحة تحت النقطة التي بدأت منها، وتعود إلى الارتفاع المنخفض نفسه بالضبط عند x + h = 5.42 راديان. +1. **على جانبي قمة.** عند x = 0.5 وx + h = 2.64، تقارب قيمتا الجيب 0.48. الزاوية الثانية الدقيقة هي π − 0.5. +2. **أقرب إلى القمة.** عند x = 1 وx + h = 2.14، تقارب القيمتان 0.84. الفرق بين الزاويتين أصغر من المثال الأول. +3. **على جانبي قاع.** عند x = 4 وx + h = 5.42، تقارب القيمتان −0.76. الزاوية الثانية الدقيقة هي 3π − 4. ## Test yourself -1. جِد فجوة h، غير صفرية، تُبقي الزاويتين على الارتفاع نفسه. -2. ادفع h إلى دورة كاملة حول الدائرة وتحقق أن الارتفاعين لا يزالان متطابقين. -3. جِد زاويتين لهما الارتفاع نفسه بينما ذلك الارتفاع سالب. +1. اجعل القيمة المطلقة للفرق بين الجيبين أقل من 0.02، مع |h| أكبر من 0.5. +2. اختر h يختلف عن 2π بأقل من 0.3، واجعل القيمة المطلقة لفرق الارتفاعين أقل من 0.02. يقارب الإعداد 6.28 دورة كاملة. +3. اجعل sin x أقل من −0.3، والقيمة المطلقة لفرق الارتفاعين أقل من 0.02، و|h| أكبر من 0.3. ## Intuition -المنحنى الذي تراه هو الجيب وقد فُرد على خط، لكنه لا يتوقف عن التكرار، وهو أيضًا متماثل داخل كل تلة منه. الحقيقتان معًا تعنيان أن ارتفاعًا واحدًا على الموجة يخص نقطتين تقريبًا دائمًا. فأحيانًا تكون قد تجاوزت دورة كاملة أخرى حول الدائرة، وأحيانًا تكون وقفت على الزاوية المرآة داخل الدورة نفسها. وحين تسحب h حتى يستوي المستطيل المتقطع، فإنك تبحث يدويًا عن تلك النقطة الثانية. +غالبًا ما يقطع خط أفقي موجة الجيب مرتين خلال دورة واحدة: مرة في الجزء الصاعد وأخرى في الهابط. تمثل النقطتان هنا الزاويتين x وx + h. عندما يتساوى ارتفاعاهما، يكون الفرق الرأسي صفرًا، ويصبح القاطع الواصل بين النقطتين المختلفتين أفقيًا. -راقب ما يحدث لـ h وأنت تحرك x. إنه ليس ثابتًا. الشريك بعد دورة كاملة يبقى دائمًا على بُعد 2π ثابت، لكن مسافة الشريك المرآة تصغر كلما اقترب x من قمة التلة وتكبر ثانية في طريق النزول، لأن التناظر المرآوي يُقاس من القمة لا من فجوة ثابتة. +توجد طريقتان لإيجاد زاوية أخرى: الانعكاس حول قمة أو قاع، وإضافة دورات كاملة. عندما تكون x = 0.5، يعطي الانعكاس π − 0.5، وتعطي إضافة دورة واحدة 0.5 + 2π. يتغير فرق الانعكاس بتغير x، لكن فرق الدورة الكاملة يبقى 2π. وإذا كانت h سالبة، وقعت النقطة الثانية قبل الأولى. ## Formal -للمعادلة $\sin(x+h) = \sin x$ عائلتان من الحلول: $x + h = x + 2\pi k$، أي بعد دورة كاملة، و $x + h = \pi - x + 2\pi k$، وهي انعكاس صورة x حول $\pi/2$. +للزوايا الحقيقية بالراديان، تتحقق $\sin(x+h)=\sin x$ إذا وفقط إذا كان $h=2\pi k$ أو $h=\pi-2x+2\pi k$، حيث k عدد صحيح. قد تتطابق العائلتان عند القمم والقيعان. -توجد العائلتان لكل x حقيقية، فلمعادلة جيب تساوي ارتفاعًا مستهدفًا حلول لا نهائية دائمًا، تفصل بينها 2π داخل كل عائلة. +عمومًا، لا توجد حلول حقيقية للمعادلة $\sin u=s$ إلا عندما يكون $-1\leq s\leq1$. تظهر القيم الواقعة بين الطرفين مرتين في الدورة، ويظهر كل طرف مرة واحدة. تعطي الدورات الكاملة حلولًا لا نهائية على خط الأعداد الحقيقي غير المقيد، لكننا نحتفظ فقط بالحلول الواقعة في الفترة المحددة إذا قُيّدت المسألة بفترة. ## Advanced -البنية ذات العائلتين نفسها تنتقل إلى $\cos$ (بانعكاس حول $0$ بدل $\pi/2$)، وبعد قسمة معادلة الجيب على معادلة جيب التمام تنهار إلى عائلة واحدة دورها $\pi$ لـ $\tan$، لأن حل الظل المرآوي يتطابق مع منحناه نفسه. +تحقق h = 0 المعادلة دائمًا، لكن ميل القاطع يصبح 0/0 وغير معرّف. تستبعد التمارين تطابق النقطتين هذا. لجيب التمام، تتحقق cos u = cos v عندما يكون u = ±v + 2πk. وللظل، تتحقق tan u = tan v عندما يكون u = v + πk عند المدخلات المعرّفة. تنتج هذه القواعد من تناظر كل دالة ودوريتها، لا من قسمة معادلتين غير مترابطتين. ## Derivation -1. تتساوى جيوب زاويتين بالضبط حين يكون الفرق بين ارتفاعيهما صفرًا. -2. إحدى طرق سد تلك الفجوة دورة كاملة: $h = 2\pi k$ لأي عدد صحيح k. -3. الطريقة الأخرى الوقوف على زاوية الجيب المرآوية: $h = \pi - 2x + 2\pi k$. +1. ننقل إحدى قيمتي الجيب إلى الطرف الآخر: تساوي الارتفاعين يعني أن الفرق صفر. +2. يعطي الانعكاس x + h = π − x + 2πk. نطرح x فنحصل على عائلة فروق الانعكاس. +3. تعطي الدورية x + h = x + 2πk. نطرح x فنحصل على عائلة فروق الدورات الكاملة. ## Real world -### المد والنهار -أي كمية ترتفع وتنخفض بسلاسة، من ارتفاع المد إلى ساعات النهار، تعود إلى القيمة نفسها مرتين كل دورة، مرة صاعدة ومرة هابطة، وهذا بالضبط ما تصفه هذه المعادلة. +### حركة متكررة -### الكهرباء المتناوبة -يبلغ تيار المنزل أي جهد معطى مرتين كل دورة، ويعتمد توقيت الدوائر على معرفة اللحظتين معًا لا واحدة فقط. +في نموذج إزاحة جيبي، يمر الجسم بالموضع الواقع بين النهايتين مرة في كل اتجاه خلال الدورة. تساوي الموضعين لا يعني تساوي السرعتين المتجهتين. -### الصوت والموسيقى -طوران مختلفان للنغمة الموسيقية نفسها قد يتساويان في السعة لحظة أخذ العينة، ولهذا الطور وحده، لا السعة، هو ما يميّز كثيرًا من المؤثرات الصوتية. +### قراءة عينة واحدة -### المدارات والفصول -تعود مسافة كوكب عن نجمه، أو طول النهار في مكان ما عبر السنة، إلى القيمة نفسها عند نقطتين متناظرتين من دورته السنوية. +لا تحدد قيمة جيب واحدة الزاوية عادةً. قد تميز معلومات إضافية، مثل كون الإشارة صاعدة أو هابطة ورقم الدورة، بين الزوايا الممكنة. diff --git a/content/lessons/trigonometry/trig-equations/en.md b/content/lessons/trigonometry/trig-equations/en.md index 381c1c8f..7259b126 100644 --- a/content/lessons/trigonometry/trig-equations/en.md +++ b/content/lessons/trigonometry/trig-equations/en.md @@ -1,67 +1,61 @@ --- title: Trig equations — many angles, one sine -summary: >- - Sine repeats itself, so almost every height on the wave belongs to more - than one angle at once — this lesson is about finding the others. +summary: 'Find different angles with the same sine using symmetry and full turns.' parameters: - x: x — first angle - h: h — gap to the second angle + x: 'x — first angle in radians' + h: 'h — signed gap in radians' variables: - - the first angle, in radians - - how far past x the second angle sits - - how many full turns around the circle + - 'x: first angle' + - 'h: second angle minus first angle' + - 'k: integer number of full turns in the solution formulas' --- ## Try it -1. Watch the two dots on the curve. The dashed rectangle shows the gap between them, both sideways (h) and up-down (the two heights). -2. Drag «h — gap to the second angle» until the dashed rectangle goes flat: both dots now sit at the same height, so both angles have the same sine. -3. Drag «x — first angle» instead, keeping the rectangle flat. The gap h that keeps it flat changes with x — there is a different partner angle for almost every starting angle. +1. Set x = 0.5 and h = 2.14. The points at x and x + h have nearly equal heights. The dashed vertical step and the rise readout are close to zero. +2. Change x to 1 and adjust h to 1.14. Equal heights now require a different gap because the points lie on opposite sides of the same peak. +3. Set h = 6.28 and change x. This gap is close to 2π, so the heights stay nearly equal throughout the cycle. Choose settings with both points inside the plotting window. ## Real-life examples -1. **A Ferris wheel seat.** Rising through x = 0.5 rad past the bottom, a seat reaches the same height again at x + h = 2.64 rad on its way toward the top. -2. **The tide at a harbour.** The water reaches a given depth once while rising, at x = 1.0 rad into the cycle, and again while falling, at x + h = 2.14 rad. -3. **A swing below its rest point.** Past x = 4.0 rad in its cycle the swing is below where it started; it returns to that exact same low height at x + h = 5.42 rad. +1. **Either side of a peak.** At x = 0.5 and x + h = 2.64, both sine values are about 0.48. The exact second angle would be π − 0.5. +2. **Closer to the peak.** At x = 1 and x + h = 2.14, both values are about 0.84. The gap is shorter than in the first example. +3. **Either side of a trough.** At x = 4 and x + h = 5.42, both values are about −0.76. The exact second angle is 3π − 4. ## Test yourself -1. Find a gap h, not zero, that keeps both angles at the same height. -2. Push h to a full turn around the circle and check the heights still match. -3. Find two angles with the same height while that height is negative. +1. Make the absolute difference between the sine values less than 0.02 with |h| greater than 0.5. +2. Choose h within 0.3 of 2π and make the absolute height difference less than 0.02. A setting of 6.28 approximates one full turn. +3. Make sin x less than −0.3, the absolute height difference less than 0.02, and |h| greater than 0.3. ## Intuition -The curve you see is sine unrolled onto a line, but it never stops repeating, and it is also symmetric within each hump. Both facts mean a single height on the wave almost always belongs to two dots at once — sometimes because you have gone one full turn further around the circle, sometimes because you have landed on the mirror-image angle within the same turn. Dragging h until the dashed rectangle goes flat is you finding that second dot by hand. +A horizontal line through a sine wave often meets it twice in one cycle: once on the rising section and once on the falling section. The two marked points here have angles x and x + h. When they have equal heights, the vertical difference is zero and the secant line through distinct points is horizontal. -Watch what happens to h as you slide x along: it is not constant. The full-turn partner always sits a fixed 2π away, but the mirror-image partner's distance shrinks as x approaches the top of the hump and grows again on the way down, because mirror symmetry is measured from the peak, not from a fixed gap. +There are two ways to find a partner. Reflect an angle across a peak or trough, or add full turns. For x = 0.5, reflection gives π − 0.5, whereas adding one turn gives 0.5 + 2π. Changing x changes the reflection gap, but a full-turn gap stays 2π. A negative h places the second point before the first. ## Formal -The equation $\sin(x+h) = \sin x$ has two families of solutions: $x + h = x + 2\pi k$, a full turn away, and $x + h = \pi - x + 2\pi k$, the mirror image of x reflected around $\pi/2$. +For real angles in radians, $\sin(x+h)=\sin x$ exactly when $h=2\pi k$ or $h=\pi-2x+2\pi k$, where k is any integer. The two families can overlap at peaks and troughs. -Both families exist for every real x, so a sine equation set equal to a target height always has infinitely many solutions, spaced 2π apart within each family. +More generally, $\sin u=s$ has real solutions only for $-1\leq s\leq1$. Values strictly between the extremes occur twice per cycle, while each extreme occurs once. Full turns produce infinitely many solutions on the unrestricted real line, but a specified interval contains only those solutions that lie inside it. ## Advanced -The same two-family structure carries over to $\cos$ (mirrored around $0$ instead of $\pi/2$) and, after dividing sine's equation by cosine's, collapses to a single family of period $\pi$ for $\tan$, since tangent's mirror solution and its own graph coincide. +The value h = 0 always satisfies the equation, but the secant slope is then 0/0 and is undefined. The exercises exclude this coincidence. The corresponding rules are cos u = cos v when u = ±v + 2πk, and tan u = tan v when u = v + πk at defined inputs. These follow from their own symmetries and periods, not from dividing two unrelated equations. ## Derivation -1. Two angles give the same sine exactly when the difference between their heights is zero. -2. One way to close that gap is a full turn: $h = 2\pi k$ for any whole number k. -3. The other way is landing on sine's mirror angle: $h = \pi - 2x + 2\pi k$. +1. Move one sine value to the other side: equal heights mean a zero difference. +2. Reflection gives x + h = π − x + 2πk. Subtract x to find the reflection family of gaps. +3. Periodicity gives x + h = x + 2πk. Subtract x to find the full-turn family. ## Real world -### Tides and daylight -Any quantity that rises and falls smoothly, from tide height to hours of daylight, revisits the same value twice each cycle — once rising, once falling — which is exactly this equation. +### Repeating motion -### AC electricity -A household current reaches any given voltage twice every cycle; circuit timing depends on knowing both instants, not just one. +In a sinusoidal displacement model, the same interior position occurs once in each direction during a cycle. Equal positions do not imply equal velocities. -### Sound and music -Two different phases of the same musical tone can sound identical in amplitude at the moment you sample them, which is why phase alone, not amplitude, distinguishes many sound effects. +### Reading one sample -### Orbits and seasons -A planet's distance from its star, or a location's day length across the year, returns to the same value at two symmetric points in its yearly cycle. +A single sine value generally does not identify an angle uniquely. Additional information, such as whether the signal is rising or falling and which cycle it is in, can distinguish possible angles. diff --git a/content/lessons/trigonometry/trig-equations/lesson.yaml b/content/lessons/trigonometry/trig-equations/lesson.yaml index 4b7f5c3c..e888c166 100644 --- a/content/lessons/trigonometry/trig-equations/lesson.yaml +++ b/content/lessons/trigonometry/trig-equations/lesson.yaml @@ -32,7 +32,7 @@ parameters: value: 0.5 h: min: -6.2 - max: 6.2 + max: 6.3 step: 0.02 value: 2.14 variables: From aec50622ebcec55444c139dc72b99fcdc2266fc5 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:34:17 +0300 Subject: [PATCH 058/124] content: rewrite trig-identities for first-time learners in both languages --- .../trigonometry/trig-identities/ar.md | 59 ++++++++---------- .../trigonometry/trig-identities/en.md | 61 ++++++++----------- 2 files changed, 54 insertions(+), 66 deletions(-) diff --git a/content/lessons/trigonometry/trig-identities/ar.md b/content/lessons/trigonometry/trig-identities/ar.md index 29b6e47e..9a9cc076 100644 --- a/content/lessons/trigonometry/trig-identities/ar.md +++ b/content/lessons/trigonometry/trig-identities/ar.md @@ -1,66 +1,61 @@ --- title: متطابقة فيثاغورس ومتطابقة الظل -summary: >- - خذ أي نقطة على دائرة نصف قطرها 1. مربع بُعديها يجمع دائمًا إلى 1. +summary: 'افهم لماذا يساوي مجموع مربعي الجيب وجيب التمام 1 دائمًا، واربط الظل بالإحداثيين نفسيهما.' parameters: - theta: الزاوية θ + theta: 'θ — الزاوية بالدرجات' variables: - - الزاوية التي مسحتها حول الدائرة، مقيسة من اتجاه الساعة 3 - - ارتفاع النقطة فوق خط المنتصف - - بُعد النقطة جانبيًا عن المركز - - الجيب مقسومًا على جيب التمام، وهي النسبة نفسها لكل نقطة على الخط نفسه المار بالمركز + - 'θ: الزاوية عكس عقارب الساعة من الاتجاه الأفقي الموجب' + - 'sin θ: الإحداثي الرأسي بإشارته' + - 'cos θ: الإحداثي الأفقي بإشارته' + - 'tan θ: الإحداثي الرأسي مقسومًا على الأفقي، حيث تكون النسبة معرّفة' --- ## Try it -1. اسحب النقطة حول الدائرة وراقب قراءتي sin θ و cos θ تتغيران معًا. -2. اربّع كل قراءة واجمعهما ذهنيًا. يبقى المجموع 1 أينما وقفت النقطة. -3. اقسم sin θ على cos θ. قراءة tan θ تطابق الناتج تمامًا، لأن هذا القسمة هي تعريف الظل. +1. اضبط θ = 0°. الجيب 0 وجيب التمام 1، فيكون مجموع مربعيهما 1. +2. اضبط θ = 45°. تقارب القيمتان 0.7071، ومربع كل منهما نحو 0.5، فيكون المجموع 1 أيضًا. قد ينتج فرق حسابي صغير من تقريب القراءات. +3. اضبط θ على 115° ثم 205°. تتغير إشارات الإحداثيين، لكن مجموع مربعيهما يبقى 1. اقسم الجيب على جيب التمام للتحقق من الظل عندما لا يساوي جيب التمام صفرًا. ## Real-life examples -1. **لوح شمسي مائل 25°.** نسبة ارتفاعه sin 25° ≈ 0.42 لكل متر من اللوح. تعطيك المتطابقة نسبة امتداده الأفقي دون قياس ثانٍ: cos 25° = √(1 − 0.42²) ≈ 0.91. -2. **ذراع رافعة أُديرت إلى 115°.** بعد الرأسي مباشرة، نسبة الارتفاع لا تزال كبيرة، sin 115° ≈ 0.91، لكن نسبة الامتداد صارت سالبة، cos 115° ≈ −0.42. فالحمل الآن يتدلّى خلف قاعدة الرافعة. -3. **طبق استقبال أُدير إلى اتجاه 205°.** القراءتان سالبتان معًا، sin 205° ≈ −0.42 و cos 205° ≈ −0.91، لأن الطبق يشير إلى الخلف واليسار من وضعه الأصلي، ومع ذلك يبقى مجموع مربعيهما 1 تمامًا. +1. **الربع الأول.** عند 25°، الجيب نحو 0.4226 وجيب التمام نحو 0.9063. مربعاهما نحو 0.1786 و0.8214. +2. **الربع الثاني.** عند 115°، الجيب نحو 0.9063 وجيب التمام نحو −0.4226. يبقى مجموع المربعين 1، ويكون الظل سالبًا. +3. **الربع الثالث.** عند 205°، الجيب نحو −0.4226 وجيب التمام نحو −0.9063. نسبتهما موجبة رغم أن الإحداثيين سالبان. ## Test yourself -1. جِد زاوية يكون عندها tan θ يساوي 1 بالضبط. -2. جِد زاوية يكون عندها sin θ فوق 0.9 بينما cos θ صار سالبًا بالفعل. -3. جِد زاوية يكون عندها sin θ يساوي ±0.5 بالضبط بينما cos θ يبقى سالبًا. +1. اجعل الظل يختلف عن 1 بأقل من 0.02. +2. اجعل الجيب أكبر من 0.9 وجيب التمام سالبًا. +3. اجعل مربع الجيب يختلف عن 0.25 بأقل من 0.01، مع بقاء جيب التمام سالبًا. ## Intuition -النقطة على الشاشة لا تغادر الدائرة أبدًا، فهي دائمًا على بُعد خطوة واحدة بالضبط من المركز. حرّكها وراقب ظلّيها. فـ cos θ هو المسافة التي قطعتها جانبيًا، و sin θ هو المسافة التي صعدتها. هذان الظلّان ضلعا مثلث قائم الزاوية وتره نصف القطر نفسه، الثابت عند 1، وهذا وحده سبب بقاء مجموع مربعيهما عند 1 دائمًا. +تبقى النقطة على بعد وحدة واحدة من المركز. يتغير إحداثياها الأفقي والرأسي، لكن مربع المسافة يساوي دائمًا مربع الأفقي زائد مربع الرأسي. عندما نسمي الإحداثيين جيب التمام والجيب، نحصل على المتطابقة. لا تسبب الإحداثيات السالبة مشكلة؛ فمربعاتها موجبة. -أما الظل فسؤال مختلف. فهو لا يسأل كم تحركت النقطة، بل كم انحدر الخط من المركز إليها. هذا الانحدار هو الارتفاع على الامتداد، أي sin θ على cos θ، ويبقى نفسه لأي نقطة أخرى تجدها أبعد على الخط نفسه. لهذا يكبر tan θ كثيرًا فوق 1 رغم أن sin θ و cos θ لا يتجاوزان 1 أبدًا. +تصح المتطابقة لكل مدخل مسموح، بينما تختار معادلة مثل «الجيب يساوي 0.5» زوايا محددة. يقدم الرسم أمثلة على المتطابقة، وتشرح معادلة الدائرة سبب صحتها لكل الزوايا. أما الظل فيستخدم نسبة الإحداثيين لوصف ميل الخط المار بالمركز والنقطة. ## Formal -لأي زاوية θ، تقع النقطة $(\cos\theta, \sin\theta)$ على دائرة نصف قطرها 1، لذا فإن $\sin^2\theta + \cos^2\theta = 1$ لكل θ، وهذه متطابقة فيثاغورس. +لكل زاوية حقيقية θ، لدينا $\sin^2\theta+\cos^2\theta=1$. تعني $\sin^2\theta$ هنا $[\sin\theta]^2$، لا جيب مربع الزاوية. تتراوح كل قيمة للجيب وجيب التمام بين −1 و1. -الظل يُعرَّف من النقطة نفسها مباشرة: $\tan\theta = \dfrac{\sin\theta}{\cos\theta}$، وهو غير معرَّف إلا حيث $\cos\theta = 0$. +عندما يكون $\cos\theta\ne0$، فإن $\tan\theta=\sin\theta/\cos\theta$. بإعادة ترتيب المتطابقة الأولى نحصل على $\cos\theta=\pm\sqrt{1-\sin^2\theta}$، ويحدد الربع الإشارة. معرفة الجيب وحده لا تحدد إشارة جيب التمام دائمًا. ## Advanced -بما أن طول $(\cos\theta, \sin\theta)$ يساوي 1 دائمًا، فهو بالضبط نوع المتجه الذي تحتاجه أعمدة مصفوفة الدوران لتحافظ على المسافات، وهذه المتطابقة هي ما يضمن ألا يمدّ الدوران شكلًا يديره ولا يقلّصه. +نقسم متطابقة فيثاغورس على مربع جيب التمام، بشرط ألا يساوي صفرًا، فنحصل على 1 + tan² θ = 1/cos² θ. الشرط ضروري؛ فلا تجعل القسمة المتطابقة الناتجة صالحة عند الزوايا التي ينعدم فيها المقام. ## Derivation -1. أي نقطة على دائرة نصف قطرها 1 تحقق $x^2 + y^2 = 1$، لأن هذه المسافة عن المركز هي تعريف الدائرة نفسه. -2. اكتب إحداثيي تلك النقطة بالصيغة $x = \cos\theta$ و $y = \sin\theta$، فتتحول معادلة الدائرة مباشرة إلى $\sin^2\theta + \cos^2\theta = 1$. -3. الإحداثيان نفسهما يعطيان انحدار الخط $y/x$، وهو بالضبط $\tan\theta = \sin\theta / \cos\theta$. +1. مربع بعد النقطة (x, y) عن الأصل هو x² + y². يساوي هذا المقدار 1 على دائرة الوحدة. +2. نعوّض بجيب التمام عن x وبالجيب عن y، فنحصل على متطابقة فيثاغورس. +3. عندما لا يساوي الإحداثي الأفقي صفرًا، يكون الميل y/x هو الجيب مقسومًا على جيب التمام، وهذا تعريف الظل. ## Real world -### توحيد الاتجاه -تخزّن أنظمة GPS وألعاب الفيديو الاتجاه على هيئة $(\cos\theta,\sin\theta)$، وتستخدم البرمجيات هذه المتطابقة لتتأكد أن متجه الاتجاه لم ينزلق عن الطول 1 بعد دورانات متكررة. +### التحقق من متجه اتجاه -### تحليل قوة -يعرف المهندس زاوية كابل وقوة شدّه الأفقية، فيستخرج القوة الرأسية من المتطابقة وحدها دون قياسها مباشرة. +طول المتجه (cos θ, sin θ) يساوي 1. إذا ضربناه في مسافة مطلوبة، حصلنا على إزاحة بذلك الطول في الاتجاه المختار. -### التيار المتردد -يركب جهد التيار الكهربائي وتياره على حدّي $\sin(\omega t)$ و $\cos(\omega t)$، وتُبقي المتطابقة قدرتهما اللحظية المجموعة ضمن غلاف ثابت بدل أن تنزلق. +### حساب مركبة مجهولة -### الميل والانحدار -ظل الطريق، أي ميله، وجيب وجيب تمام زاوية انحداره ثلاثة أوجه للتل نفسه، فينتقل المساحون بينها بهاتين المتطابقتين. +إذا كانت المركبة الرأسية لمتجه وحدة 0.6، كانت مركبته الأفقية 0.8 أو −0.8. يحدد الاتجاه الإشارة، وتعطي المتطابقة المقدار. diff --git a/content/lessons/trigonometry/trig-identities/en.md b/content/lessons/trigonometry/trig-identities/en.md index f8116aa0..4f80f9af 100644 --- a/content/lessons/trigonometry/trig-identities/en.md +++ b/content/lessons/trigonometry/trig-identities/en.md @@ -1,68 +1,61 @@ --- title: The Pythagorean and tangent identities -summary: >- - Square a point's up-distance and its across-distance on a circle of radius - 1, add them, and you always get exactly 1 — and dividing one by the other - gives the tangent. +summary: 'Explain why sine squared plus cosine squared is always 1, and relate tangent to the same coordinates.' parameters: - theta: angle θ + theta: 'θ — angle in degrees' variables: - - the angle you have swept around the circle, measured from the 3 o'clock direction - - the point's height above the centre line - - the point's distance sideways from the centre - - sine divided by cosine, the same ratio for every point on the same line through the centre + - 'θ: angle counterclockwise from the positive horizontal axis' + - 'sin θ: signed vertical coordinate' + - 'cos θ: signed horizontal coordinate' + - 'tan θ: vertical coordinate divided by horizontal coordinate, when defined' --- ## Try it -1. Drag the point around the circle and watch the readouts sin θ and cos θ change together. -2. Square each one and add them in your head: the total stays 1 no matter where the point sits. -3. Divide sin θ by cos θ. The tan θ readout matches exactly, because that division is what tangent means. +1. Set θ = 0°. Sine is 0 and cosine is 1, so their squared values add to 1. +2. Set θ = 45°. Both values are about 0.7071. Each square is about 0.5, again giving 1. Rounded readouts may introduce a small arithmetic error. +3. Set θ = 115°, then 205°. Coordinate signs change, but the squares still add to 1. Divide sine by cosine to check the tangent where cosine is nonzero. ## Real-life examples -1. **A solar panel tilted 25°.** Its rise fraction is sin 25° ≈ 0.42 for every metre of panel. The identity gives the run fraction without a second measurement: cos 25° = √(1 − 0.42²) ≈ 0.91. -2. **A crane arm swung to 115°.** Past straight up, the height fraction is still large, sin 115° ≈ 0.91, but the reach fraction has turned negative, cos 115° ≈ −0.42: the load now hangs behind the crane's base. -3. **A dish rotated to bearing 205°.** Both readouts are negative, sin 205° ≈ −0.42 and cos 205° ≈ −0.91, since the dish points back and to the left of home — yet squared and added they still make exactly 1. +1. **First quadrant.** At 25°, sine is about 0.4226 and cosine about 0.9063. Their squares are about 0.1786 and 0.8214. +2. **Second quadrant.** At 115°, sine is about 0.9063 and cosine about −0.4226. The squared values still sum to 1; tangent is negative. +3. **Third quadrant.** At 205°, sine is about −0.4226 and cosine about −0.9063. Their ratio is positive even though both coordinates are negative. ## Test yourself -1. Find an angle where tan θ equals 1 exactly. -2. Find an angle where sin θ is above 0.9 but cos θ has already turned negative. -3. Find an angle where sin θ is exactly ±0.5 while cos θ stays negative. +1. Make tangent differ from 1 by less than 0.02. +2. Make sine greater than 0.9 and cosine negative. +3. Make sine squared differ from 0.25 by less than 0.01 while cosine is negative. ## Intuition -The point on screen never leaves the circle, so it is always exactly 1 step from the centre. Drag it and watch its two shadows: cos θ is how far sideways it has moved, sin θ is how far up. Those two shadows are the legs of a right triangle whose hypotenuse is the radius itself, fixed at 1 — which is the whole reason squaring and adding them always lands back on 1. +The point stays one unit from the centre. Its horizontal and vertical coordinates vary, but the squared distance is always the horizontal coordinate squared plus the vertical coordinate squared. Calling those coordinates cosine and sine gives the identity. Negative coordinates cause no problem because their squares are positive. -Tangent is a different question: not how far the point has moved, but how steep the line from the centre to the point is. That steepness is rise over run, sin θ over cos θ, and it stays the same for any point you'd find further out along the same line — which is why tan θ can grow far larger than 1 even though sin θ and cos θ never can. +An identity holds for every permitted input, whereas an equation such as sine equals 0.5 selects particular angles. The diagram offers examples of the identity; the circle equation explains why it must hold for all angles. Tangent uses the ratio of the same coordinates to describe the slope of the line through the centre and the point. ## Formal -For any angle θ, the point $(\cos\theta, \sin\theta)$ lies on the circle of radius 1, so $\sin^2\theta + \cos^2\theta = 1$ for every θ — the Pythagorean identity. +For every real angle θ, $\sin^2\theta+\cos^2\theta=1$. Here $\sin^2\theta$ means $[\sin\theta]^2$, not sine of the squared angle. Each sine and cosine value lies between −1 and 1. -Tangent is defined directly from the same point: $\tan\theta = \dfrac{\sin\theta}{\cos\theta}$, undefined only where $\cos\theta = 0$. +Where $\cos\theta\ne0$, $\tan\theta=\sin\theta/\cos\theta$. Rearranging the first identity gives $\cos\theta=\pm\sqrt{1-\sin^2\theta}$; the quadrant determines the sign. Knowing sine alone does not always determine cosine's sign. ## Advanced -Because $(\cos\theta, \sin\theta)$ always has length 1, it is exactly the kind of vector a rotation matrix needs in its columns to preserve distances; the identity is what guarantees a rotation never stretches or shrinks anything it turns. +Divide the Pythagorean identity by cosine squared, only where cosine is nonzero, to obtain 1 + tan² θ = 1/cos² θ. Conditions matter: division cannot extend the resulting identity to angles where its denominator vanishes. ## Derivation -1. Any point on a circle of radius 1 satisfies $x^2 + y^2 = 1$, since that distance-from-centre is the circle's whole definition. -2. Writing that point's coordinates as $x = \cos\theta$ and $y = \sin\theta$ turns the circle equation directly into $\sin^2\theta + \cos^2\theta = 1$. -3. The same coordinates give the line's steepness $y/x$, which is exactly $\tan\theta = \sin\theta / \cos\theta$. +1. The squared distance of a point (x, y) from the origin is x² + y². On the unit circle this equals 1. +2. Substitute cosine for x and sine for y to obtain the Pythagorean identity. +3. For a nonzero horizontal coordinate, the slope y/x is sine divided by cosine, which defines tangent. ## Real world -### Normalising a direction -GPS and game engines store headings as $(\cos\theta,\sin\theta)$; the identity is how software checks that a direction vector hasn't drifted off length 1 after repeated rotations. +### Checking a direction vector -### Resolving a force -An engineer who knows a cable's angle and its horizontal pull can recover the vertical pull from the identity alone, without measuring it directly. +The vector (cos θ, sin θ) has length 1. Multiplying it by a desired distance gives a displacement of that length in the chosen direction. -### AC power -Mains voltage and current both ride on $\sin(\omega t)$ and $\cos(\omega t)$ terms; the identity keeps their combined instantaneous power tied to a fixed envelope instead of drifting. +### Recovering a component -### Grade and slope -A road's tangent (its grade) and the sine and cosine of its incline angle are three views of the same hill, so surveyors move between them with these two identities. +If a unit vector has vertical component 0.6, its horizontal component is either 0.8 or −0.8. Direction information selects the sign; the identity supplies the magnitude. From b92e1b3455b6652030d4d1490e8a15d4e950d80c Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:34:17 +0300 Subject: [PATCH 059/124] content: rewrite unit-circle for first-time learners in both languages --- .../lessons/trigonometry/unit-circle/ar.md | 59 +++++++++--------- .../lessons/trigonometry/unit-circle/en.md | 60 +++++++++---------- 2 files changed, 54 insertions(+), 65 deletions(-) diff --git a/content/lessons/trigonometry/unit-circle/ar.md b/content/lessons/trigonometry/unit-circle/ar.md index e134ee3c..412c1d93 100644 --- a/content/lessons/trigonometry/unit-circle/ar.md +++ b/content/lessons/trigonometry/unit-circle/ar.md @@ -1,66 +1,61 @@ --- title: دائرة الوحدة -summary: >- - الجيب وجيب التمام هما ببساطة إحداثيا نقطة تتحرك حول دائرة نصف قطرها 1. +summary: 'تعرّف إلى الجيب وجيب التمام من إحداثيي نقطة على دائرة نصف قطرها 1، وافهم متى تكون قيمتهما سالبة.' parameters: - theta: الزاوية θ + theta: 'θ — الزاوية بالدرجات' variables: - - الزاوية الممسوحة عكس اتجاه عقارب الساعة بدءًا من محور x الموجب - - الإحداثي السيني للنقطة على دائرة الوحدة - - الإحداثي الصادي للنقطة على دائرة الوحدة - - sin θ مقسومًا على cos θ، وغير معرَّف حيث cos θ = 0 + - 'θ: الزاوية عكس عقارب الساعة من الاتجاه الأفقي الموجب' + - 'cos θ: الإحداثي الأفقي بإشارته' + - 'sin θ: الإحداثي الرأسي بإشارته' + - 'tan θ: الجيب مقسومًا على جيب التمام، عندما لا يساوي جيب التمام صفرًا' --- ## Try it -1. اسحب النقطة حول الدائرة. الشريط الأخضر ارتفاعها، وهذا هو الجيب sin. -2. الشريط الأزرق بُعدها نحو اليمين، وهذا هو جيب التمام cos. -3. راقب الموجة على اليمين ترسم نفسها وأنت تدور. الموجة مجرد دائرة تُرى عبر الزمن. +1. اضبط θ على 0°، ثم على 90°. تنتقل النقطة من (1, 0) إلى (0, 1). جيب التمام هو إحداثيها الأفقي، والجيب إحداثيها الرأسي. +2. اختر θ = 225°. تقع النقطة يسار المركز وأسفله، لذلك يكون الإحداثيان سالبين. +3. اسحب النقطة حول الدائرة. تعرض النقطتان على المنحنيين قيمتي الإحداثيين عند الزاوية المختارة. ويصل الخط المتقطع بين نقطتين لهما الارتفاع نفسه على الدائرة ومنحنى الجيب. ## Real-life examples -1. **عقارب الساعة عند الربع.** يشير عقرب الدقائق عند 90° إلى أعلى نقطة تمامًا، حيث تقع النقطة على الدائرة عند أعلى ارتفاع لها. -2. **اتجاه بوصلة جنوب غربي.** اتجاه بوصلة قدره 225° يشير إلى أسفل ويسار، حيث يكون البعدان الأفقي والرأسي عن المركز سالبين معًا. -3. **عربة دولاب هواء قرب القمة.** عربة دارت 80° حول الدولاب تقترب من القمة تمامًا، فهي قريبة جدًا من أعلى نقطة تبلغها. +1. **ربع دورة.** عند 90° تصل النقطة إلى أعلى الدائرة، فيكون جيب التمام 0 والجيب 1. يبدأ قياس الزاوية هنا من جهة اليمين ويزداد عكس عقارب الساعة. +2. **يسار المركز وأسفله.** عند 225° يساوي كل إحداثي نحو −0.707. نقيس الزاوية بالطريقة الرياضية، بخلاف اتجاه البوصلة الذي يقاس مع عقارب الساعة بدءًا من الشمال. +3. **قرب القمة.** عند 80° يبلغ الإحداثي الرأسي نحو 0.985 والأفقي نحو 0.174. ويبقى نصف القطر 1. ## Test yourself -1. جِد زاوية يكون عندها ارتفاع النقطة (sin θ) يساوي 0.5. -2. تجاوز 180° وأبقِ البعد الأفقي (cos θ) مع ذلك فوق 0.5. -3. انزل إلى المنطقة التي يكون فيها الارتفاع والبعد الأفقي سالبين معًا. +1. أوجد زاوية جيبها 0.5. +2. اختر زاوية أكبر من 180° ويكون جيب تمامها أكبر من 0.5. +3. أوجد زاوية يكون جيبها وجيب تمامها سالبين. ## Intuition -حرّك النقطة حول محيط الدائرة. بُعدها الأفقي عن المركز هو $\cos\theta$، وبُعدها الرأسي هو $\sin\theta$. أنت لا تحفظ جدولًا هنا، بل تشاهد ظلَّين تلقيهما نقطة واحدة تدور. +تخيّل نقطة تتحرك على دائرة نصف قطرها 1. عند أقصى اليمين تكون إحداثياتها (1, 0)، وعند أعلى الدائرة تصبح (0, 1). نسمي إحداثيها الأفقي $\cos\theta$، أي جيب التمام، وإحداثيها الرأسي $\sin\theta$، أي الجيب. للإشارة معنى: الإحداثي الأفقي سالب يسار المركز، والرأسي سالب أسفله. -وأثناء تحريكك، يرسم الموج على اليمين نفسه تلقائيًا. ويوضّح الخط المتقطع الرابط السبب. فارتفاع النقطة على الدائرة يساوي تمامًا ارتفاع النقطة على منحنى الجيب، والجيب وجيب التمام هما الدائرة وقد فُرِدت على خط زمني مستقيم. +يسجل المنحنيان المجاوران هذين الإحداثيين مقابل الزاوية. محورهما الأفقي يمثل الزاوية، لا الزمن. وإذا دارت النقطة بمعدل ثابت، ازدادت الزاوية بانتظام مع الزمن، وأمكن استخدام الشكلين نفسيهما لوصف حركتها الأفقية والرأسية مع الزمن. بعد دورة كاملة يعود الإحداثيان إلى قيمتي البداية. ## Formal -بالنسبة لنقطة $(\cos\theta, \sin\theta)$ على دائرة الوحدة، $\theta$ هي الزاوية بالراديان مقيسة عكس اتجاه عقارب الساعة من المحور $x$ الموجب. +مركز دائرة الوحدة (0, 0) ونصف قطرها 1. إذا قسنا الزاوية θ عكس عقارب الساعة من الاتجاه الأفقي الموجب، كانت إحداثيات النقطة $(\cos\theta,\sin\theta)$. يستخدم المنزلق الدرجات؛ والدورة الكاملة 360°، أو $2\pi$ راديان. -ولأن النقطة تقع دائمًا على بُعد 1 من نقطة الأصل، فإن $\sin^2\theta + \cos^2\theta = 1$ لكل قيمة من $\theta$. +من معادلة الدائرة نحصل على $\cos^2\theta+\sin^2\theta=1$. تتراوح قيمة كل إحداثي بين −1 و1. أما الظل فهو $\tan\theta=\sin\theta/\cos\theta$ عندما لا يساوي المقام صفرًا؛ ولذلك لا يكون معرّفًا عند 90° و270° في الدورة المعروضة. ## Advanced -تجمع صيغة أويلر الإحداثيين معًا، $e^{i\theta} = \cos\theta + i\sin\theta$. يصبح جمع الزوايا ضربًا للأسس، و$\sin$ و$\cos$ هما حلّا المعادلة $y'' = -y$. وهذا سبب ظهورهما في كل حركة اهتزازية. +لدائرة نصف قطرها r نضرب الإحداثيين في r. وإذا كان مركزها (a, b) نضيف إحداثيي المركز، فنحصل على $(a+r\cos\theta,b+r\sin\theta)$. يحدد نصف القطر حجم الدائرة، وتحدد الزاوية موضع النقطة حولها. ## Derivation -1. تقع النقطة على دائرة نصف قطرها 1، فإحداثياها يشكّلان ضلعي مثلث قائم الزاوية وترها يساوي 1. -2. عرِّف جيب التمام والجيب بأنهما بالضبط هذان الإحداثيان، أي المجاور على الوتر والمقابل على الوتر، مع وتر يساوي 1. -3. عوّض بهذين التعريفين في معادلة الدائرة، فتحصل على متطابقة فيثاغورس الصحيحة لكل زاوية دفعة واحدة. +1. تحقق كل نقطة على دائرة نصف قطرها 1 معادلة الدائرة. وتربيع الإحداثيين يجعل العلاقة صحيحة في الأرباع كلها. +2. نسمي الإحداثي الأفقي جيب التمام والإحداثي الرأسي الجيب. +3. نعوّض بهذين الاسمين في معادلة الدائرة فنحصل على المتطابقة. ## Real world -### الصوت -النغمة الموسيقية النقية موجة جيبية في ضغط الهواء عبر الزمن. ودائرة الوحدة هي الآلة التي تولّدها. +### الحركة الدائرية -### الكهرباء المتناوبة -يتذبذب جهد التيار الكهربائي في المصدر على شكل $\sin(\omega t)$ لأن ملفًا يدور بسرعة زاوية ثابتة ينتجه. +إذا وضعنا علامة على عجلة، أعطانا الجيب وجيب التمام إزاحتها عن المركز في اتجاهين متعامدين. -### الدوران -أي نقطة على عجلة أو ترس يدور ترسم الجيب وجيب التمام في موضعها الأفقي والرأسي عبر الزمن. +### رسم دائرة بالحاسوب -### الملاحة -التحويل بين الاتجاه والمسافة وإحداثيات الخريطة يستخدم الجيب وجيب التمام مباشرة. +يحسب البرنامج نقاطًا متتابعة بزيادة الزاوية وحساب الإحداثيين. ووصل النقاط المتقاربة يعطي تقريبًا لشكل الدائرة. diff --git a/content/lessons/trigonometry/unit-circle/en.md b/content/lessons/trigonometry/unit-circle/en.md index 7b68421b..aae15af5 100644 --- a/content/lessons/trigonometry/unit-circle/en.md +++ b/content/lessons/trigonometry/unit-circle/en.md @@ -1,67 +1,61 @@ --- title: The unit circle -summary: >- - Sine and cosine are just the coordinates of a point walking around a circle of - radius 1. +summary: 'Use a point on a circle of radius 1 to understand sine, cosine and their signs.' parameters: - theta: angle θ + theta: 'θ — angle in degrees' variables: - - the angle swept counter-clockwise from the positive x-axis - - the x-coordinate of the point on the unit circle - - the y-coordinate of the point on the unit circle - - 'sin θ divided by cos θ, undefined where cos θ = 0' + - 'θ: angle counterclockwise from the positive horizontal axis' + - 'cos θ: signed horizontal coordinate' + - 'sin θ: signed vertical coordinate' + - 'tan θ: sine divided by cosine, when cosine is nonzero' --- ## Try it -1. Drag the point around the circle. The green bar is its height: that is sin. -2. The blue bar is how far right it is: that is cos. -3. Watch the wave on the right draw itself as you go round. A wave is just a circle seen over time. +1. Set θ to 0°, then 90°. The point moves from (1, 0) to (0, 1). Read cosine as its horizontal coordinate and sine as its vertical coordinate. +2. Set θ to 225°. The point is left of and below the centre, so both coordinates are negative. +3. Drag around the circle. The dots on the two curves show the coordinates at the selected angle; the dashed connector joins equal heights on the circle and sine graph. ## Real-life examples -1. **Clock hands at quarter past.** The minute hand points straight up at 90°, where the point on the circle sits exactly at its highest. -2. **Compass bearing southwest.** A bearing of 225° points down and to the left, where both the horizontal and vertical distances from the centre are negative. -3. **Ferris wheel near the top.** A car that has swung 80° around the wheel is close to the very top, nearly as high as it will get. +1. **A quarter-turn.** At 90° the point is at the top: cosine is 0 and sine is 1. Angles here start at the right and increase counterclockwise. +2. **Down and left.** At 225° both coordinates are approximately −0.707. This uses mathematical angles, rather than compass bearings measured clockwise from north. +3. **Near the top.** At 80° the vertical coordinate is about 0.985 and the horizontal coordinate about 0.174. The radius remains 1. ## Test yourself -1. Find an angle where the height of the point (sin θ) equals 0.5. -2. Go past 180° yet keep the horizontal distance (cos θ) above 0.5. -3. Land in the region where both the height and the horizontal distance are negative. +1. Find an angle whose sine is 0.5. +2. Choose an angle greater than 180° whose cosine is greater than 0.5. +3. Find an angle with both sine and cosine negative. ## Intuition -Drag the point around the rim of the circle. Its horizontal distance from the centre is $\cos\theta$, its vertical distance is $\sin\theta$ — you are not memorising a table, you are watching two shadows cast by one spinning point. +Imagine a point moving around a circle of radius 1. At the rightmost point its coordinates are (1, 0); at the top they are (0, 1). We call its horizontal coordinate $\cos\theta$ and its vertical coordinate $\sin\theta$. These are signed coordinates: left of the centre is negative horizontally, and below it is negative vertically. -As you drag, the wave on the right traces itself out. The dashed connector shows why: the height of the point on the circle is exactly the height of the dot on the sine curve. Sine and cosine are the circle unrolled onto a straight timeline. +The adjacent graphs record these coordinates against angle. Their horizontal axis is angle, not time. If the point rotates at a constant rate, angle also increases steadily with time, and the same shapes describe its horizontal and vertical motion over time. One full turn returns both coordinates to their starting values. ## Formal -For a point $(\cos\theta, \sin\theta)$ on the unit circle, $\theta$ is the angle in radians measured counter-clockwise from the positive $x$-axis. +The unit circle has centre (0, 0) and radius 1. At angle θ measured counterclockwise from the positive horizontal axis, its point is $(\cos\theta,\sin\theta)$. This control uses degrees; one turn is 360°, or $2\pi$ radians. -Because the point always lies at distance 1 from the origin, $\sin^2\theta + \cos^2\theta = 1$ for every value of $\theta$. +The circle equation gives $\cos^2\theta+\sin^2\theta=1$. Both coordinates lie between −1 and 1. The tangent is $\tan\theta=\sin\theta/\cos\theta$ when the denominator is nonzero; it is undefined at 90° and 270° in the displayed turn. ## Advanced -Euler’s formula packages both coordinates: $e^{i\theta} = \cos\theta + i\sin\theta$. Angle addition becomes multiplication of exponentials, and $\sin$, $\cos$ are the solutions of $y'' = -y$ — which is why they appear in every oscillation. +For radius r, multiply both coordinates by r. For a centre (a, b), add those coordinates: the point is $(a+r\cos\theta,b+r\sin\theta)$. The radius sets the scale while the angle sets the position around the circle. ## Derivation -1. The point sits on a circle of radius 1, so its coordinates form the legs of a right triangle whose hypotenuse is 1. -2. Define cosine and sine as exactly those coordinates: adjacent over hypotenuse and opposite over hypotenuse, with hypotenuse 1. -3. Substituting the definitions back into the circle equation gives the Pythagorean identity — true for every angle, all at once. +1. Every point on a circle of radius 1 satisfies the circle equation. Squaring the coordinates accounts for points in every quadrant. +2. Name the horizontal coordinate cosine and the vertical coordinate sine. +3. Substitute these names into the circle equation to obtain the identity. ## Real world -### Sound -A pure musical tone is a sine wave in air pressure over time; the unit circle is the machine that generates it. +### Circular motion -### AC electricity -Mains voltage oscillates as $\sin(\omega t)$ because it is produced by a coil rotating at constant angular speed. +For a marked point on a wheel, sine and cosine give its displacement from the centre along two perpendicular directions. -### Rotation -Any point on a spinning wheel or gear traces out sine and cosine in its horizontal and vertical position over time. +### Drawing a circle -### Navigation -Converting between a bearing-and-distance and map coordinates uses sine and cosine directly. +A graphics program can calculate successive points by increasing the angle and using the two coordinates. Connecting nearby points approximates the circle. From 4eebd0bcadb079e9955d510775d2b49347b3c05e Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:34:17 +0300 Subject: [PATCH 060/124] content: rewrite vector-components for first-time learners in both languages --- .../trigonometry/vector-components/ar.md | 59 ++++++++---------- .../trigonometry/vector-components/en.md | 61 ++++++++----------- 2 files changed, 54 insertions(+), 66 deletions(-) diff --git a/content/lessons/trigonometry/vector-components/ar.md b/content/lessons/trigonometry/vector-components/ar.md index e8012273..8f3afa18 100644 --- a/content/lessons/trigonometry/vector-components/ar.md +++ b/content/lessons/trigonometry/vector-components/ar.md @@ -1,66 +1,61 @@ --- title: تحليل متجه إلى مركّبتين -summary: >- - الحبل المشدود بزاوية: جزء من شدّه يسحب إلى الأمام وجزء يرفع. الجيب وجيب التمام يقسمانه. +summary: 'صف متجهًا واحدًا بمركبتين متعامدتين، أفقية ورأسية، باستخدام الجيب وجيب التمام.' parameters: - theta: θ — زاوية الحبل عن الأرض + theta: 'θ — زاوية الاتجاه فوق المحور الأفقي الموجب' variables: - - شد الحبل الكلي، أي توتره، ثابت في كل مثال - - الزاوية التي يصنعها الحبل مع الأرض - - جزء الشد الذي يسحب الحمل عبر الأرض - - جزء الشد الذي يرفع الحمل إلى أعلى + - 'F: مقدار المتجه؛ يستخدم الرسم القيمة 1' + - 'θ: الزاوية من الاتجاه الأفقي الموجب' + - 'Fₓ: المركبة الأفقية' + - 'Fᵧ: المركبة الرأسية' --- ## Try it -1. راقب قراءتي sin θ و cos θ. اضرب كلًّا منهما في توتر حبل حقيقي فتحصل على الجزء الصاعد والجزء الأفقي من شدّه. -2. ارفع θ من زاوية منخفضة. تصغر cos θ، فيسحب جزء أقل إلى الأمام، بينما تكبر sin θ، فيرتفع جزء أكبر ويُسحب أقل. -3. أنزل θ قرب 0° ثانية. يسحب الشد كله تقريبًا إلى الأمام، ولا يكاد شيء منه يرفع. +1. اضبط θ = 0°. جيب التمام 1 والجيب 0، فيتجه المتجه كاملًا على المحور الأفقي. +2. اضبط θ = 45°. تقارب كل مركبة لمتجه الوحدة 0.7071. مجموعهما العددي يتجاوز 1، لكن مجموع مربعيهما يساوي 1. +3. اضبط θ = 90°. تصبح المركبة الأفقية صفرًا والرأسية 1. في العرض ثلاثي الأبعاد، يظل المتجه ومركبتاه في مستوى واحد. ## Real-life examples -1. **حبل يسحب زلاجة بزاوية 15°، وتوتره 60 نيوتن.** يسحب منه cos 15° ≈ 0.97 إلى الأمام، أي نحو 58 نيوتن، ولا يرفع سوى sin 15° ≈ 0.26، أي نحو 16 نيوتن، لرفعها قليلًا عن الثلج. -2. **خيط طائرة ورقية بزاوية 45°، وتوتره 20 نيوتن.** ينقسم الشد شبه متساوٍ، نحو 14 نيوتن إلى الأمام و14 نيوتن إلى أعلى. -3. **كرة رُكلت بزاوية 70° وسرعة 15 m/s.** يذهب معظم تلك السرعة، sin 70° ≈ 0.94، أي نحو 14 m/s، إلى أعلى مباشرة، ولا يحملها إلى الأمام سوى cos 70° ≈ 0.34، أي نحو 5 m/s. +1. **قوة 60 نيوتن بزاوية 15°.** مركبتها الأفقية نحو 57.96 نيوتن، والصاعدة نحو 15.53 نيوتن. تصفان قوة واحدة؛ ولا تكفي مركبة صاعدة وحدها للحكم بأن جسمًا سينفصل عن السطح. +2. **قوة 20 نيوتن بزاوية 45°.** تبلغ كل مركبة نحو 14.14 نيوتن. تساوي المركبتين لا يعني أن مقدار كل منهما نصف مقدار القوة. +3. **سرعة 15 م/ث بزاوية 70°.** المركبة الأفقية نحو 5.13 م/ث، والصاعدة نحو 14.10 م/ث. تنطبق الهندسة نفسها على السرعة المتجهة والقوة. ## Test yourself -1. جِد الزاوية التي يذهب عندها 87% من الشد إلى الأمام (cos θ ≈ 0.87). -2. جِد زاوية يرتفع عندها أكثر من 90% من الشد إلى أعلى. -3. جِد الزاوية التي تقسم الشد بالتساوي تمامًا بين الأمام والأعلى. +1. اجعل المركبة الأفقية لمتجه الوحدة نحو 0.87. +2. اجعل مركبته الرأسية أكبر من 0.9، مع بقاء الأفقية موجبة. +3. اجعل الفرق بين مركبتي متجه الوحدة أقل من 0.02 بالقيمة المطلقة. ## Intuition -تخيل الحبل وقد صغُر إلى طول 1. هذا الحبل المصغّر هو بالضبط السهم على الشاشة، وcos θ وsin θ هما جزءا الشد الحقيقي اللذان يذهبان أفقيًا ورأسيًا. حبل توتره 60 نيوتن بزاوية 15° يسحب إلى الأمام بـ 60 × cos 15° نيوتن ويرفع بـ 60 × sin 15° نيوتن. القراءتان تحسبان النسبة، وأنت تزوّدهما بالقوة الحقيقية. +يمكن وصف سهم مائل بمقدار ابتعاد نهايته أفقيًا ورأسيًا عن بدايته. هذان المقداران بإشارتيهما هما مركبتاه. يستخدم العرض سهمًا طوله 1: يعطي جيب التمام المركبة الأفقية، ويعطي الجيب المركبة الرأسية. لقوة ذات مقدار مختلف، نضرب القراءتين في ذلك المقدار. -حين ترفع θ فأنت تستبدل مهمة بأخرى، رفع أكثر مقابل سحب أقل. لهذا يبقي من يجرّ زلاجة زاوية الحبل منخفضة. فكل درجة يصعدها الحبل تسرق قليلًا من السحب الأمامي وتمنحه لرفع لا فائدة منه على أرض مستوية. +عند 45° تكون مركبتا قوة مقدارها 20 نيوتن نحو 14.14 نيوتن لكل منهما. جمع العددين يعطي 28.28، لكن اتجاهيهما متعامدان. مقدار مجموعهما المتجهي هو 20 نيوتن. تحليل القوة يغيّر وصفها، لا القوة نفسها؛ وتتوقف فائدة كل مركبة على الموقف. ## Formal -شدّ مقداره F بزاوية θ عن خط مرجعي ينقسم إلى $F_x = F\cos\theta$ على طول ذلك الخط و $F_y = F\sin\theta$ عموديًا عليه. +لمقدار $F\geq0$ وزاوية θ مقيسة من الاتجاه الأفقي الموجب، يكون $F_x=F\cos\theta$ و$F_y=F\sin\theta$. يغطي المنزلق 0° إلى 90°، حيث المركبتان غير سالبتين. يمثل الرسم الحالة F = 1، وتقدم الأمثلة مقادير أخرى. -ولأن $\cos^2\theta+\sin^2\theta=1$، يعيد الجزءان تكوين الحجم الأصلي دائمًا: $F_x^2+F_y^2=F^2$. +تجتمع المركبتان المتعامدتان وفق $F_x^2+F_y^2=F^2$، ومنه $F=\sqrt{F_x^2+F_y^2}$. تحمل المركبات وحدة المتجه نفسها: نيوتن للقوة، ومترًا في الثانية للسرعة. خارج الربع المعروض، تشير المركبة السالبة إلى الاتجاه المعاكس لمحورها. ## Advanced -ينطبق التحليل نفسه على أي متجه، لا القوة وحدها، كالسرعة والإزاحة والمجال الكهربائي، لأنه في جوهره إسقاط على اتجاهين مرجعيين متعامدين. وإذا اخترت اتجاهين متعامدين مختلفين حصلت على مركّبتين مختلفتين للمتجه الأساسي نفسه، وهو نفسه بلا تغيير. +يمكن اختيار محورين بمحاذاة سطح مائل وعموديًا عليه بدل الأفقي والرأسي. تتغير قيم المركبات بتغير المحاور، لكن المتجه ومقداره لا يتغيران. وقد تقلل المركبة الصاعدة لقوة سحب القوة العمودية بين الجسم والسطح والاحتكاك؛ لذلك ليست جهدًا ضائعًا بالضرورة. ## Derivation -1. يشكّل الحبل وجزؤه الأفقي وجزؤه الرأسي مثلثًا قائم الزاوية وتره F، فـ $\cos\theta = F_x/F$ و $\sin\theta = F_y/F$. -2. أعد ترتيب النسبة الأولى، فتحصل على الجزء الأفقي مباشرة: $F_x = F\cos\theta$. -3. أعد ترتيب الثانية، فتحصل على الجزء الرأسي: $F_y = F\sin\theta$. +1. لمتجه غير صفري في الربع المعروض، يشكل المتجه ومركبتاه المتعامدتان مثلثًا قائمًا وتره F. وعند نهايتي المحورين نستخدم القيم الحدية. +2. نضرب نسبة جيب التمام في F لنحصل على المركبة الأفقية. +3. نضرب نسبة الجيب في F لنحصل على المركبة الرأسية. تعطي الصيغ مركبتين صفريتين عندما تكون F صفرًا أيضًا، رغم أن الاتجاه حينها غير معرّف. ## Real world -### جرّ زلاجة أو عربة -من يجرّ يُبقي الحبل قريبًا من الأفق قدر استطاعته، لأن الزاوية المنخفضة تُرسل معظم جهده إلى الحركة الأمامية بدل الرفع. +### جمع قوى -### الإبحار -دفع الريح على شراع ينقسم إلى جزء يدفع القارب إلى الأمام وجزء يدفعه جانبيًا فقط، وهذا الجزء الجانبي يقاومه البحّارة بزعنفة القارب. +نحلل كل قوة إلى مركبتين، ثم نجمع المركبات الأفقية معًا والرأسية معًا، ونعيد تركيب الناتج لإيجاد المحصلة. -### المنحدرات والسطوح المائلة -جاذبية تسحب رأسيًا إلى أسفل تنقسم، بالنسبة إلى سطح منحدر، إلى جزء يضغط على المنحدر وجزء يُزلق جسمًا عليه إلى أسفل. +### نماذج المقذوفات -### إطلاق قذيفة -تنقسم سرعة مدفع أو كرة مقذوفة الابتدائية إلى جزء أفقي يحدد المسافة التي تقطعها وجزء رأسي يحدد ارتفاعها ومدة طيرانها. +في نموذج مثالي يهمل مقاومة الهواء، تحدد مركبتا السرعة الابتدائية السرعة الأفقية والسرعة الرأسية الابتدائية. يعتمد المدى الأفقي على السرعة الأفقية وزمن الطيران معًا، ويتأثر الزمن بالحركة الرأسية وارتفاع نقطة الهبوط. diff --git a/content/lessons/trigonometry/vector-components/en.md b/content/lessons/trigonometry/vector-components/en.md index 12ff6feb..3b110fcb 100644 --- a/content/lessons/trigonometry/vector-components/en.md +++ b/content/lessons/trigonometry/vector-components/en.md @@ -1,68 +1,61 @@ --- title: Splitting a vector into components -summary: >- - A rope pulling at an angle is never fully useful — part of its pull drags - forward, part of it wastes itself lifting, and sine and cosine tell you - exactly how the pull splits. +summary: 'Describe one vector by perpendicular horizontal and vertical components using sine and cosine.' parameters: - theta: θ — rope angle above the ground + theta: 'θ — direction above the positive horizontal axis' variables: - - the rope's total pull, its tension, fixed for each example - - the angle the rope makes with the ground - - the part of the pull dragging the load across the ground - - the part of the pull lifting the load upward + - 'F: vector magnitude; the diagram uses 1' + - 'θ: angle from the positive horizontal axis' + - 'Fₓ: horizontal component' + - 'Fᵧ: vertical component' --- ## Try it -1. Watch the readouts sin θ and cos θ. Multiply each by a rope's actual tension and you get the up part and the across part of its pull. -2. Drag θ up from a shallow angle. cos θ shrinks — less of the pull drags forward — while sin θ grows, lifting more and pulling less. -3. Bring θ back down near 0°. Almost the whole pull now drags forward; almost none of it lifts. +1. Set θ = 0°. Cosine is 1 and sine is 0, so the vector points entirely along the horizontal axis. +2. Set θ = 45°. Both components of the unit vector are about 0.7071. Their ordinary sum exceeds 1, but their squares add to 1. +3. Set θ = 90°. The horizontal component is zero and the vertical component is 1. In the 3D view, the vector and both components still lie in one plane. ## Real-life examples -1. **A rope pulling a sledge at 15°, tension 60 N.** cos 15° ≈ 0.97 of it drags forward, about 58 N; only sin 15° ≈ 0.26, about 16 N, lifts the sledge slightly off the snow. -2. **A kite string at 45°, tension 20 N.** The pull splits almost evenly: about 14 N forward and 14 N upward. -3. **A ball kicked at 70°, speed 15 m/s.** Most of that speed, sin 70° ≈ 0.94, about 14 m/s, goes straight up; only cos 70° ≈ 0.34, about 5 m/s, carries it forward. +1. **A 60 N force at 15°.** Its horizontal component is about 57.96 N and its upward component about 15.53 N. These describe one force; an upward component alone does not show whether an object lifts off a surface. +2. **A 20 N force at 45°.** Each component is about 14.14 N. Equal components do not mean half the force magnitude in each direction. +3. **A 15 m/s velocity at 70°.** The horizontal component is about 5.13 m/s and the upward component about 14.10 m/s. The same geometry applies to velocity as to force. ## Test yourself -1. Find the angle where 87% of the pull goes across (cos θ ≈ 0.87). -2. Find an angle where more than 90% of the pull goes upward. -3. Find the angle that splits the pull exactly evenly between across and up. +1. Make the horizontal component of the unit vector approximately 0.87. +2. Make its vertical component greater than 0.9 while keeping its horizontal component positive. +3. Make the two unit-vector components differ by less than 0.02. ## Intuition -Picture the rope shrunk down to length 1: that shrunk rope is exactly the arrow on screen, and cos θ and sin θ are the fractions of the real pull that go across and up. A 60 N rope at 15° drags forward with 60 × cos 15° newtons and lifts with 60 × sin 15° newtons — the readouts do the fraction, you supply the real strength. +A diagonal arrow can be described by how far its endpoint lies horizontally and vertically from its start. These two signed amounts are its components. The display uses an arrow of length 1: cosine gives the horizontal component and sine gives the vertical component. For a force of a different magnitude, multiply both readouts by that magnitude. -Raise θ and you are trading one job for the other: more lift, less drag. That is exactly why someone hauling a sledge keeps the rope angle low — every degree it climbs steals a little forward pull and hands it to a lift that does nothing useful against flat ground. +At 45°, a force of 20 N has components about 14.14 N and 14.14 N. Adding those numbers gives 28.28, but they act in perpendicular directions. Their vector sum has magnitude 20 N. Resolving a force changes its description, not the force itself; whether either component is useful depends on the situation. ## Formal -A pull of magnitude F at angle θ above a reference line splits into $F_x = F\cos\theta$ along that line and $F_y = F\sin\theta$ perpendicular to it. +For magnitude $F\geq0$ and angle θ measured from the positive horizontal axis, $F_x=F\cos\theta$ and $F_y=F\sin\theta$. This control covers 0° to 90°, where both components are nonnegative. The diagram shows the case F = 1; the examples supply other magnitudes. -Because $\cos^2\theta+\sin^2\theta=1$, the two parts always recombine to the original size: $F_x^2+F_y^2=F^2$. +Perpendicular components recombine through $F_x^2+F_y^2=F^2$, hence $F=\sqrt{F_x^2+F_y^2}$. Components carry the same units as the vector: newtons for force, metres per second for velocity. Outside the displayed quadrant, negative components indicate the opposite axis direction. ## Advanced -The same split works for any vector, not just a force — velocity, displacement, an electric field — because it is really a projection onto two perpendicular reference directions; choosing different perpendicular directions gives different components for the exact same underlying vector. +You can choose axes along and perpendicular to an inclined surface instead of horizontal and vertical. The component values change with the axes, but the vector and its magnitude remain the same. When a pulling force has an upward component, it may reduce the normal contact force and friction; it is not automatically wasted. ## Derivation -1. The rope, its across part and its up part form a right triangle with hypotenuse F, so $\cos\theta = F_x/F$ and $\sin\theta = F_y/F$. -2. Rearranging the first ratio gives the across part directly: $F_x = F\cos\theta$. -3. Rearranging the second gives the up part: $F_y = F\sin\theta$. +1. For a nonzero vector in the displayed quadrant, the vector and its perpendicular components form a right triangle with hypotenuse F. At the axis endpoints, use the limiting values. +2. Multiply the cosine ratio by F to obtain the horizontal component. +3. Multiply the sine ratio by F to obtain the vertical component. The component formulas also give zero components when F is zero, although its direction is then undefined. ## Real world -### Hauling a sledge or a cart -Whoever pulls keeps the rope as flat as they can, because a low angle sends nearly all their effort into forward motion instead of lift. +### Combining forces -### Sailing -The wind's push on a sail splits into a part that drives the boat forward and a part that only pushes it sideways, which sailors fight with the keel. +Resolve each force into components, add the horizontal components together and the vertical components together, then recombine to find the resultant. -### Ramps and inclined planes -Gravity pulling straight down splits, relative to a ramp's surface, into a part that presses into the ramp and a part that slides an object down it. +### Projectile models -### Launching a projectile -A cannon or a thrown ball's initial speed splits into a horizontal part that decides how far it travels and a vertical part that decides how high and how long it flies. +In an ideal model without air resistance, initial velocity components set horizontal speed and initial vertical speed. Horizontal range depends on both horizontal speed and the flight time, which also depends on vertical motion and landing height. From e938d1c5b5ce5b41faa56d673a67d5a117189e0c Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 11:34:17 +0300 Subject: [PATCH 061/124] docs: record completed bilingual Trigonometry review --- content/lessons/EDITORIAL_REVIEW.md | 32 ++++++++++++++--------------- content/lessons/STYLE.en.md | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/content/lessons/EDITORIAL_REVIEW.md b/content/lessons/EDITORIAL_REVIEW.md index 053f205a..f45cc062 100644 --- a/content/lessons/EDITORIAL_REVIEW.md +++ b/content/lessons/EDITORIAL_REVIEW.md @@ -1,6 +1,6 @@ # Bilingual editorial review -68 of 390 lessons reviewed. 322 remain. +81 of 390 lessons reviewed. 309 remain. A checked lesson has had both language files rewritten or reviewed against its configuration and visualization source. Automated validation alone does not mark a lesson reviewed. Browser interaction and independent learner review remain separate checks. @@ -446,21 +446,21 @@ Scope: every lesson, including summaries, parameter labels, examples, exercises, - [ ] [thermal-conductivity-and-insulation](thermodynamics/thermal-conductivity-and-insulation/en.md) · [Arabic](thermodynamics/thermal-conductivity-and-insulation/ar.md) - [ ] [thermal-expansion](thermodynamics/thermal-expansion/en.md) · [Arabic](thermodynamics/thermal-expansion/ar.md) -## trigonometry (0/13) - -- [ ] [angles-of-elevation-and-depression](trigonometry/angles-of-elevation-and-depression/en.md) · [Arabic](trigonometry/angles-of-elevation-and-depression/ar.md) -- [ ] [cosine-rule](trigonometry/cosine-rule/en.md) · [Arabic](trigonometry/cosine-rule/ar.md) -- [ ] [degrees-and-radians](trigonometry/degrees-and-radians/en.md) · [Arabic](trigonometry/degrees-and-radians/ar.md) -- [ ] [inverse-trig-functions](trigonometry/inverse-trig-functions/en.md) · [Arabic](trigonometry/inverse-trig-functions/ar.md) -- [ ] [polar-coordinates](trigonometry/polar-coordinates/en.md) · [Arabic](trigonometry/polar-coordinates/ar.md) -- [ ] [sine-function-parameters](trigonometry/sine-function-parameters/en.md) · [Arabic](trigonometry/sine-function-parameters/ar.md) -- [ ] [sine-rule](trigonometry/sine-rule/en.md) · [Arabic](trigonometry/sine-rule/ar.md) -- [ ] [solving-right-triangles](trigonometry/solving-right-triangles/en.md) · [Arabic](trigonometry/solving-right-triangles/ar.md) -- [ ] [tangent-function](trigonometry/tangent-function/en.md) · [Arabic](trigonometry/tangent-function/ar.md) -- [ ] [trig-equations](trigonometry/trig-equations/en.md) · [Arabic](trigonometry/trig-equations/ar.md) -- [ ] [trig-identities](trigonometry/trig-identities/en.md) · [Arabic](trigonometry/trig-identities/ar.md) -- [ ] [unit-circle](trigonometry/unit-circle/en.md) · [Arabic](trigonometry/unit-circle/ar.md) -- [ ] [vector-components](trigonometry/vector-components/en.md) · [Arabic](trigonometry/vector-components/ar.md) +## trigonometry (13/13) + +- [x] [angles-of-elevation-and-depression](trigonometry/angles-of-elevation-and-depression/en.md) · [Arabic](trigonometry/angles-of-elevation-and-depression/ar.md) +- [x] [cosine-rule](trigonometry/cosine-rule/en.md) · [Arabic](trigonometry/cosine-rule/ar.md) +- [x] [degrees-and-radians](trigonometry/degrees-and-radians/en.md) · [Arabic](trigonometry/degrees-and-radians/ar.md) +- [x] [inverse-trig-functions](trigonometry/inverse-trig-functions/en.md) · [Arabic](trigonometry/inverse-trig-functions/ar.md) +- [x] [polar-coordinates](trigonometry/polar-coordinates/en.md) · [Arabic](trigonometry/polar-coordinates/ar.md) +- [x] [sine-function-parameters](trigonometry/sine-function-parameters/en.md) · [Arabic](trigonometry/sine-function-parameters/ar.md) +- [x] [sine-rule](trigonometry/sine-rule/en.md) · [Arabic](trigonometry/sine-rule/ar.md) +- [x] [solving-right-triangles](trigonometry/solving-right-triangles/en.md) · [Arabic](trigonometry/solving-right-triangles/ar.md) +- [x] [tangent-function](trigonometry/tangent-function/en.md) · [Arabic](trigonometry/tangent-function/ar.md) +- [x] [trig-equations](trigonometry/trig-equations/en.md) · [Arabic](trigonometry/trig-equations/ar.md) +- [x] [trig-identities](trigonometry/trig-identities/en.md) · [Arabic](trigonometry/trig-identities/ar.md) +- [x] [unit-circle](trigonometry/unit-circle/en.md) · [Arabic](trigonometry/unit-circle/ar.md) +- [x] [vector-components](trigonometry/vector-components/en.md) · [Arabic](trigonometry/vector-components/ar.md) ## waves (0/15) diff --git a/content/lessons/STYLE.en.md b/content/lessons/STYLE.en.md index 1c35f5f4..44c2e787 100644 --- a/content/lessons/STYLE.en.md +++ b/content/lessons/STYLE.en.md @@ -37,6 +37,6 @@ Run `pnpm check` after editing. It validates structure, formulas and challenge s ## Reviewed examples and remaining work -See [the lesson-by-lesson review checklist](EDITORIAL_REVIEW.md) for coverage. The Numbers, Functions, Algebra, Discrete and Geometry sections and the derivative lesson have received a complete bilingual editorial pass under this guide. +See [the lesson-by-lesson review checklist](EDITORIAL_REVIEW.md) for coverage. The Numbers, Functions, Algebra, Discrete, Geometry and Trigonometry sections and the derivative lesson have received a complete bilingual editorial pass under this guide. The remaining lessons still need individual review of their summaries, controls, explanations, examples and challenges. Do not treat a global phrase replacement or a successful build as an editorial review. From 31ffea6218aa349856756292bef7fe0355025afc Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:36:02 +0300 Subject: [PATCH 062/124] content: rewrite area-under-curve for first-time learners in both languages --- .../lessons/calculus/area-under-curve/ar.md | 56 +++++++++--------- .../lessons/calculus/area-under-curve/en.md | 57 +++++++++---------- 2 files changed, 54 insertions(+), 59 deletions(-) diff --git a/content/lessons/calculus/area-under-curve/ar.md b/content/lessons/calculus/area-under-curve/ar.md index 064e48f7..8e913e1e 100644 --- a/content/lessons/calculus/area-under-curve/ar.md +++ b/content/lessons/calculus/area-under-curve/ar.md @@ -1,62 +1,60 @@ --- title: المساحة تحت المنحنى -summary: >- - سيارة تتقدم ثم ترجع. المساحة تحت منحنى السرعة تخبرك أين انتهت، لا كم مشت فقط. +summary: 'استخدم المساحة بإشارتها تحت منحنى السرعة المتجهة، وميّز تغير الموضع من المسافة المقطوعة.' parameters: - a: البداية a - b: النهاية b + a: 'a — زمن البداية' + b: 'b — زمن النهاية' variables: - - سرعة السيارة عند الزمن t، وصيغتها 2 sin t، فتسير إلى الأمام ثم ترجع إلى الخلف - - بداية ونهاية الفترة الزمنية + - 'v(t): السرعة المتجهة بإشارتها، ونموذجها 2 sin t' + - 'a, b: حدا التكامل؛ نستخدم a ≤ b للزمن المنقضي' --- ## Try it -1. اسحب «النهاية b» حتى نحو 1.5. تكبر المنطقة السماوية، فالسيارة ما زالت تسير للأمام فقط. -2. تابع سحب «النهاية b» إلى ما بعد 3.15. تبلغ المنطقة السماوية أقصى اتساعها، فالسيارة على وشك الانعطاف. -3. ادفع «النهاية b» حتى نحو 6.3. تظهر منطقة حمراء تلغي المنطقة السماوية، فالسيارة أكملت دورة كاملة وعادت قريبًا من نقطة انطلاقها. +1. اضبط a = 0 وb = 1.5. السرعة المتجهة موجبة خلال الفترة، فتتساوى الإزاحة والمسافة وتبلغان نحو 1.859. +2. ارفع b إلى 3.15. تقع هذه القيمة بعد π بقليل، حيث تتغير السرعة المتجهة من موجبة إلى سالبة. تكون الإزاحة قريبة من قيمتها العظمى 4. +3. ارفع b إلى 6.3. تكاد المساحتان المتعاكستان تلغيان بعضهما، فتكون الإزاحة نحو 0.000283، بينما المسافة الكلية نحو 8.00028. الحركة على خط واحد، وليست على مسار دائري. ## Real-life examples -1. **مشوار قصير.** تقود السيارة من الثانية 0 حتى 1.5، قبل أن تنعطف. تُحسب كل المساحة السماوية تقدمًا للأمام، فتبلغ الإزاحة الصافية نحو 1.9. -2. **أطول مسار ذهابًا.** تقود السيارة من 0 حتى نحو 3.15 ثانية، أي حتى لحظة الانعطاف بالضبط. تبلغ الإزاحة الصافية ذروتها قرب 4، وهذه أبعد مسافة تقطعها السيارة في اتجاه واحد. -3. **دورة كاملة تعود إلى البداية.** تقود السيارة من 0 حتى نحو 6.3 ثانية، أي دورة كاملة. يلغي الدفع الأمامي العودة الخلفية بصورة شبه تامة، فتهبط الإزاحة الصافية قريبًا من الصفر. +1. **قبل عكس الاتجاه.** من 0 إلى 1.5 وحدة زمن، يتحرك الجسم في النموذج نحو 1.859 وحدة طول في الاتجاه الموجب. +2. **قرب أبعد موضع.** من 0 إلى 3.15، تكون الإزاحة نحو 3.99993. زمن عكس الاتجاه الدقيق هو π، وليس 3.15. +3. **قرب موضع البداية.** من 0 إلى 6.3، تقترب الإزاحة من الصفر. عند 2π تمامًا تساوي صفرًا، بعد قطع مسافة كلية قدرها 8. ## Test yourself -1. جد نافذة زمنية تعود عندها الإزاحة الصافية إلى 0، بحيث تكون «النهاية b» أبعد من «البداية a» بثانيتين على الأقل. -2. اجعل الإزاحة الصافية أكبر ما يمكن، أي نحو 4. -3. اجعل الإزاحة الصافية 3- (تنتهي السيارة عند 3 وحدات خلف نقطة انطلاقها). +1. اختر حدين تكون عندهما |b − a| أكبر من 2، والقيمة المطلقة للتكامل أقل من 0.1. +2. اجعل التكامل يختلف عن 4 بما لا يتجاوز 0.15. +3. اجعل التكامل يختلف عن −3 بما لا يتجاوز 0.1. لتفسيره حركةً إلى الأمام في الزمن، اختر a أصغر من b. ## Intuition -تخيل سيارة على طريق مستقيم. تسير للأمام في الثواني الثلاث الأولى، ثم تتباطأ وتتوقف وترجع للخلف في الثواني الثلاث التالية. الخط المتموج على الشاشة هو سرعة السيارة في كل لحظة. حين يكون الخط فوق المنتصف تكون الشريحة السماوية تحته مسافة مكتسبة، وحين ينخفض الخط تحت المنتصف تكون الشريحة الحمراء مسافة معادة. +تخيّل جسمًا يتحرك على مسار مستقيم. تعني السرعة المتجهة الموجبة حركةً في الاتجاه الذي اخترناه موجبًا، وتعني السالبة حركةً عكسه. يعرض الرسم السرعة المتجهة التي قد تكون سالبة، لا مقدار السرعة الذي لا يكون سالبًا. ضرب سرعة متجهة في مدة قصيرة يعطي تقريبًا تغيرًا صغيرًا في الموضع بإشارته. -اسحب المنزلق «النهاية b»، وهو عدد ثواني القيادة التي تراقبها، إلى ما بعد 3.15. تبدأ المساحة الحمراء بابتلاع السماوية، وعند نحو 6.3 ثانية تتساوى المساحتان تمامًا، فالسيارة عادت بالضبط إلى نقطة انطلاقها رغم أنها لم تتوقف عن الحركة لحظة واحدة. الفرق بين السماوية والحمراء يُسمى الإزاحة الصافية، أي المسافة المستقيمة بين نقطة انطلاق السيارة ونقطة وصولها. +جمع المساهمات الموجبة والسالبة يعطي الإزاحة، وجمع مقاديرها يعطي المسافة الكلية. في هذا النموذج يتوقف الجسم لحظة ويعكس اتجاهه عند π، ثم يعود إلى البداية عند 2π. إزاحته خلال الدورة صفر، لكنه قطع 4 وحدات ذهابًا و4 إيابًا. تعرض المناطق المظللة المساهمات؛ أما المنحنى نفسه فليس رسمًا لمسار الجسم. ## Formal -$\int_a^b f = A_{+} - A_{-}$، حيث $A_{+}$ و $A_{-}$ هما المساحتان فوق المحور وتحته. +لحدين مرتبين زمنيًا $a\leq b$ وسرعة متجهة متصلة v، تكون الإزاحة $\int_a^b v(t)\,dt=A_+-A_-$، حيث A₊ وA₋ مساحتان غير سالبتين فوق المحور وتحته. والمسافة الكلية هي $\int_a^b|v(t)|\,dt=A_++A_-$. تحمل إشارة الإزاحة معلومة الاتجاه. -المسافة الكلية مقدار مختلف، وتساوي $\int_a^b |f(t)|\,dt = A_{+} + A_{-}$. +هنا $v(t)=2\sin t$، ومدخل الجيب بالراديان، لذلك $\int_a^b2\sin t\,dt=2\cos a-2\cos b$. إذا كان الزمن بالثانية والسرعة بالمتر في الثانية، كان التكامل بالمتر. عكس الحدين يعكس إشارة التكامل؛ وتكامل مقدار السرعة بحدين معكوسين ليس مسافة كلية فعلية. ## Advanced -إذا كان $F(b) = \int_a^b f$، فإن المبرهنة الأساسية في التفاضل والتكامل تعطي $F'(b) = f(b)$، أي أن معدل تراكم المساحة يساوي ارتفاع المنحنى عند الطرف المتحرك. ولهذا يبلغ المجموع التراكمي ذروته بالضبط حيث تقطع $f$ الصفر. +عند تثبيت a، تكون مشتقة الإزاحة المتراكمة F(b) هي F′(b) = v(b). تغير السرعة المتجهة من موجبة إلى سالبة يعطي قيمة عظمى محلية للإزاحة، ومن سالبة إلى موجبة يعطي قيمة صغرى محلية. مجرد انعدام السرعة لا يضمن أيًا منهما. ## Derivation -1. الدالة الأصلية (المشتقة العكسية) لـ $2\sin t$ هي $-2\cos t$. -2. هذا هو المجموع التراكمي مرسومًا بحسب زمن النهاية $b$. -3. المساحتان المتساويتان فوق المحور وتحته تلغيان بعضهما تمامًا. +1. يثبت الاشتقاق المعروض a = 0. دالة أصلية لـ2 sin t هي −2 cos t؛ نحسب قيمتها عند b وعند الصفر. +2. نطرح قيمة البداية −2 لنحصل على 2 − 2 cos b، وهي الإزاحة حتى b. هذا هو المقدار المتراكم، لا منحنى السرعة المرسوم أعلاه. +3. عند b = 2π يكون جيب التمام 1 والإزاحة صفرًا. تلغي المساحتان المتساويتان والمتعاكستان بعضهما. ## Real world -### الصافي مقابل الإجمالي -يمثّل رصيد الحساب البنكي التكامل الموجّه للتدفق النقدي، ويمثّل حجم التداول التكامل غير الموجّه. +### تدفق إلى خزان ومنه -### التيار الكهربائي المتردد -يتكامل تيار الشبكة الكهربائية إلى صفر خلال كل دورة كاملة، ولهذا نقيس قوته بالقيمة الفعالة (RMS) لا بالمتوسط. +إذا كان معدل التدفق موجبًا للداخل وسالبًا للخارج، أعطى تكامله تغير الحجم المخزون. أما تكامل قيمته المطلقة فيحسب كل الحجم المار في الاتجاهين. -### الشغل -يساوي الشغل حاصل ضرب القوة في المسافة بإشارة معينة، فالقوة المعاكسة لاتجاه الحركة تسحب الطاقة بدلًا من أن تضيفها. +### قياسات الحركة + +يساعد سجل السرعة المتجهة على التمييز بين الموضع النهائي والمسافة المقطوعة. العودة إلى البداية تجعل الإزاحة صفرًا، لا المسافة. diff --git a/content/lessons/calculus/area-under-curve/en.md b/content/lessons/calculus/area-under-curve/en.md index e6f72fa8..ac913560 100644 --- a/content/lessons/calculus/area-under-curve/en.md +++ b/content/lessons/calculus/area-under-curve/en.md @@ -1,63 +1,60 @@ --- title: Area under a curve -summary: >- - A car that drives forward and then backs up needs to know exactly where it - ends up, not just how far it travelled — that is what this idea works out. +summary: 'Use signed area under a velocity graph to distinguish change in position from total distance travelled.' parameters: - a: start a - b: end b + a: 'a — starting time' + b: 'b — ending time' variables: - - 'velocity at time t — here 2 sin t, forwards then backwards' - - start and end of the time window + - 'v(t): signed velocity, modelled as 2 sin t' + - 'a, b: integration bounds; use a ≤ b for elapsed time' --- ## Try it -1. Drag «end b» to about 1.5. The teal region grows: the car has only driven forward so far. -2. Keep dragging «end b» past 3.15. The shaded region peaks: the car is about to turn around. -3. Push «end b» all the way to about 6.3. Red area appears and cancels the teal: the car has driven a full loop and returned near its start. +1. Set a = 0 and b = 1.5. The velocity is positive throughout this interval, so displacement and distance both equal about 1.859. +2. Increase b to 3.15. This is just beyond π, where the velocity changes from positive to negative. Displacement is near its maximum of 4. +3. Increase b to 6.3. The signed areas nearly cancel, giving displacement about 0.000283, while total distance is about 8.00028. The motion is along one line, not around a loop. ## Real-life examples -1. **Short errand.** Driving from second 0 to 1.5, before the car ever turns around: the whole shaded area counts as forward progress, a net displacement of about 1.9. -2. **Longest outward leg.** Driving from 0 to about 3.15 seconds, right up to the turn-around point: net displacement peaks near 4, the largest one-way distance this car ever reaches. -3. **A full loop back to the start.** Driving from 0 to about 6.3 seconds, one whole cycle: the forward push and the backward return cancel almost exactly, so net displacement drops back near zero. +1. **Before reversing direction.** From 0 to 1.5 time units, the model moves about 1.859 length units in the positive direction. +2. **Near the farthest point.** From 0 to 3.15, displacement is about 3.99993. The exact turning time is π, not 3.15. +3. **Near the starting position.** From 0 to 6.3, displacement is close to zero. At exactly 2π it is zero, after a total distance of 8. ## Test yourself -1. Find a time window (with «end b» at least 2 seconds after «start a») where the net displacement returns to 0. -2. Make the net displacement as large as possible — about 4. -3. Make the net displacement -3 (the car ends up 3 units behind where it started). +1. Choose bounds with |b − a| greater than 2 and absolute signed integral less than 0.1. +2. Make the signed integral within 0.15 of 4. +3. Make the signed integral within 0.1 of −3. For a forward-time interpretation, choose a less than b. ## Intuition -Picture a car on a straight road. It drives forward for the first three seconds, then slows, stops, and backs up for the next three. The wavy line on screen is the car's speed at every instant: when the line sits above the middle, the teal-shaded strip beneath it is distance gained, and when the line dips below, the red-shaded strip is distance given back. +Imagine an object moving along a straight track. A positive velocity means motion in the chosen positive direction; a negative velocity means motion back the other way. The graph shows velocity, which can be negative, rather than speed, which cannot. A small velocity multiplied by a short duration gives a small signed change in position. -Drag the slider «end b», the number of seconds of driving you are watching, out past 3.15. Red area starts eating into teal, and by about 6.3 seconds the two shaded areas match exactly — the car has looped back to right where it started, even though it never stopped moving. Teal minus red is called the net displacement: the straight-line distance between where the car started and where it ended up. +Adding the positive and negative contributions gives displacement. Adding their magnitudes gives total distance. In this model the object stops momentarily and reverses direction at π, then returns to its starting position at 2π. Its displacement over that cycle is zero, but it has travelled 4 units outward and 4 units back. The shaded regions show the contributions; the graph itself is not a drawing of the object's path. ## Formal -$\int_a^b f = A_{+} - A_{-}$, where $A_{+}$ and $A_{-}$ are the areas above and below the axis. +For chronological bounds $a\leq b$ and continuous velocity v, displacement is $\int_a^b v(t)\,dt=A_+-A_-$, where A₊ and A₋ are nonnegative areas above and below the axis. Total distance is $\int_a^b|v(t)|\,dt=A_++A_-$. Displacement carries direction through its sign. -Total distance is a different quantity: $\int_a^b |f(t)|\,dt = A_{+} + A_{-}$. +Here $v(t)=2\sin t$, with the sine argument in radians, so $\int_a^b2\sin t\,dt=2\cos a-2\cos b$. If time is in seconds and velocity in metres per second, the integral is in metres. Reversing the bounds reverses an integral's sign; that reversed integral of speed is not a physical total distance. ## Advanced -With $F(b) = \int_a^b f$, the Fundamental Theorem gives $F'(b) = f(b)$: the rate at which area accumulates equals the height of the curve at the moving edge. That is why the running total peaks exactly where $f$ crosses zero. +For fixed a, the accumulated displacement F(b) has derivative F′(b) = v(b). A change of velocity from positive to negative produces a local maximum of displacement; a negative-to-positive change produces a local minimum. Merely having zero velocity does not guarantee either kind of extremum. ## Derivation -1. An antiderivative of $2\sin t$ is $-2\cos t$. -2. This is the running total plotted against the end time $b$. -3. Equal areas above and below cancel exactly. +1. The displayed derivation fixes a = 0. An antiderivative of 2 sin t is −2 cos t; evaluate it at b and at zero. +2. Subtract the starting value −2 to obtain 2 − 2 cos b, the displacement up to b. This is the accumulated quantity, not the velocity curve drawn above. +3. At b = 2π, cosine is 1 and the displacement is zero. Equal positive and negative areas cancel. ## Real world -### Net vs. total -A bank balance is the signed integral of cash flow; turnover is the unsigned one. +### Flow into and out of a tank -### AC electricity -Mains current integrates to zero over a cycle — which is why RMS, not the average, measures its strength. +If a signed flow rate is positive inward and negative outward, its integral gives the change in stored volume. Integrating the magnitude counts all volume passing through in either direction. -### Work -Force × distance, signed: a force opposing motion removes energy. +### Motion measurements + +A velocity record distinguishes an object's final position from how far it travelled. Returning to the start makes displacement zero, not distance. From c8efccae64bc0b9175c4a9ba847fb25b2c7e9f98 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:36:02 +0300 Subject: [PATCH 063/124] content: rewrite chain-and-product-rule for first-time learners in both languages --- .../calculus/chain-and-product-rule/ar.md | 57 ++++++++---------- .../calculus/chain-and-product-rule/en.md | 59 ++++++++----------- 2 files changed, 52 insertions(+), 64 deletions(-) diff --git a/content/lessons/calculus/chain-and-product-rule/ar.md b/content/lessons/calculus/chain-and-product-rule/ar.md index e365d783..3c646dfd 100644 --- a/content/lessons/calculus/chain-and-product-rule/ar.md +++ b/content/lessons/calculus/chain-and-product-rule/ar.md @@ -1,65 +1,60 @@ --- title: 'قاعدة السلسلة وقاعدة الضرب' -summary: >- - دالة داخل دالة، أو دالتان مضروبتان. قاعدتان تخبرانك كيف تجد الميل في الحالتين. +summary: 'اشتق حاصل ضرب عاملين متغيرين، أحدهما جيب يحتوي بدوره على مدخل متغير.' parameters: - k: التردد الداخلي k - x: النقطة x على المنحنى + k: 'k — معامل ثابت داخل الجيب' + x: 'x — المدخل المختار' variables: - - التردد داخل الجيب، وهو «الدالة الداخلية» التي يجري تركيبها - - النقطة التي نحسب عندها المماس والمشتقة + - 'k: زيادة الزاوية داخل الجيب لكل وحدة من x' + - 'x: موضع حساب قيمة الدالة ومشتقتها' --- ## Try it -1. اسحب النقطة «x» على طول المنحنى. يتفق الخط المماس المتصل دائمًا مع منحنى المشتقة المتقطع عند تلك النقطة. -2. ارفع «k» ببطء. يتذبذب كلا المنحنيين بسرعة أكبر، لكن منحنى المشتقة يتأرجح أيضًا لأعلى ولأسفل أكثر، لا أسرع فقط. -3. اسحب «x» بعيدًا عن المركز مع قيمة «k» كبيرة. يكبر منحنى المشتقة كثيرًا، أكثر بكثير مما يبلغه المنحنى الأصلي في أي وقت. +1. اضبط k = 1 وx = 2. قيمة الدالة نحو 1.8186، وميلها نحو 0.0770. ارتفاع المنحنى المتقطع يعطي ميل المنحنى المتصل، لا ارتفاعه. +2. حرّك x مع تثبيت k. حيث يقطع المنحنى المتقطع الصفر، يكون مماس المنحنى المتصل أفقيًا. +3. اضبط k = 3 وحرّك x بعيدًا عن الصفر. تخرج بعض قيم المشتقة من المدى الرأسي للرسم، لكن قراءة الميل تظل تعرضها. ## Real-life examples -1. **موجة راديو AM بتردد داخلي بطيء.** عند تردد داخلي هادئ (k = 0.4) ونقطة بعيدة عن المركز (x = 5)، يكشف المماس كيف يكبر ميل الإشارة البطيئة بسبب اتساع الغلاف. -2. **نغمة سريعة الطنين قرب البداية.** التردد الداخلي المرتفع (k = 2.8) يجعل الموجة تتذبذب بسرعة، فحتى قرب المركز (x = 0.5) يتأرجح الميل بشدة. -3. **الانتشار العكسي في أعماق شبكة عصبية.** مع k = 1.2 وx = 4-، تحسب الشبكة العصبية طبقة بعد طبقة النمط نفسه من الضرب والسلسلة، لتعرف كيف يؤثر أحد الأوزان في الخطأ النهائي. +1. **مماس شبه أفقي.** عند k = 0.4 وx = 5، تكون f ≈ 4.54649 لكن f′ ≈ 0.07700. قد تكون قيمة الدالة كبيرة وميلها صغيرًا. +2. **ميل موجب قرب المركز.** عند k = 2.8 وx = 0.5، تكون f ≈ 0.49272 وf′ ≈ 1.22340. +3. **قيمة سالبة وميل موجب.** عند k = 1.2 وx = −4، تكون f ≈ −3.98466 وf′ ≈ 0.57617. قد يقع المنحنى تحت الصفر ويكون صاعدًا. ## Test yourself -1. جد نقطة بعيدة عن المركز (|x| > 1) يكون عندها المماس مسطحًا، أي تقرأ المشتقة 0. -2. اجعل المشتقة ترتفع فوق 10. -3. اجعل المشتقة تنخفض دون 10-. +1. اختر |x| أكبر من 1، مع |f′(x)| أقل من 0.15. +2. اجعل f′(x) أكبر من 10. +3. اجعل f′(x) أقل من −10. ## Intuition -تخيل مؤشر راديو قديمًا، تدويره يغيّر سرعة تذبذب الإشارة صعودًا ونزولًا. على الشاشة يفعل المقبض «k» الشيء نفسه، وتحدّد النقطة «x» الموضع الذي تقف عنده على التذبذب. اجعل «k» عند 1 و«x» عند 2. المنحنى المتصل هو الإشارة نفسها، والمنحنى المتقطع أسفله هو ميلها عند تلك النقطة بالضبط، أي مدى انحدارها صعودًا أو هبوطًا هناك، مرسومًا من جديد كمنحنى مستقل. +تضرب الدالة x sin(kx) عاملين متغيرين. إذا تغيرت x قليلًا، تغيّر العامل x وتغيّر عامل الجيب أيضًا. تحسب قاعدة الضرب المساهمتين: نغيّر العامل الأول مع إبقاء الثاني عند قيمته الحالية، ثم نضيف مساهمة تغير العامل الثاني. -ارفع «k» نحو 3، فيتذبذب كلا المنحنيين بسرعة أكبر كما تتوقع. لكن راقب ارتفاع المنحنى المتقطع أيضًا، فهو يكبر هو الآخر لا يسرع فقط. هذا النمو الإضافي بصمة قاعدتين تعملان معًا، واحدة للتذبذب السريع في الداخل وأخرى للعامل الخطي الذي يضربه. ومعًا تجعلان الميل يتأرجح بجموح أكبر مما تبلغه الإشارة نفسها أبدًا. +يحتوي عامل الجيب على طبقة أخرى. مدخله kx، الذي يتغير بمعدل يساوي k أمثال معدل تغير x. لذلك تضرب قاعدة السلسلة جيب التمام في k. يعطي جمع القاعدتين حدين في صيغة الميل. اشتقاق الجيب وحده أو العامل x وحده يهمل جزءًا من التغير. ## Formal -قاعدة الضرب هي $(uv)' = u'v + uv'$ مع $u = \sin(kx)$، $v = x$. +لدالتين قابلتين للاشتقاق u وv، تكون $(uv)'=u'v+uv'$. هنا $u=\sin(kx)$ و$v=x$، ونثبت k عند الاشتقاق بالنسبة إلى x. يقاس مدخل الجيب بالراديان. -قاعدة السلسلة تعطي $\dfrac{d}{dx}\sin(kx) = k\cos(kx)$، إذ تُحسب مشتقة الجيب الخارجي عند الدالة الداخلية، مضروبة في مشتقة الدالة الداخلية نفسها وهي $k$. +تعطي قاعدة السلسلة $u'=k\cos(kx)$، بينما $v'=1$. لذلك $f'(x)=kx\cos(kx)+\sin(kx)$. يرسم المنحنى المتقطع هذه المشتقة؛ ويكون لمماس المنحنى الأصلي عند النقطة المختارة هذا الميل. ## Advanced -هذه المشتقة، $kx\cos(kx) + \sin(kx)$، هي بالضبط النمط الذي يظهر عند اشتقاق تعبيرات من نوع $\int \sin(kt)\,dt$ أو عند تحليل إشارات مضمَّنة السعة $x(t)\sin(kt)$. تقسم قاعدة الضرب هنا التغيّر إلى جزء ناتج عن الغلاف البطيء التغيّر وجزء ناتج عن التذبذب السريع، وهذه نقطة البداية لقاعدة لايبنيز العامة ولتقريبات الطور الساكن. +لغلاف A(x)، يعطي اشتقاق A(x) sin(kx) التعبير A′(x) sin(kx) + kA(x) cos(kx). يصف الحدان تغير الغلاف وتغير التذبذب. هذه مشتقة بالنسبة إلى x؛ أما الاشتقاق بالنسبة إلى المعامل k مع تثبيت x فيعطي نتيجة مختلفة. ## Derivation -1. طبّق قاعدة الضرب على العاملين $\sin(kx)$ و$x$. -2. طبّق قاعدة السلسلة على الدالة الداخلية المركّبة $kx$. -3. اجمع النتيجتين، مع العلم أن $\frac{d}{dx}[x] = 1$، ثم عوّض بنتيجة قاعدة السلسلة. +1. نطبق قاعدة الضرب على sin(kx) وx، ونحتفظ بالحدين. +2. نشتق الجيب الخارجي عند مدخله kx، ثم نضرب في مشتقة المدخل، وهي k. +3. نعوّض بهذه النتيجة وبمشتقة x التي تساوي 1 في تعبير قاعدة الضرب. ## Real world -### الراديو المضمَّن السعة -تحتاج الموجة الحاملة، حين تُضرب في غلاف بطيء التغير، إلى هذا الاشتقاق بقاعدتي الضرب والسلسلة لتحليلها. +### تذبذب متغير -### الاهتزاز مع دافع متزايد -يُظهر نظام متذبذب مدفوع، تتزايد سعة دفعه خطيًا أثناء التذبذب، الشكل نفسه الذي يرسمه $x\sin(kx)$. +قد يضرب نموذج إشارة تذبذبًا في سعة متغيرة. يعتمد معدل التغير على العاملين، حتى لو تغير أحدهما أبطأ من الآخر. -### الأمثلة في الهندسة -تتطلب دوال التكلفة المركّبة، وهي معدل مطبق على كمية متغيرة، عادة تسلسل المشتقات عبر عدة طبقات. +### كمية لها عاملان متغيران -### الانتشار العكسي في تعلم الآلة -تطبّق الشبكة العصبية قاعدة السلسلة تكرارًا عبر طبقاتها لحساب التدرجات، وغالبًا ما تقرنها بحواصل ضرب في كل طبقة. +إذا تغير طول مستطيل وعرضه مع الزمن، تغيرت مساحته بسبب البعدين معًا. تجمع قاعدة الضرب مساهمتيهما من الرتبة الأولى. diff --git a/content/lessons/calculus/chain-and-product-rule/en.md b/content/lessons/calculus/chain-and-product-rule/en.md index 18131c9d..801b4275 100644 --- a/content/lessons/calculus/chain-and-product-rule/en.md +++ b/content/lessons/calculus/chain-and-product-rule/en.md @@ -1,67 +1,60 @@ --- title: The chain rule and product rule together -summary: >- - A radio signal built from a fast wiggle riding on a slowly changing - strength needs two differentiation rules at once — this shows you both, - working together. +summary: 'Differentiate a changing product whose sine factor also contains a changing input.' parameters: - k: k (inner frequency) - x: x (drag along the curve) + k: 'k — constant multiplier inside sine' + x: 'x — selected input' variables: - - frequency inside the sine — the "inner function" being composed - - point where the tangent and derivative are evaluated + - 'k: angle increase per unit x inside sine' + - 'x: point where the value and derivative are evaluated' --- ## Try it -1. Drag the point «x» along the curve. The solid tangent line and the dashed derivative curve always agree at that spot. -2. Raise «k» slowly. Both curves oscillate faster, but the derivative curve also swings higher and lower — not just faster. -3. Drag «x» far from the centre with a high «k». The derivative curve grows much larger than the original curve ever does. +1. Set k = 1 and x = 2. The function value is about 1.8186 and its slope about 0.0770. The dashed curve's height gives the slope of the solid curve, not its height. +2. Move x while keeping k fixed. Where the dashed curve crosses zero, the solid curve has a horizontal tangent. +3. Set k = 3 and move x away from zero. Some derivative values leave the vertical plotting window; the slope readout still reports them. ## Real-life examples -1. **A slow-varying AM radio carrier.** With a gentle inner frequency (k = 0.4) and a point far from the centre (x = 5), the tangent shows how a slowly oscillating signal still tilts because of the growing envelope term. -2. **A fast, buzzing tone near the start.** A high inner frequency (k = 2.8) makes the wave oscillate quickly, so even close to the centre (x = 0.5) the slope swings widely. -3. **Backpropagation deep inside a network.** With k = 1.2 and x = -4, the same product-and-chain pattern is what a neural network computes, layer after layer, when it works out how a weight affects the final error. +1. **Nearly horizontal tangent.** At k = 0.4 and x = 5, f ≈ 4.54649 but f′ ≈ 0.07700. A large function value can have a small slope. +2. **Positive slope near the centre.** At k = 2.8 and x = 0.5, f ≈ 0.49272 and f′ ≈ 1.22340. +3. **Negative value, positive slope.** At k = 1.2 and x = −4, f ≈ −3.98466 and f′ ≈ 0.57617. A curve can lie below zero while increasing. ## Test yourself -1. Find a point away from the centre (|x| > 1) where the tangent is flat — the derivative reads 0. -2. Make the derivative climb above 10. -3. Make the derivative drop below -10. +1. Choose |x| greater than 1 with |f′(x)| less than 0.15. +2. Make f′(x) greater than 10. +3. Make f′(x) less than −10. ## Intuition -Picture an old radio dial: turning it changes how fast a signal wiggles up and down. On screen, knob «k» plays that role, and the point «x» marks one spot you are standing at on the wiggle. With «k» at 1 and «x» at 2, the solid curve is the signal itself, and the dashed curve beneath it is how steeply the signal rises or falls right at that spot — its slope, redrawn as its own curve. +The function x sin(kx) multiplies two changing factors. If x changes a little, the factor x changes and the sine factor changes too. The product rule accounts for both contributions: change the first factor while holding the second at its current value, then add the contribution from changing the second. -Raise «k» toward 3 and both curves wiggle faster, as you would expect. But watch the dashed curve's height too: it grows taller as well, not just faster. That extra growth is the fingerprint of two rules working together — one for the fast wiggle inside, one for the straight-line factor multiplying it — and together they make the slope swing more wildly than the signal itself ever does. +The sine factor contains a second layer. Its input is kx, which changes k times as fast as x. The chain rule therefore multiplies cosine by k. Combining the two rules gives two terms in the slope. Differentiating only the sine or only the factor x would miss part of the change. ## Formal -Product rule: $(uv)' = u'v + uv'$ with $u = \sin(kx)$, $v = x$. +For differentiable u and v, $(uv)'=u'v+uv'$. Here $u=\sin(kx)$ and $v=x$, with k held constant when differentiating with respect to x. The sine input is in radians. -Chain rule: $\dfrac{d}{dx}\sin(kx) = k\cos(kx)$, since the derivative of the outer sine is evaluated at the inner function, times the inner function's own derivative $k$. +The chain rule gives $u'=k\cos(kx)$, while $v'=1$. Hence $f'(x)=kx\cos(kx)+\sin(kx)$. The dashed graph plots this derivative; the tangent to the original curve at the selected point has this slope. ## Advanced -This derivative, $kx\cos(kx) + \sin(kx)$, is exactly the pattern that shows up differentiating $\int \sin(kt)\,dt$-type expressions or analysing amplitude-modulated signals $x(t)\sin(kt)$: the product rule splits the change into a part from the (slowly varying) envelope and a part from the (fast) oscillation, which is the starting point for the general Leibniz rule and for stationary-phase approximations. +For an envelope A(x), differentiating A(x) sin(kx) gives A′(x) sin(kx) + kA(x) cos(kx). The terms describe change in the envelope and change in the oscillation. This is a derivative with respect to x; differentiating with respect to the parameter k while fixing x would give a different result. ## Derivation -1. Apply the product rule to the two factors $\sin(kx)$ and $x$. -2. Apply the chain rule to the composed inner function $kx$. -3. Combine: $\frac{d}{dx}[x] = 1$, and substitute the chain-rule result. +1. Apply the product rule to sin(kx) and x. Keep both terms. +2. Differentiate the outer sine at its inner input kx, then multiply by the inner derivative k. +3. Substitute that result and the derivative 1 of x into the product-rule expression. ## Real world -### Amplitude-modulated radio -A carrier wave multiplied by a slowly varying envelope needs exactly this product-and-chain differentiation to analyse. +### A changing oscillation -### Vibration with growing drive -A driven oscillator whose forcing amplitude ramps up linearly while oscillating shows this same $x\sin(kx)$ shape. +A signal model can multiply an oscillation by a varying amplitude. Its rate of change depends on both factors, even if one changes more slowly than the other. -### Optimization in engineering -Composite cost functions (a rate applied to a changing quantity) routinely require chaining derivatives through several layers. +### Quantities with two changing factors -### Machine learning backpropagation -Gradients through neural network layers are chain rule applied repeatedly, often combined with products at each layer. +If a rectangle's length and width vary with time, its area changes because both dimensions change. The product rule adds their first-order contributions. From 02c04cf03b428dbe52a1a93677cf2fc779956da5 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:36:02 +0300 Subject: [PATCH 064/124] content: rewrite continuity for first-time learners in both languages --- content/lessons/calculus/continuity/ar.md | 57 ++++++++++------------ content/lessons/calculus/continuity/en.md | 59 ++++++++++------------- 2 files changed, 52 insertions(+), 64 deletions(-) diff --git a/content/lessons/calculus/continuity/ar.md b/content/lessons/calculus/continuity/ar.md index 10e035a3..2054028c 100644 --- a/content/lessons/calculus/continuity/ar.md +++ b/content/lessons/calculus/continuity/ar.md @@ -1,65 +1,60 @@ --- title: 'الاتصال والانقطاع' -summary: >- - جدول ضريبي يقفز فجأة عند حد الشريحة. الاتصال يخبرك هل في المنحنى قفزة أم لا. +summary: 'تحقق من اتفاق النهايتين الجانبيتين عند حد فاصل مع قيمة الدالة عنده.' parameters: - d: المسافة من x = 1 - j: مقدار القفزة j + d: 'd — بعد العينتين عن 1' + j: 'j — إزاحة الفرع الأيمن بإشارتها' variables: - - مقدار القفزة المضافة من أجل $x \ge 1$ - - مسافة النقطتين المقتربتين من $x=1$ + - 'j: المقدار المضاف عندما تكون x ≥ 1' + - 'd: مدخلا النقطتين هما 1 − d و1 + d' --- ## Try it -1. أبقِ «مقدار القفزة j» بعيدًا عن الصفر، وقلّل «المسافة من x = 1» نحو الصفر. تستقر النقطتان عند ارتفاعين مختلفين. -2. اسحب «مقدار القفزة j» حتى يصل إلى 0 بالضبط. تختفي الدرجة من الرسم البياني. -3. قلّل «المسافة من x = 1» من جديد. تستقر النقطتان الآن عند النقطة نفسها، فالرسم لا يرفع القلم أبدًا. +1. اضبط j = 1.5 وd = 0.1. القيمتان المحددتان هما f(0.9) = 0.81 وf(1.1) = 2.71. قلّل d؛ تقترب اليسرى من 1 واليمنى من 2.5. +2. اضبط j = 0. يستخدم الفرعان الآن x²، وتقترب الجهتان من f(1) = 1. +3. اضبط j = −2 وd = 0.02. القيمتان 0.9604 و−0.9596، وتقتربان من نهايتين مختلفتين، 1 و−1. يأخذ جدول القراءات عينات من الجهة اليمنى فقط؛ وتفسر صيغتا الفرعين الجهتين. ## Real-life examples -1. **جدول ضريبي سلس.** تكسب دولارًا إضافيًا دون أن يكلفك ذلك مبلغًا مفاجئًا من الضريبة (j = 0)، فالجدول متصل. -2. **قفزة متوسطة عند حد شريحة.** مع j = 1.5، يضيف عبور x = 1 فجأة 1.5 إلى المبلغ المستحق، وهذه درجة حقيقية، كشريحة ضريبية سيئة التصميم. -3. **هاوية خصم حاد.** مع j = 2-، يُسقط عبور x = 1 القيمة فجأة بمقدار 2، كخصم يختفي بمجرد أن تكسب دولارًا واحدًا زيادة. +1. **دون قفزة.** عند j = 0 وd = 0.3، القيمتان 0.49 و1.69. تختلفان عند هذه المسافة المنتهية، لكنهما تقتربان من القيمة نفسها 1 عندما تصغر d. +2. **قفزة صاعدة.** عند j = 1.5 وd = 0.3، القيمتان 0.49 و3.19. القفزة بين النهايتين 1.5، وليست الفرق الحالي 2.7. +3. **قفزة هابطة.** عند j = −2 وd = 0.1، القيمتان 0.81 و−0.79. نهايتاهما 1 و−1، فتكون القفزة −2. ## Test yourself -1. اجعل الدالة متصلة. جد مقدار القفزة الذي يغلق الفجوة. -2. أنشئ قفزة هابطة مقدارها 2 بالضبط، بحيث يكون الجانب الأيمن أدنى من الأيسر بمقدار 2. -3. قلّل مسافة الاقتراب دون 0.05، وأبقِ مقدار القفزة أكبر من 1. +1. اختر j بحيث تكون الدالة متصلة عند x = 1. +2. أنشئ قفزة هابطة مقدارها 2 بضبط j = −2. +3. اجعل d أقل من 0.05 مع إبقاء |j| أكبر من 1. ## Intuition -تخيل قاعدة ضريبية يضيف فيها تجاوز دخل معين رسمًا إضافيًا فجأة، كقفزة مقدارها 1.5 بمجرد أن تكسب دولارًا واحدًا زيادة. على الشاشة تُرسم الفكرة نفسها كنقطتين تنزلقان نحو المدخل 1 من جهتين متعاكستين، واحدة تصعد من الأسفل وأخرى تنزل من الأعلى، ويضبط المنزلق «المسافة من x = 1» مدى قربهما منه. +تستخدم هذه الدالة x² يسار 1، وx² + j عند 1 وإلى يمينها. يحرّك المعامل j الفرع الأيمن رأسيًا وحده. إذا كانت j تساوي 1.5، اقترب الفرع الأيسر من 1 عند الحد، والأيمن من 2.5. الاقتراب أكثر من الحد لا يغلق هذه الفجوة. -مع إبقاء «مقدار القفزة j» بعيدة عن الصفر، قلّل تلك المسافة. تستقر النقطة اليسرى قرب الارتفاع 1، لكن النقطة اليمنى تستقر عند ارتفاع مختلف، هو 1 زائد مقدار القفزة. اسحب الآن «مقدار القفزة j» حتى تصل إلى 0 بالضبط. تختفي الدرجة، وتلتقي النقطتان عند الارتفاع نفسه، ويمكن رسم المنحنى عبر تلك النقطة دون أن ترفع القلم أبدًا، وهذا هو الاتصال. +يتطلب الاتصال أكثر من تقارب نقطتين. يجب أن تتفق النهاية اليسرى واليمنى وقيمة الدالة عند الحد. يتحقق ذلك هنا بضبط j على صفر. تغيير d يغيّر موضعي العينتين فقط، ولا يصلح القفزة. قد يصل خط الرسم بين عينات تقع على جانبي انقطاع، لذلك نحكم على الاتصال من الصيغة والنهايات. ## Formal -$f$ متصلة عند $c$ إذا وفقط إذا تحقق $\lim_{x\to c^-}f(x) = \lim_{x\to c^+}f(x) = f(c)$. +عند نقطة داخلية c، تكون الدالة متصلة إذا وفقط إذا كان $\lim_{x\to c^-}f(x)=\lim_{x\to c^+}f(x)=f(c)$. خصوصًا، يجب أن تكون f(c) معرّفة، وأن توجد النهاية من الجهتين وتساويها. -هنا $f(1) = 1 + j$، باستخدام تعريف الفرع الأيمن عند الحد، و$\lim_{x\to1^-}f = 1$، و$\lim_{x\to1^+}f = 1+j$. ويتطلب الاتصال أن يكون $j = 0$. +هنا $f(x)=x^2$ عندما تكون x < 1، و$f(x)=x^2+j$ عندما تكون x ≥ 1. النهاية اليسرى 1، بينما تتفق النهاية اليمنى مع $f(1)=1+j$. لذلك يتحقق الاتصال عند 1 إذا وفقط إذا كان $j=0$. القفزة بين النهايتين بإشارتها j، ومقدارها |j|. ## Advanced -هذا انقطاع قفزي، إذ توجد كلتا النهايتين الجانبيتين لكنهما مختلفتان. ويختلف عن الانقطاع القابل للإزالة، حيث تتفق النهايتان لكنهما تختلفان عن $f(c)$ أو تكون $f(c)$ غير معرّفة، وعن الانقطاعات الجوهرية أو اللانهائية التي رأيناها مع $1/x$ أو $\tan x$. تغطي هذه الأنواع الثلاثة كل طريقة يمكن أن تفشل بها الدالة في أن تكون متصلة عند نقطة. +في الانقطاع القفزي توجد نهايتان جانبيتان منتهيتان مختلفتان. أما الانقطاع القابل للإزالة فله نهاية مشتركة منتهية، لكن قيمة الدالة غائبة أو مختلفة؛ ويمكن إصلاحه بتغيير تلك القيمة وحدها. ومن صور الانقطاع الأخرى السلوك غير المحدود والتذبذب دون نهاية. تغيير f(1) وحدها لا يصلح قفزة غير صفرية هنا. ## Derivation -1. الاقتراب من اليسار يستخدم الفرع $x^2$. -2. الاقتراب من اليمين يستخدم الفرع الآخر. -3. يتطلب الاتصال أن تتفق النهايتان الجانبيتان، وهذا يفرض $j=0$. +1. تستخدم المدخلات المقتربة من 1 من اليسار x²، ونهايتها 1. +2. تستخدم المدخلات المقتربة من اليمين x² + j، ونهايتها 1 + j. وتستخدم قيمة الدالة عند الحد هذا الفرع أيضًا. +3. نساوي النهايتين. تتطلب 1 = 1 + j أن تكون j = 0، وعندها تتفق قيمة الحد معهما أيضًا. ## Real world -### شرائح الضريبة -يمكن لجدول ضريبي سيئ التصميم أن يقفز قفزة انقطاع عند حد شريحة، بحيث يكلفك كسب دولار إضافي أكثر بكثير من دولار في الضرائب. +### تقريب القياسات -### الأحمال الإنشائية -يمكن للتغيرات المفاجئة في مادة عارضة أن تُنشئ توزيعات إجهاد غير متصلة يجب على المهندسين تنعيمها أو مراعاتها. +إذا قرّبنا قياسًا متصلًا إلى أقرب عدد صحيح، أصبح الناتج دالة درجية. عبور حد التقريب يغيّر القيمة المعلنة فجأة، حتى لو تغير المقدار الأصلي بسلاسة. -### تكميم الإشارة الرقمية -يُدخل تقريب الإشارة المتصلة إلى مستويات منفصلة انقطاعات قفزية عند حدود التقريب. +### وصل صيغتين -### التحولات الطورية -تقفز بعض الكميات الفيزيائية، مثل الكثافة عند تحول طوري، قفزة انقطاع حين تعبر درجة الحرارة عتبة معينة. +عندما تصف صيغتان نطاقين متجاورين من المدخلات، نقارن نهايتيهما والقيمة المسندة عند الحد. لا يكفي تطابق الميلين أو بضع عينات مرسومة لإثبات الاتصال. diff --git a/content/lessons/calculus/continuity/en.md b/content/lessons/calculus/continuity/en.md index 65f7f9c4..6ded6184 100644 --- a/content/lessons/calculus/continuity/en.md +++ b/content/lessons/calculus/continuity/en.md @@ -1,67 +1,60 @@ --- title: Continuity and jump discontinuities -summary: >- - A tax schedule that jumps at a bracket boundary can cost you more than the - extra dollar you earned — continuity is the idea that tells you whether a - schedule does that. +summary: 'Check whether the two limiting values at a boundary agree with the function value there.' parameters: - d: distance from x = 1 - j: jump size j + d: 'd — sampling distance from 1' + j: 'j — signed shift of the right branch' variables: - - the size of the jump added for $x \ge 1$ - - distance of the two approaching points from $x=1$ + - 'j: amount added when x ≥ 1' + - 'd: marked inputs are 1 − d and 1 + d' --- ## Try it -1. With «jump size j» away from 0, shrink «distance from x = 1» toward 0. The two dots settle at two different heights. -2. Drag «jump size j» down to exactly 0. The step in the graph disappears. -3. Shrink «distance from x = 1» again. Now both dots settle on the same point — the graph never lifts the pen. +1. Set j = 1.5 and d = 0.1. The marked values are f(0.9) = 0.81 and f(1.1) = 2.71. Reduce d: the left value approaches 1 and the right approaches 2.5. +2. Set j = 0. Both branches now use x², and both sides approach f(1) = 1. +3. Set j = −2 and d = 0.02. The marked values are 0.9604 and −0.9596, approaching distinct limits 1 and −1. The readout table samples the right side only; the branch formulas explain both sides. ## Real-life examples -1. **A smooth tax curve.** With no jump (j = 0), earning one more dollar never costs you a sudden extra chunk of tax — the schedule is continuous. -2. **A moderate bracket jump.** With j = 1.5, crossing x = 1 suddenly adds 1.5 to the amount owed — a real step, like a poorly designed tax bracket. -3. **A steep rebate cliff.** With j = -2, crossing x = 1 suddenly drops the value by 2 — like a rebate that disappears the moment you earn one dollar too many. +1. **No jump.** At j = 0 and d = 0.3, the marked values are 0.49 and 1.69. They differ at this finite distance but approach the same value 1 as d shrinks. +2. **Upward jump.** At j = 1.5 and d = 0.3, the marked values are 0.49 and 3.19. The limiting jump is 1.5, not their current difference 2.7. +3. **Downward jump.** At j = −2 and d = 0.1, the marked values are 0.81 and −0.79. Their limits are 1 and −1, giving a jump of −2. ## Test yourself -1. Make the function continuous: find the jump size that closes the gap. -2. Create a downward jump of exactly 2, where the right side sits 2 below the left. -3. Shrink the approach distance below 0.05 while keeping a jump bigger than 1 in size. +1. Choose j so that the function is continuous at x = 1. +2. Create a downward jump of 2 by setting j = −2. +3. Make d less than 0.05 while keeping |j| greater than 1. ## Intuition -Think of a tax rule where crossing a certain income suddenly adds an extra charge, like a jump of 1.5 the moment you earn one dollar too many. On screen the same idea is drawn as two dots sliding toward the input value 1 from opposite sides — one creeping up from below, one creeping down from above — with the slider «distance from x = 1» setting how close they still are. +This function uses x² to the left of 1 and x² + j at and to the right of 1. The parameter j moves only the right branch vertically. If j is 1.5, the left branch approaches 1 at the boundary while the right branch approaches 2.5. Getting closer to the boundary does not close that gap. -With «jump size j» away from 0, shrink that distance: the left dot settles near height 1, but the right dot settles near a different height, 1 plus the jump. Now drag «jump size j» down to exactly 0: the step disappears, both dots meet at the same height, and the curve can be traced through that point without ever lifting a pen — that is continuity. +Continuity requires more than two close dots. The left-hand limit, right-hand limit and value at the boundary must agree. Setting j to zero makes that happen here. Changing d only changes where we sample the existing function; it cannot repair a jump. The drawn stroke can visually join samples across a discontinuity, so judge continuity from the formula and limits. ## Formal -$f$ is continuous at $c$ iff $\lim_{x\to c^-}f(x) = \lim_{x\to c^+}f(x) = f(c)$. +At an interior point c, a function is continuous exactly when $\lim_{x\to c^-}f(x)=\lim_{x\to c^+}f(x)=f(c)$. In particular, f(c) must be defined and the two-sided limit must exist and equal it. -Here $f(1) = 1 + j$ (using the right branch's definition at the boundary), $\lim_{x\to1^-}f = 1$, $\lim_{x\to1^+}f = 1+j$; continuity requires $j = 0$. +Here $f(x)=x^2$ for x < 1 and $f(x)=x^2+j$ for x ≥ 1. The left limit is 1, while the right limit and $f(1)=1+j$ agree. Therefore continuity at 1 holds exactly when $j=0$. The signed limiting jump is j and its size is |j|. ## Advanced -This is a jump discontinuity (both one-sided limits exist but disagree), distinct from a removable discontinuity (limits agree but differ from $f(c)$, or $f(c)$ is undefined) and from the essential/infinite discontinuities seen with $1/x$ or $\tan x$ — the three types cover every way a function can fail to be continuous at a point. +A jump has two distinct finite one-sided limits. A removable discontinuity has a finite common limit but a missing or different function value; changing that single value can repair it. Other failures include unbounded behaviour and oscillation without a limiting value. Changing only f(1) cannot repair a nonzero jump here. ## Derivation -1. Approaching from the left uses the branch $x^2$. -2. Approaching from the right uses the other branch. -3. Continuity needs the two one-sided limits to agree — forces $j=0$. +1. Inputs approaching 1 from below use x², whose limit is 1. +2. Inputs approaching from above use x² + j, whose limit is 1 + j. The value at the boundary also uses this branch. +3. Set the limits equal. The equation 1 = 1 + j requires j = 0, which also makes the boundary value agree. ## Real world -### Tax brackets -A poorly designed tax schedule can jump discontinuously at a bracket boundary, so earning one more dollar costs you far more than a dollar in tax. +### Rounding measurements -### Structural loads -Sudden material changes in a beam can create discontinuous stress profiles that engineers must smooth or account for. +A continuous measurement rounded to the nearest integer becomes a step function. Crossing a rounding boundary changes the reported value abruptly even if the underlying quantity changes smoothly. -### Digital signal quantization -Rounding a continuous signal to discrete levels introduces jump discontinuities at the rounding boundaries. +### Joining formulas -### Phase transitions -Some physical quantities (like density at a phase change) jump discontinuously as temperature crosses a threshold. +When two formulas describe adjacent input ranges, compare their limits and the assigned boundary value. Matching only their slopes or only a few plotted samples does not establish continuity. From 79d7b1d88ce1cc96d01c74a9ce7d104ec0945487 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:36:02 +0300 Subject: [PATCH 065/124] content: rewrite differential-equations-intro for first-time learners in both languages --- .../differential-equations-intro/ar.md | 67 +++++++++--------- .../differential-equations-intro/en.md | 69 +++++++++---------- .../differential-equations-intro/lesson.yaml | 2 +- 3 files changed, 63 insertions(+), 75 deletions(-) diff --git a/content/lessons/calculus/differential-equations-intro/ar.md b/content/lessons/calculus/differential-equations-intro/ar.md index a8bf646e..e99b3fa7 100644 --- a/content/lessons/calculus/differential-equations-intro/ar.md +++ b/content/lessons/calculus/differential-equations-intro/ar.md @@ -1,70 +1,65 @@ --- title: مقدّمة في المعادلات التفاضلية -summary: >- - كم سمكة يمكن صيدها كل موسم دون أن ينقرض السمك؟ معادلة تفاضلية تجيب. +summary: 'استخدم معادلة للمعدل وكمية ابتدائية لاستكشاف الاتزان مع إزالة ثابتة.' parameters: - k: معدّل النمو k - K: الطاقة الاستيعابية K - h: كمّية الحصاد لكل وحدة زمن h - y0: عدد السكان الابتدائي y0 - tView: الزمن + k: 'k — ثابت معدل النمو النسبي' + K: 'K — السعة دون إزالة' + h: 'h — الكمية الثابتة المزالة لكل وحدة زمن' + y0: 'y₀ — الكمية الابتدائية' + tView: 'موضع الزمن — من 0 إلى 1 عبر 40 وحدة زمن' variables: - - عدد السكان عند الزمن t - - معدّل النمو الجوهري - - الطاقة الاستيعابية، أي عدد السكان الذي تتحمّله البيئة - - كمّية ما يُحصد (يُزال) لكل وحدة زمن + - 'y: الكمية عند الزمن t' + - 'k: معدل النمو النسبي الذاتي' + - 'K: كمية الاتزان عندما تكون h = 0' + - 'h: معدل إزالة ثابت بوحدة كمية لكل زمن' --- ## Try it -1. حرّك «الزمن» من البداية. يتصاعد عدد السكان راسمًا المنحنى الوحيد المتّسق مع قاعدة النمو والقيمة الابتدائية. -2. ارفع «كمّية الحصاد لكل وحدة زمن h». يستقر المنحنى عند توازن أدنى، لأنك تزيل كمّية أكبر فيبقى عدد أقل من السكان. -3. ادفع «h» عاليًا بما يكفي. يتوقف المنحنى عن الاستقرار كليًا وينحدر إلى الصفر، فالحصاد الآن يفوق النمو. +1. اضبط k = 0.5 وK = 100 وh = 5 وy₀ = 30. شغّل المحاكاة أو اسحب مؤشر الزمن. تزداد الكمية نحو الاتزان العلوي، نحو 88.73. +2. أبقِ المعدلات نفسها واضبط y₀ = 5. تقع هذه البداية دون الاتزان السفلي، نحو 11.27، فتتناقص الكمية بدلًا من الزيادة. للقيمة الابتدائية أهمية إلى جانب معدل الإزالة. +3. اضبط h = 15. تتجاوز kK/4 = 12.5، فيكون المعدل سالبًا عند كل كمية غير سالبة. نفسر النموذج السكاني فقط حتى أول بلوغ للصفر؛ فالقيم العددية بعد ذلك لا تمثل جماعة حية. ## Real-life examples -1. **حصة صيد مستدامة.** مع معدل نمو k = 0.5 وطاقة استيعابية K = 150، يبقى حصاد h = 5 لكل وحدة زمن دون أقصى ما يتحمّله مخزون السمك بأمان. -2. **تقليل حذر لحياة برية.** مع k = 0.3 وK = 100، يقترب تقليل بمقدار h = 7 من أسرع معدل تعويض يتحمله عدد السكان، وهذا هامش أمان ضيق. -3. **انهيار بسبب الإفراط في الحصاد.** مع k = 0.4 وK = 80، يزيل حصاد h = 12 عددًا أسرع مما يمكن تعويضه أبدًا، فلا يبقى توازن وينحدر عدد السكان إلى الصفر. +1. **فوق العتبة السفلى.** مع k = 0.5 وK = 150 وh = 5، يكون الاتزانان نحو 10.77 و139.23. تؤدي البداية y₀ = 30 نحو المستوى العلوي في هذا النموذج. +2. **مستويان أقرب.** مع k = 0.3 وK = 100 وh = 7، يكون الاتزانان نحو 37.09 و62.91. تؤدي البداية 50 نحو 62.91؛ أما البداية دون 37.09 فتتناقص نحو الصفر. +3. **إزالة تفوق كل معدلات النمو.** مع k = 0.4 وK = 80 وh = 12، يكون أقصى معدل نمو 8. بدءًا من 60، تفوق الإزالة النمو ولا يوجد اتزان غير سالب. ## Test yourself -1. جد معدّل حصاد h، أكبر من 0، ما زال يترك توازنًا مستقرًا وموجبًا. -2. ادفع h عاليًا بما يكفي حتى ينهار عدد السكان إلى الصفر، فلا يبقى أي توازن. -3. اضبط h ليطابق أقصى محصول مستدام بالضبط، عند حافة الانهيار مباشرة. +1. اختر h موجبة وأقل من kK/4. يعطي ذلك اتزانين موجبين، العلوي منهما مستقر؛ ولا يفحص التمرين هل تقع y₀ فوق العتبة السفلى. +2. اختر h أكبر من kK/4، فلا يوجد اتزان غير سالب. +3. اجعل h تختلف عن kK/4 بما لا يتجاوز 0.5. تمثل المساواة الدقيقة الحد الذي يندمج عنده الاتزانان. ## Intuition -تخيل بحيرة فيها 30 سمكة، ويصطاد الصيادون كل موسم عددًا ثابتًا إضافيًا منها. يرسم المنحنى على الشاشة كيف يتغيّر عدد السمك بمرور الزمن، بدءًا من ذلك العدد 30، الذي يضبطه المنزلق «عدد السكان الابتدائي y0». لا يُرسم المنحنى يدويًا، بل ينشأ من قاعدة. في كل لحظة يعتمد معدل تغيّر عدد السكان على عدد السمك الموجود فعلًا وعلى عدد ما يُصطاد. +تعطي المعادلة التفاضلية معدلًا، بدل إعطاء الكمية المستقبلية مباشرة. يضيف النمو هنا ky(1 − y/K)، وتطرح الإزالة الثابتة h لكل وحدة زمن. بدءًا من y₀، تقدر المحاكاة التغيرات المتتابعة باستخدام ذلك المعدل. يختار منزلق الزمن نقطة على المسار المحسوب؛ ويغطي مجاله من 0 إلى 1 الفترة المعروضة من 0 إلى 40 وحدة زمن. -ارفع منزلق «كمّية الحصاد لكل وحدة زمن h»، وهو عدد الأسماك التي تُزال كل موسم. يستقر المنحنى عند مستوى مسطح أدنى، فما زال عدد السكان ناجيًا لكن بحجم أصغر. ادفع «h» عاليًا بما يكفي فيتوقف المنحنى عن الاستقرار كليًا. الصيادون الآن يصطادون أسرع مما يستطيع عدد السكان تعويضه، فينحدر المنحنى مباشرة إلى الصفر. +الاتزان كمية تتساوى عندها الإضافة والإزالة. عندما تكون الإزالة أقل من أكبر معدل نمو ممكن، توجد نقطتا اتزان موجبتان. تجذب العليا الكميات القريبة، وتفصل السفلى بين نتيجتين: البداية فوقها تقترب من الاتزان العلوي، والبداية تحتها تتناقص نحو الصفر. لذلك قد تعطي المعدلات نفسها نتائج مختلفة بحسب الكمية الابتدائية. ## Formal -تربط المعادلة التفاضلية كمّية بمعدّل تغيّرها. هنا تقول $\dfrac{dy}{dt} = ky\left(1-\dfrac{y}{K}\right) - h$ إن النمو يتبع الحدّ اللوجستي $ky(1-y/K)$، لكن تُزال كمّية ثابتة $h$ كل وحدة زمن. +النموذج هو $dy/dt=ky(1-y/K)-h$، مع k > 0 وK > 0 وh ≥ 0 وكمية ابتدائية محددة y₀. تحقق حالات الاتزان $ky(1-y/K)=h$. عندما يكون $0kK/4$، فالمعدل سالب لكل y غير سالبة. لا تفرض المعادلة y ≥ 0؛ فمعدلها عند الصفر −h، لذا يفقد استمرارها دون تعديل بعد النفاد تفسيره السكاني. ## Advanced -القيمة القصوى للحدّ اللوجستي $ky(1-y/K)$ هي $\dfrac{kK}{4}$، وتتحقّق عند $y=K/2$. وهذا أقصى ما يمكن لعدد السكان أن ينمو به. حين يتجاوز $h$ القيمة $\dfrac{kK}{4}$ يفوق الحصاد النمو دائمًا، فلا يوجد توازن على الإطلاق، وينهار كل مسار إلى الصفر مهما كان عدد السكان الابتدائي. +نكتب المعدل kK/4 − (k/K)(y − K/2)² − h لنرى قيمته العظمى مباشرة. عند h = 0، الاتزانان صفر وK. المنحنى العددي تقريب على فترة زمنية منتهية، وليس برهانًا على نهاية بعيدة المدى. تحتاج قاعدة الإزالة الثابتة إلى تعديل عند النفاد لوصف جماعة فعلية بعده. ## Derivation -1. اكتب قانون المعدّل، وهو النمو اللوجستي ناقص حصاد ثابت. -2. اجعل المعدّل صفرًا لتجد أين يتوقّف عدد السكان عن التغيّر. -3. القيمة القصوى للحدّ اللوجستي نفسه هي أكبر حصاد يمكن لعدد السكان تحمّله. +1. نحدد المعدل اللحظي بالنمو اللوجستي ناقص كمية ثابتة تزال لكل وحدة زمن. +2. نجعل المعدل صفرًا لإيجاد كميات الاتزان. نحل المعادلة التربيعية ونفحص إشارة المعدل بين الجذرين وخارجهما. +3. يبلغ حد النمو أقصاه kK/4 عند K/2. تحدد مقارنة h بهذا المقدار عدد مستويات الاتزان، ولا تكفي وحدها للحكم على بقاء كمية ابتدائية مختارة. ## Real world -### إدارة مصايد الأسماك -تُحدَّد الحصص أقل من أقصى محصول مستدام لمخزون سمكي، وهو بالضبط حدّ $kK/4$ في هذا النموذج، لتجنّب الانهيار. +### موازنة الإنتاج والإزالة -### علم الأوبئة -النمط نفسه من المعادلة، حدّ نمو ناقص حدّ إزالة، يصف برامج التطعيم أو العلاج التي تزيل مصابين من التداول. +يقارن نموذج مخزون بين معدل الإنتاج ومعدل التدفق الخارج. تحدد افتراضاته والكمية الابتدائية مساره؛ وليس حد معدل مستنتج من نموذج مثالي قاعدة تشغيل عامة. -### الهندسة الكيميائية -يتبع مفاعل مخلوط باستمرار، وله تدفّق خارج ثابت، موازنة معدّل مماثلة بين الإنتاج والإزالة. +### اختبار مسألة قيمة ابتدائية -### حفظ الحياة البرية -تُحدَّد حصص الصيد أو التقليل من نوع مُدار باستخدام تحليل التوازن نفسه، لمنع حصاد عدد السكان حتى الانقراض. +يكشف تغيير y₀ مع تثبيت معادلة المعدل النتائج التي تعتمد على البداية. وتساعد مقارنة المسارات المتقاربة على تمييز الاتزان المستقر من غير المستقر. diff --git a/content/lessons/calculus/differential-equations-intro/en.md b/content/lessons/calculus/differential-equations-intro/en.md index 77241cd7..5bf5456a 100644 --- a/content/lessons/calculus/differential-equations-intro/en.md +++ b/content/lessons/calculus/differential-equations-intro/en.md @@ -1,72 +1,65 @@ --- title: An introduction to differential equations -summary: >- - A fishing crew wants to know how many fish they can catch every season - without ever driving the population to zero — this idea works out that - safe catch rate. +summary: 'Use a rate equation and a starting amount to explore equilibria under constant removal.' parameters: - k: growth rate k - K: carrying capacity K - h: harvest per unit time h - y0: starting population y0 - tView: time + k: 'k — proportional growth-rate constant' + K: 'K — capacity without removal' + h: 'h — constant amount removed per time unit' + y0: 'y₀ — initial amount' + tView: 'time position — 0 to 1 across 40 time units' variables: - - the population at time t - - the intrinsic growth rate - - the carrying capacity, the population the environment can support - - how much is harvested (removed) per unit time + - 'y: amount at time t' + - 'k: intrinsic proportional growth rate' + - 'K: equilibrium amount when h = 0' + - 'h: fixed removal rate, in amount per time' --- ## Try it -1. Drag «time» from the start. The population climbs, tracing out the one curve consistent with the growth rule and the starting value. -2. Raise «harvest per unit time h». The curve settles at a lower equilibrium — more is being removed, so less remains. -3. Push «h» high enough. The curve stops levelling off at all and runs down to zero: harvest now outpaces growth. +1. Set k = 0.5, K = 100, h = 5 and y₀ = 30. Play the simulation or drag its time marker. The amount increases toward the upper equilibrium, about 88.73. +2. Keep the same rates but set y₀ = 5. This lies below the lower equilibrium, about 11.27, so the amount decreases instead. The starting value matters as well as the removal rate. +3. Set h = 15. It exceeds kK/4 = 12.5, so the rate is negative at every nonnegative amount. Interpret the population model only until it first reaches zero; numerical values beyond that point do not represent a population. ## Real-life examples -1. **A sustainable fishing quota.** With growth rate k = 0.5 and capacity K = 150, a harvest of h = 5 per unit time stays safely below the maximum the fish stock can regrow. -2. **A cautious wildlife cull.** With k = 0.3 and K = 100, a cull of h = 7 sits close to the fastest regrowth rate the population can sustain — a narrow safety margin. -3. **Overharvesting collapse.** With k = 0.4 and K = 80, a harvest of h = 12 removes population faster than it can ever regrow, so no equilibrium exists and the population is driven to zero. +1. **Above the lower threshold.** With k = 0.5, K = 150 and h = 5, the equilibria are about 10.77 and 139.23. Starting at y₀ = 30 leads toward the upper level in this model. +2. **Closer equilibrium levels.** With k = 0.3, K = 100 and h = 7, the equilibria are about 37.09 and 62.91. Starting at 50 leads toward 62.91; a start below 37.09 would decrease toward zero. +3. **Removal exceeds all growth rates.** With k = 0.4, K = 80 and h = 12, the maximum growth rate is 8. Starting at 60, removal exceeds growth and no nonnegative equilibrium exists. ## Test yourself -1. Find a harvest rate h, above 0, that still leaves a stable, positive equilibrium. -2. Push h high enough that the population collapses to zero — no equilibrium survives. -3. Tune h to match the maximum sustainable yield exactly, right at the edge of collapse. +1. Choose a positive h less than kK/4. This gives two positive equilibria, including a stable upper one; the check does not test whether y₀ lies above the lower threshold. +2. Choose h greater than kK/4, so no nonnegative equilibrium exists. +3. Make h differ from kK/4 by at most 0.5. The exact equality is the boundary where the two equilibria merge. ## Intuition -Imagine a lake stocked with 30 fish, and every season fishers pull out a fixed number more. The curve on screen traces how the fish population changes over time, starting from that number 30, set by the slider «starting population y0». The curve is not drawn by hand — it grows out of a rule: at every moment, how fast the population changes depends on how many fish are already there and on how many are being caught. +A differential equation gives a rate instead of directly giving the future amount. Here growth adds ky(1 − y/K), while constant removal subtracts h per time unit. Starting from y₀, the simulation estimates successive changes using that rate. The time control selects a point on the computed trajectory; its range 0 to 1 covers the displayed 0 to 40 time units. -Raise the slider «harvest per unit time h», the number of fish removed each season. The curve settles onto a lower flat level — the population still survives, just at a smaller size. Push «h» high enough and the curve stops flattening out at all: fishers are now pulling fish out faster than the population can replace them, and the curve runs straight down to zero. +An equilibrium is an amount where addition and removal balance. Below the maximum possible growth rate, there are two positive balance points. The upper one attracts nearby amounts, while the lower one separates outcomes: start above it and approach the upper equilibrium; start below it and decrease toward zero. The same rate settings can therefore produce different outcomes from different initial amounts. ## Formal -A differential equation states a relationship between a quantity and its own rate of change; here $\dfrac{dy}{dt} = ky\left(1-\dfrac{y}{K}\right) - h$ says growth follows the logistic term $ky(1-y/K)$ but a constant amount $h$ is removed every unit of time. +The model is $dy/dt=ky(1-y/K)-h$, with k > 0, K > 0, h ≥ 0 and a specified initial amount y₀. Equilibria solve $ky(1-y/K)=h$. For $0kK/4$, the rate is negative for every nonnegative y. The equation does not enforce y ≥ 0: at zero its rate is −h, so continuing it unchanged past depletion loses the population interpretation. ## Advanced -The logistic term $ky(1-y/K)$ has a maximum value of $\dfrac{kK}{4}$, reached at $y=K/2$; this is the fastest the population can possibly regrow. Once $h$ exceeds $\dfrac{kK}{4}$, harvest always outpaces growth, no equilibrium exists at all, and every trajectory collapses to zero regardless of the starting population. +Write the rate as kK/4 − (k/K)(y − K/2)² − h to see its maximum directly. At h = 0, the equilibria are zero and K. The numerical curve is an approximation over a finite time window, not a proof of an asymptotic limit. A constant-removal rule would need modification at depletion to describe a physical population thereafter. ## Derivation -1. State the rate law: logistic growth minus a constant harvest. -2. Set the rate to zero to find where the population would stop changing. -3. The logistic term's own maximum value is the largest harvest the population can sustain. +1. Specify the instantaneous rate as logistic growth minus a fixed amount removed per unit time. +2. Set that rate to zero to locate equilibrium amounts. Solve the quadratic and examine the rate's sign between and outside the roots. +3. The growth term reaches its maximum kK/4 at K/2. Comparing h with that maximum determines how many equilibrium levels exist, not by itself whether a chosen initial population persists. ## Real world -### Fisheries management -Quotas are set below the maximum sustainable yield of a fish stock, exactly the $kK/4$ threshold in this model, to avoid collapse. +### Balancing production and removal -### Epidemiology -The same style of equation, a growth term minus a removal term, describes vaccination or treatment programmes removing infected individuals from circulation. +A stock model compares a production rate with an outflow rate. Its assumptions and initial amount determine the trajectory; a rate threshold from an ideal model is not a universal operating rule. -### Chemical engineering -A continuously stirred reactor with a constant outflow follows an identical rate balance between production and removal. +### Testing an initial-value problem -### Wildlife conservation -Culling or hunting quotas for a managed species are set using the same equilibrium analysis to keep a population from being harvested to extinction. +Changing y₀ while keeping the rate equation fixed reveals which outcomes depend on the starting state. Comparing nearby trajectories helps identify stable and unstable equilibria. diff --git a/content/lessons/calculus/differential-equations-intro/lesson.yaml b/content/lessons/calculus/differential-equations-intro/lesson.yaml index 5470c560..611be1eb 100644 --- a/content/lessons/calculus/differential-equations-intro/lesson.yaml +++ b/content/lessons/calculus/differential-equations-intro/lesson.yaml @@ -16,7 +16,7 @@ visualization: options: vars: [y] equations: ['k*y*(1 - y/K) - h'] - initial: y0 + initial: [y0] tMax: 40 parameters: k: From 34cff43509c12863497df9c41e0d721e5101f44d Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:36:02 +0300 Subject: [PATCH 066/124] content: rewrite exponential-growth for first-time learners in both languages --- .../lessons/calculus/exponential-growth/ar.md | 61 +++++++++--------- .../lessons/calculus/exponential-growth/en.md | 63 +++++++++---------- 2 files changed, 56 insertions(+), 68 deletions(-) diff --git a/content/lessons/calculus/exponential-growth/ar.md b/content/lessons/calculus/exponential-growth/ar.md index 5b09108c..a03ad34a 100644 --- a/content/lessons/calculus/exponential-growth/ar.md +++ b/content/lessons/calculus/exponential-growth/ar.md @@ -1,67 +1,62 @@ --- title: النمو والتحلل الأسي -summary: >- - مال يكسب فائدة على فائدته يكبر أسرع فأسرع. القاعدة نفسها تصف التحلل أيضًا. +summary: 'استكشف كمية يتناسب معدل تغيرها اللحظي مع مقدارها الحالي.' parameters: - k: ثابت المعدل k - y0: الكمية الابتدائية y₀ - x: الزمن t + k: 'k — معدل التغير النسبي اللحظي' + y0: 'y₀ — الكمية عند الزمن صفر' + x: 't — الزمن المختار' variables: - - الكمية الموجودة عند الزمن t - - نسبة التغيّر لكل وحدة زمن - - الكمية عند t = 0 + - 'y: الكمية عند الزمن t' + - 'k: المعدل اللحظي مقسومًا على الكمية الحالية' + - 'y₀: الكمية الابتدائية الموجبة' --- ## Try it -1. اسحب النقطة على طول المنحنى. قارن قراءة الميل بقراءة الارتفاع. الميل دائمًا يساوي «ثابت المعدل k» مضروبًا في الارتفاع. -2. اجعل «ثابت المعدل k» سالبًا. ينخفض المنحنى الآن بدلًا من أن يرتفع. -3. اسحب «الكمية الابتدائية y₀» لأعلى ولأسفل. يتمدد المنحنى كله معها، لكن زمن التضاعف أو عمر النصف يبقى كما هو. +1. اضبط y₀ = 1 وk = 0.25 وt = 4. تكون الكمية نحو 2.7183 والميل نحو 0.6796. قسمة الميل على الكمية تعطي 0.25. +2. اضبط k = −0.3 وy₀ = 8. حرّك t من 0 إلى 5؛ تنخفض الكمية إلى نحو 1.785، وتتناقص القيمة المطلقة للميل السالب. +3. اضبط k = 0. تبقى الكمية مساوية لـy₀ في كل وقت. عندما تكون k غير صفرية، يغيّر تعديل y₀ حجم المنحنى دون تغيير زمن التضاعف أو التنصيف. ## Real-life examples -1. **فائدة مركبة على مدى عقد.** بدءًا من y₀ = 1 ومعدل متواضع k = 0.05، تزيد عشر سنوات من التراكم (x = 10) المبلغ زيادة ملحوظة. -2. **تحلل إشعاعي لعينة.** بدءًا من y₀ = 8 ومعدل تحلل k = 0.3-، بعد 5 وحدات زمنية (x = 5) يكون معظم العينة قد تحلل بالفعل. -3. **انتشار مبكر لوباء.** بدءًا من y₀ = 0.5 ومعدل نمو سريع k = 0.4، عند x = 8 يكون العدد قد تضاعف تضاعفًا هائلاً، ولهذا تبدو الفاشيات المبكرة متفجرة. +1. **نمو مستمر بطيء.** مع y₀ = 1 وk = 0.05، تكون الكمية عند t = 10 نحو 1.649. معامل الزيادة خلال وحدة زمنية هو $e^{0.05}$، أي نحو 1.05127، وليس 1.05 تمامًا. +2. **تناقص مستمر.** مع y₀ = 8 وk = −0.3، تكون الكمية عند t = 5 نحو 1.785، أي نحو 22.3% من البداية. +3. **نمو أسرع.** مع y₀ = 0.5 وk = 0.4، تكون الكمية عند t = 8 نحو 12.266. تتجاوز حد الرسم العلوي 12؛ استخدم القراءة العددية. ## Test yourself -1. اجعل الكمية تصل إلى نحو 5. -2. اجعل الكمية تتحلل حتى تصبح أقل من 0.1. -3. جد معدلًا وزمنًا تتضاعف عندهما الكمية بالضبط عن قيمتها الابتدائية. +1. اجعل الكمية تختلف عن 5 بما لا يتجاوز 0.3. +2. اجعل الكمية أقل من 0.1. +3. اجعل معامل الزيادة عن البداية يختلف عن 2 بما لا يتجاوز 0.1. ## Intuition -تخيل حساب توفير فيه 100 دولار اليوم، وهذا الرصيد الابتدائي هو المنزلق «الكمية الابتدائية y₀». يكسب الحساب كل سنة نسبة مما فيه فعلًا، يحددها «ثابت المعدل k». عند 100 دولار قد تكسب 5 دولارات، لكن بعدما يكبر الرصيد إلى 200 دولار تكسب النسبة نفسها 10 دولارات في السنة. اسحب النقطة على طول المنحنى وقارن بين القراءتين. الميل، أي سرعة تصاعد الرصيد الآن، يساوي دائمًا «ثابت المعدل k» مضروبًا في الارتفاع الحالي. +افترض أن كمية تنمو بمعدل لحظي يساوي ربع مقدارها الحالي لكل وحدة زمن. عندما تكون الكمية 2، يكون المعدل 0.5؛ وعندما تصبح 4، يكون المعدل 1. يتسارع النمو لأن معدله يعتمد على المقدار الموجود بالفعل. يحدد الثابت k هذا التناسب، بينما y₀ هي الكمية عند الزمن صفر. -اجعل الآن «ثابت المعدل k» سالبًا، كعينة مشعة بدلًا من حساب بنكي. القاعدة نفسها تقول الآن إن الذرات المتبقية كلما زاد عددها زادت سرعة تحللها، فينخفض المنحنى بسرعة في البداية ثم ببطء متزايد، يقترب من الصفر دون أن يلمسه أبدًا. +تجعل k السالبة الكمية تتناقص. وكلما قلّ المتبقي، صغر مقدار النقص لكل وحدة زمن. في النموذج المستمر تقترب الكمية الموجبة من الصفر دون أن تبلغه في زمن منتهٍ. يعرض الرسم قاعدة مثالية لمعدل متناسب؛ ولا يتبعها واقع معين إلا ما دام افتراض ثبات المعدل مناسبًا. ## Formal -المعادلة $y' = ky$ مع $y(0) = y_0$ لها حل وحيد هو $y = y_0 e^{kt}$. +لثابت k، يكون حل مسألة القيمة الابتدائية $dy/dt=ky$ مع $y(0)=y_0$ هو $y(t)=y_0e^{kt}$. نستخدم هنا y₀ موجبة. وحدة ثابت المعدل هي مقلوب الزمن، لذا يكون kt بلا وحدة. يمثل الإحداثي الأفقي x الزمن t في الرسم. -زمن التضاعف (أو عمر النصف) هو $\ln 2 / |k|$، وهو مستقل عن الكمية الحالية. +عندما يكون $k>0$، يكون زمن التضاعف $T_2=\ln2/k$. وعندما يكون $k<0$، يكون عمر النصف $T_{1/2}=\ln2/(-k)$. لا يعتمد الزمنان على y₀. وعند k = 0 تبقى الكمية الموجبة ثابتة، فلا يوجد زمن منتهٍ لتضاعفها أو وصولها إلى النصف. ## Advanced -تعني الوحدانية أنه إذا كانت $y$ حلًا للمعادلة فإن $\frac{d}{dt}\left(y e^{-kt}\right) = 0$، أي أن $y e^{-kt}$ ثابتة. وهذه الحيلة، حيلة العامل المكامل، تعمم على كل معادلة تفاضلية خطية من الرتبة الأولى. +خلال فترة منتهية Δt، يكون معامل التغير $e^{k\Delta t}$، والتغير النسبي $e^{k\Delta t}$ − 1. يفيد التقريب kΔt فقط عندما تكون قيمته المطلقة صغيرة. ضرب الحل في $e^{-kt}$ يعطي ثابتًا، وهو ما يوضح أيضًا لماذا يختار الشرط الابتدائي حلًا وحيدًا. ## Derivation -1. افصل المتغيرات، بحيث يكون كل ما يتعلق بـ $y$ في جهة واحدة. -2. كامل الطرفين. -3. خذ الأس، ويتحدد الثابت من الكمية الابتدائية. +1. بما أن y موجبة هنا، نقسم عليها ونفصل متغير الكمية عن متغير الزمن. +2. نكامل الطرفين: تكامل 1/y هو ln y، وتكامل الثابت k هو kt. +3. نأخذ الأس، ثم نستخدم شرط الزمن صفر لتحديد العامل الموجب $e^C$ بأنه y₀. ## Real world -### الفائدة المركبة -المال الذي يكسب نسبة مئوية من نفسه ينمو نموًا أسيًا. +### نموذج فقد متناسب ثابت -### التحلل الإشعاعي -لكل نواة احتمال ثابت للتحلل في كل ثانية، ولهذا تتقلص العينة بعمر نصف ثابت. +إذا أزالت عملية مادةً بمعدل يتناسب مع المقدار المتبقي، وصفت k السالبة تغير الكمية في النموذج. أما إزالة مقدار ثابت في كل وحدة زمن فتعطي نموذجًا خطيًا. -### الأوبئة والتعداد السكاني -الانتشار المبكر أسي لأن كل حالة تُنتج حالات جديدة. +### مقارنة سجلات نمو -### التبريد -المشروب الساخن يقترب من درجة حرارة الغرفة بصورة أسية (قانون نيوتن للتبريد). +عندما تتبع كمية موجبة هذا النموذج، يعطي رسم لوغاريتمها الطبيعي مقابل الزمن خطًا مستقيمًا ميله k. إذا كان الرسم اللوغاريتمي منحنيًا، فقد لا تناسب k ثابتة السجل كله. diff --git a/content/lessons/calculus/exponential-growth/en.md b/content/lessons/calculus/exponential-growth/en.md index 886da6f6..179a349d 100644 --- a/content/lessons/calculus/exponential-growth/en.md +++ b/content/lessons/calculus/exponential-growth/en.md @@ -1,69 +1,62 @@ --- title: Exponential growth and decay -summary: >- - Money that earns interest on its own interest grows faster and faster the - longer it sits — this is the rule behind that snowball effect, for growth - or decay alike. +summary: 'Explore a quantity whose instantaneous rate of change is proportional to its current amount.' parameters: - k: rate constant k - y0: starting amount y₀ - x: time t + k: 'k — instantaneous proportional rate' + y0: 'y₀ — amount at time zero' + x: 't — selected time' variables: - - the amount present at time t - - fractional change per unit time - - the amount at t = 0 + - 'y: amount at time t' + - 'k: instantaneous rate divided by current amount' + - 'y₀: initial positive amount' --- ## Try it -1. Drag the point along the curve. Compare the slope readout with the height readout: the slope is always «rate constant k» times the height. -2. Make «rate constant k» negative. The curve now falls instead of rises. -3. Drag «starting amount y₀» up and down. The whole curve scales with it, but the doubling or halving time stays the same. +1. Set y₀ = 1, k = 0.25 and t = 4. The amount is about 2.7183 and the slope about 0.6796. Dividing slope by amount gives 0.25. +2. Set k = −0.3 and y₀ = 8. Move t from 0 to 5: the amount decreases to about 1.785, while the negative slope becomes smaller in magnitude. +3. Set k = 0. The amount stays at y₀ for every time. With a nonzero k, changing y₀ rescales the curve without changing its doubling or halving time. ## Real-life examples -1. **Compound interest over a decade.** Starting with y₀ = 1 and a modest rate k = 0.05, ten years (x = 10) of compounding noticeably grows the amount. -2. **Radioactive decay of a sample.** Starting with y₀ = 8 and a decay rate k = -0.3, after 5 time units (x = 5) most of the sample is already gone. -3. **Early epidemic spread.** Starting from y₀ = 0.5 with a fast growth rate k = 0.4, by x = 8 the numbers have grown dramatically — this is why early outbreaks look explosive. +1. **Slow continuous growth.** With y₀ = 1 and k = 0.05, the amount at t = 10 is about 1.649. The multiplier over one time unit is $e^{0.05}$, about 1.05127, rather than exactly 1.05. +2. **Continuous decay.** With y₀ = 8 and k = −0.3, the amount at t = 5 is about 1.785, about 22.3% of the starting amount. +3. **Faster growth.** With y₀ = 0.5 and k = 0.4, the amount at t = 8 is about 12.266. It exceeds the plot's upper bound of 12; use the numerical readout. ## Test yourself -1. Make the amount reach about 5. -2. Make the amount decay to below 0.1. -3. Find a rate and time where the amount has exactly doubled from its start. +1. Make the amount within 0.3 of 5. +2. Make the amount less than 0.1. +3. Make the multiplier from the starting amount within 0.1 of 2. ## Intuition -Picture a savings account holding 100 dollars today — that starting balance is the slider «starting amount y₀». Each year the account earns a percentage of whatever is already in it, set by «rate constant k»: at 100 dollars you might earn 5 dollars, but once the balance has grown to 200 dollars, the same percentage now earns 10 dollars a year. Drag the point along the curve and compare the two readouts: the slope, how fast the balance is climbing right now, is always «rate constant k» times the current height. +Suppose a quantity grows at an instantaneous rate equal to one quarter of its current amount per time unit. When the amount is 2, the rate is 0.5; when it is 4, the rate is 1. Growth accelerates because the rate is based on the amount already present. The constant k controls this proportionality, while y₀ is the amount at time zero. -Now make «rate constant k» negative, like a radioactive sample instead of a bank account. The same rule now says the more atoms remain, the faster they decay, so the curve falls quickly at first and then more and more slowly, approaching zero but never quite touching it. +A negative k makes the amount decrease. As less remains, the decrease per time unit becomes smaller in magnitude. In the continuous model the positive amount approaches zero without reaching it at any finite time. The graph shows an ideal proportional-rate rule; a real process follows it only while the assumed constant rate remains appropriate. ## Formal -$y' = ky$ with $y(0) = y_0$ has the unique solution $y = y_0 e^{kt}$. +For constant k, the initial-value problem $dy/dt=ky$ with $y(0)=y_0$ has solution $y(t)=y_0e^{kt}$. Here y₀ is positive. The rate constant has units of inverse time, so kt is dimensionless. The graph's horizontal coordinate x represents time t. -Doubling time (or half-life) is $\ln 2 / |k|$ — independent of the current amount. +For $k>0$, the doubling time is $T_2=\ln2/k$. For $k<0$, the half-life is $T_{1/2}=\ln2/(-k)$. These times do not depend on y₀. When k = 0, the positive amount is constant and has no finite doubling or halving time. ## Advanced -Uniqueness: if $y$ solves the equation then $\frac{d}{dt}\left(y e^{-kt}\right) = 0$, so $y e^{-kt}$ is constant. This integrating-factor trick generalises to every linear first-order ODE. +Over a finite interval Δt, the multiplier is $e^{k\Delta t}$ and the fractional change is $e^{k\Delta t}$ − 1. The approximation kΔt is useful only when its magnitude is small. Multiplying a solution by $e^{-kt}$ gives a constant, which also shows why the initial condition selects a unique solution. ## Derivation -1. Separate the variables: everything with $y$ on one side. -2. Integrate both sides. -3. Exponentiate; the constant is fixed by the starting amount. +1. Since y is positive here, divide by y and separate the amount and time variables. +2. Integrate both sides: the integral of 1/y is ln y and the integral of constant k is kt. +3. Exponentiate, then apply the time-zero condition to identify the positive factor $e^C$ as y₀. ## Real world -### Compound interest -Money earning a percentage of itself grows exponentially. +### A constant proportional-loss model -### Radioactive decay -Each nucleus has a fixed chance of decaying per second, so the sample shrinks with a constant half-life. +If a process removes material at a rate proportional to the amount remaining, a negative k gives the model's time course. A fixed amount removed each time unit would instead produce a linear model. -### Epidemics and populations -Early spread is exponential because every case creates new cases. +### Comparing growth records -### Cooling -A hot drink approaches room temperature exponentially (Newton’s law of cooling). +When a positive quantity follows this model, plotting its natural logarithm against time gives a straight line with slope k. A curved log plot suggests that a constant k may not fit the entire record. From 925ceb7b3d00f66f61e821f8ef252ed4bab665bd Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:36:02 +0300 Subject: [PATCH 067/124] content: rewrite fundamental-theorem for first-time learners in both languages --- .../calculus/fundamental-theorem/ar.md | 63 +++++++++--------- .../calculus/fundamental-theorem/en.md | 64 +++++++++---------- .../calculus/fundamental-theorem/lesson.yaml | 2 +- 3 files changed, 59 insertions(+), 70 deletions(-) diff --git a/content/lessons/calculus/fundamental-theorem/ar.md b/content/lessons/calculus/fundamental-theorem/ar.md index 517e4cb7..7ce489f6 100644 --- a/content/lessons/calculus/fundamental-theorem/ar.md +++ b/content/lessons/calculus/fundamental-theorem/ar.md @@ -1,72 +1,67 @@ --- title: 'النظرية الأساسية للتفاضل والتكامل' -summary: >- - عداد المسافة وعداد السرعة في السيارة وجهان لشيء واحد. اقرأ أحدهما تعرف الآخر. +summary: 'اربط المقدار المتراكم بمعدل تغيره، واحسب التكامل باستخدام دالة أصلية.' parameters: - a: a (البداية) - b: b (النهاية) + a: 'a — حد البداية' + b: 'b — حد النهاية' variables: - - المنحنى المظلل أعلاه، يمثل السرعة - - المساحة المتراكمة (المسافة) من $a=0$ حتى $b$، تظهر في الرسم البياني أدناه - - حدّا المنطقة المظللة + - 'f(x): المعدل بإشارته في الرسم الرئيسي' + - 'F(b): التراكم بإشارته من a المختارة إلى b' + - 'a, b: حدا البداية والنهاية' charts: - - title: المسافة المتراكمة F(b) = ∫ من 0 إلى b + - title: التراكم بإشارته من a إلى b xLabel: b yLabel: F(b) series: - - F(b) = -2cos(x) + 0.5x + 2 + - F(b) = -2cos(b) + 0.5b + 2cos(a) - 0.5a --- ## Try it -1. اسحب «b (النهاية)» إلى اليمين مع تثبيت «a (البداية)» عند 0. تكبر المساحة المظللة أعلاه، وتتحرك علامة F(b) على الرسم البياني لتطابقها. -2. راقب أين ينخفض المنحنى أعلاه دون المحور. تنعكس علامة الرسم البياني وتهبط هناك أيضًا. -3. اسحب «a (البداية)» بعيدًا عن 0. تتقلص المنطقة المظللة، والمجموع المتراكم معها، بمقدار المساحة المقتطعة من اليسار. +1. اضبط a = 0 وحرّك b من 0 إلى 3. تكون f(x) موجبة في هذه الفترة، فيزداد المجموع المتراكم بإشارته F(b) إلى نحو 5.480. +2. واصل تحريك b إلى 6. يصبح المنحنى سالبًا في جزء من هذه الفترة، فتنقص F؛ وتبلغ عند b = 6 نحو 3.080. +3. اضبط a = 2 وb = 8. المجموع بإشارته نحو 2.459. يستخدم مخطط التراكم حد البداية المختار a، فتتفق علامته مع قراءة التكامل بإشارته. ## Real-life examples -1. **قراءة مبكرة لعداد المسافة.** مع a = 0 وb = 3، لم يتراكم سوى مسافة قصيرة من القيادة، فالمجموع الجاري ما زال صغيرًا. -2. **قراءة عداد في منتصف الرحلة.** مع a = 0 وb = 6، تكون الرحلة قد تجاوزت أسرع مرحلة تصاعد، ويبدأ المجموع بالاستقرار. -3. **جزء من رحلة مسجَّل من علامة الثانية 2 فقط.** مع a = 2 وb = 8، لا يحسب المجموع المتراكم إلا المسافة المقطوعة بعد إعادة ضبط العداد عند a = 2. +1. **تجميع قيم موجبة.** من 0 إلى 3، يكون التكامل نحو 5.480. يجمع المساهمة الموجبة كلها في الفترة. +2. **إضافة مساهمة سالبة.** من 0 إلى 6، يكون التكامل نحو 3.080، أي أقل من المجموع حتى 3 رغم طول الفترة الأكبر. +3. **تغيير حد البداية.** من 2 إلى 8، يكون التكامل نحو 2.459. يستبعد التراكم السابق للمدخل 2. ## Test yourself -1. اجعل المساحة المتراكمة F(b) − F(a) تساوي نحو 5. -2. جد نافذة (تكون فيها b أبعد بمقدار 1 على الأقل عن a) تعود عندها المساحة المتراكمة إلى 0. -3. ادفع المساحة المتراكمة فوق 6. +1. اجعل التكامل بإشارته يختلف عن 5 بما لا يتجاوز 0.4. +2. اختر حدين تكون عندهما |b − a| أكبر من 1، والقيمة المطلقة للتكامل أقل من 0.3. +3. اجعل التكامل بإشارته أكبر من 6. ## Intuition -تخيل عداد مسافة سيارة أُعيد ضبطه إلى 0 عند بداية رحلة. المنحنى المتموج على الشاشة هو سرعة السيارة في كل لحظة، والمنطقة المظللة تحته هي المسافة المقطوعة حتى الآن. اسحب «b (النهاية)» إلى اليمين مع تثبيت «a (البداية)» عند 0، وراقب أمرين معًا: تكبر المساحة المظللة أو تصغر، وتتحرك علامة الرسم البياني أدناه، أي قراءة العداد، لتطابق ذلك صعودًا أو هبوطًا. +يحتفظ التكامل بمجموع متراكم ذي إشارة. إذا كانت الدالة موجبة عند الطرف المتحرك للفترة، أضاف تمديد الفترة مساهمة موجبة. وإذا كانت سالبة، قلّل تمديد الفترة المجموع. يعرض الرسم الأول المعدل الذي نجمعه، ويعرض المخطط السفلي النتيجة المتراكمة. -انظر الآن أين ينخفض منحنى السرعة دون الخط المتوسط: هناك بالضبط تكون السيارة تتحرك للخلف للحظة، فتنعكس علامة العداد وتهبط هي الأخرى. منحنى السرعة أعلاه هو بالضبط ميل رسم العداد أدناه، فاقرأ كيف تتغيّر المسافة الكلية، وستحصل بالضبط على منحنى السرعة الذي بدأت منه. +عندما نزيد النهاية بمقدار صغير h، تقارب المساهمة الإضافية الارتفاع الحالي مضروبًا في h. قسمة زيادة المجموع على h تعطي تقريبًا الارتفاع الحالي. وعندما تؤول h إلى الصفر، تصبح العلاقة دقيقة: مشتقة التراكم هي الدالة الأصلية التي نجمعها. إذا كانت الدالة سرعة متجهة، فالمجموع إزاحة؛ أما عداد المسافة فيجمع مقدار السرعة ولا تنقص قراءته عند الرجوع للخلف. ## Formal -إذا كانت $F(b) = \int_a^b f(x)\,dx$ فإن $F'(b) = f(b)$. هذا هو الجزء الأول من نظرية التفاضل والتكامل الأساسية. +إذا كانت f متصلة على فترة وa ثابتة، نعرّف $F(b)=\int_a^b f(x)\,dx$. عند النقاط الداخلية تكون $F'(b)=f(b)$. يصل الاتصال بين قيمة الطرف والقيم القريبة المستخدمة في التكامل. -أما الجزء الثاني فيقول إنه إذا كانت $F$ أي دالة أصلية لـ$f$، فإن $\int_a^b f(x)\,dx = F(b) - F(a)$، مما يحوّل حساب المساحة إلى مجرد تقييم دالة أصلية عند نقطتين. +إذا كانت G أي دالة أصلية للدالة المتصلة f، فإن $\int_a^b f(x)\,dx=G(b)-G(a)$. هنا $f(x)=2\sin x+0.5$ و$G(x)=-2\cos x+0.5x$. لذلك $F(b)=-2\cos b+0.5b+2\cos a-0.5a$، وهي الصيغة المستخدمة في المخطط. ## Advanced -يرتكز إثبات الجزء الأول على نظرية القيمة المتوسطة للتكاملات، إذ يتحقّق $F(b+h)-F(b) = \int_b^{b+h} f \approx f(b)\,h$ من أجل $h$ صغيرة لأن $f$ متصلة، ولذا يؤول حاصل الفرق $[F(b+h)-F(b)]/h \to f(b)$. فالتراكم والمعدل اللحظي وجهان لعملية النهاية نفسها، إحداهما مأخوذة على فترة والأخرى عند نقطة. +تغيير حد البداية الثابت ينقل منحنى التراكم رأسيًا، وتبقى مشتقته بالنسبة إلى حد النهاية f(b). يعطي صفر f نقطة سكون لـF، لكن القيمة العظمى تحتاج تغير الإشارة من موجبة إلى سالبة، والصغرى تحتاج العكس. الارتفاع اللحظي والمجموع المتراكم مقداران مختلفان. ## Derivation -1. عرّف المساحة المتراكمة حتى $b$. -2. الشريحة الإضافية من المساحة هي تقريبًا مستطيل رفيع ارتفاعه $f(b)$ وعرضه $h$، من أجل $h$ صغيرة. -3. اقسم على $h$ وخذ النهاية. مشتقة المساحة المتراكمة هي المنحنى نفسه. +1. نعرّف F بالتكامل ذي الإشارة من حد البداية الثابت a إلى النهاية المتغيرة b. +2. الفرق F(b + h) − F(b) هو التكامل على الفترة الصغيرة المضافة. يجعله الاتصال قريبًا من مستطيل ارتفاعه f(b) وعرضه بإشارته h. +3. نقسم على h ونأخذ النهاية. يقترب المتوسط على الفترة المتقلصة من f(b)، فنثبت F′(b) = f(b). ## Real world -### السرعة والمسافة -قراءة عداد مسافة السيارة هي المساحة المتراكمة تحت منحنى السرعة-الزمن، وعداد السرعة هو مشتقة تلك القراءة. +### تتبع محتوى خزان -### امتلاء خزان الماء -إجمالي الماء في الخزان هو تراكم معدل التدفق الداخل، ومعدل التدفق الداخل هو مشتقة الإجمالي. +يعطي تكامل صافي معدل التدفق الداخل تغير الحجم المخزون. نضيف الحجم الابتدائي للحصول على المقدار الفعلي في الخزان. قد يجعل التدفق الخارج التغير المتراكم يتناقص. -### الاقتصاد -التكلفة الإجمالية هي تراكم التكلفة الحدية، والتكلفة الحدية هي مشتقة التكلفة الإجمالية. +### الموضع والسرعة المتجهة -### الشغل والطاقة في الفيزياء -الشغل المبذول هو المساحة تحت منحنى القوة والإزاحة، والقوة هي معدل تغيّر الشغل المتراكم بالنسبة للإزاحة. +للسرعة المتجهة المتصلة، يعطي التكامل على الزمن الإزاحة. ويعطي اشتقاق دالة الموضع السرعة المتجهة؛ والموضع الابتدائي هو الثابت الإضافي اللازم لاستعادة الموضع المطلق. diff --git a/content/lessons/calculus/fundamental-theorem/en.md b/content/lessons/calculus/fundamental-theorem/en.md index 79322ce5..f2eb79d7 100644 --- a/content/lessons/calculus/fundamental-theorem/en.md +++ b/content/lessons/calculus/fundamental-theorem/en.md @@ -1,73 +1,67 @@ --- title: The fundamental theorem of calculus -summary: >- - A car's odometer and speedometer are two sides of the same coin — read one - and you can work out the other, and this is the rule connecting them. +summary: 'Connect an accumulated total to its rate of change, and calculate integrals with antiderivatives.' parameters: - a: a (start) - b: b (end) + a: 'a — starting bound' + b: 'b — ending bound' variables: - - the curve being shaded — think of it as a velocity - - accumulated area (distance) from $a=0$ up to $b$ — the chart below - - the bounds of the shaded region + - 'f(x): signed rate shown in the main graph' + - 'F(b): signed accumulation from the selected a to b' + - 'a, b: starting and ending bounds' charts: - - title: Accumulated distance F(b) = ∫ from 0 to b + - title: Signed accumulation from a to b xLabel: b yLabel: F(b) series: - - F(b) = -2cos(x) + 0.5x + 2 + - F(b) = -2cos(b) + 0.5b + 2cos(a) - 0.5a --- ## Try it -1. Drag «b (end)» to the right with «a (start)» fixed at 0. The shaded area above grows, and the chart's marker on F(b) climbs to match. -2. Watch where the curve above dips below the axis. The chart's marker turns around and falls there too. -3. Drag «a (start)» away from 0. The shaded region — and the accumulated total — shrinks by whatever area is cut off on the left. +1. Set a = 0 and move b from 0 to 3. The curve f(x) is positive there, so the accumulated signed total F(b) increases to about 5.480. +2. Continue moving b to 6. The curve becomes negative during part of this interval, so F decreases; at b = 6 it is about 3.080. +3. Set a = 2 and b = 8. The signed total is about 2.459. The accumulation chart now uses the selected starting bound a, so its marker agrees with the signed integral readout. ## Real-life examples -1. **Early odometer reading.** With a = 0 and b = 3, only a short stretch of driving has accumulated — the running total is still small. -2. **Mid-trip odometer reading.** With a = 0 and b = 6, the trip has passed its fastest climbing stretch and the total is levelling off. -3. **A trip segment recorded only from the 2-second mark.** With a = 2 and b = 8, the accumulated total counts only the distance covered after the odometer was reset at a = 2. +1. **Accumulating positive values.** From 0 to 3, the integral is about 5.480. It adds the entire positive contribution on this interval. +2. **Subtracting a negative contribution.** From 0 to 6, the integral is about 3.080, less than the total up to 3 despite the longer interval. +3. **Changing the starting bound.** From 2 to 8, the integral is about 2.459. It excludes the accumulation before 2. ## Test yourself -1. Make the accumulated area F(b) − F(a) equal about 5. -2. Find a window (with b at least 1 apart from a) where the accumulated area returns to 0. -3. Push the accumulated area above 6. +1. Make the signed integral within 0.4 of 5. +2. Choose bounds with |b − a| greater than 1 and absolute signed integral less than 0.3. +3. Make the signed integral greater than 6. ## Intuition -Picture a car's trip odometer, reset to 0 at the start of a drive. The wavy curve on screen is the car's speed at every moment, and the shaded region beneath it is the distance covered so far. Drag «b (end)» to the right with «a (start)» fixed at 0, and watch two things at once: the shaded area grows or shrinks, and the marker on the chart below — the odometer reading — climbs or falls to match. +An integral keeps a running signed total. If the function is positive at the moving end of the interval, extending that interval adds a positive contribution. If it is negative, extending the interval reduces the total. The first graph shows the rate being accumulated; the lower chart shows the accumulated result. -Now look at where the speed curve dips below the middle line: right there, the car is momentarily going backward, so the odometer marker turns around and falls too. The speed curve above is exactly the slope of the odometer chart below — read off how the total distance is changing, and you get back the very speed curve you started with. +For a small increase h in the endpoint, the extra contribution is approximately the current height times h. Dividing that increase in the total by h gives approximately the current height. As h tends to zero, this becomes exact: the derivative of accumulation is the original function. For velocity, the total is displacement; an odometer's total distance would instead accumulate speed and would not decrease when moving backward. ## Formal -If $F(b) = \int_a^b f(x)\,dx$, then $F'(b) = f(b)$ — the Fundamental Theorem of Calculus, Part 1. +If f is continuous on an interval and a is fixed, define $F(b)=\int_a^b f(x)\,dx$. At interior points, $F'(b)=f(b)$. Continuity supplies the link between the value at the endpoint and nearby values used in the integral. -Part 2: if $F$ is any antiderivative of $f$, then $\int_a^b f(x)\,dx = F(b) - F(a)$, turning area computation into evaluating an antiderivative at two points. +If G is any antiderivative of continuous f, then $\int_a^b f(x)\,dx=G(b)-G(a)$. Here $f(x)=2\sin x+0.5$ and $G(x)=-2\cos x+0.5x$. Thus $F(b)=-2\cos b+0.5b+2\cos a-0.5a$, the formula used by the chart. ## Advanced -The proof of Part 1 hinges on the Mean Value Theorem for integrals: $F(b+h)-F(b) = \int_b^{b+h} f \approx f(b)\,h$ for small $h$ because $f$ is continuous, so the difference quotient $[F(b+h)-F(b)]/h \to f(b)$ — accumulation and instantaneous rate are two sides of the same limiting process, one taken over an interval, one at a point. +Changing the fixed starting bound shifts the accumulation curve vertically; its derivative with respect to the ending bound stays f(b). A zero of f gives a stationary point of F, but a maximum requires a positive-to-negative sign change and a minimum requires the reverse. The instantaneous height and accumulated total are different quantities. ## Derivation -1. Define the accumulated area up to $b$. -2. The extra sliver of area is approximately a thin rectangle of height $f(b)$ and width $h$, for small $h$. -3. Divide by $h$ and take the limit: the derivative of the accumulated area is the curve itself. +1. Define F as the signed integral from the fixed starting bound a to the varying endpoint b. +2. The difference F(b + h) − F(b) is the integral over the small added interval. Continuity makes it approximately a rectangle with height f(b) and signed width h. +3. Divide by h and take the limit. The average over the shrinking interval tends to f(b), establishing F′(b) = f(b). ## Real world -### Velocity and distance -A car's odometer reading is the accumulated area under its velocity-time graph; its speedometer is the derivative of the odometer reading. +### Tracking a tank's contents -### Water tank filling -Total water in a tank is the accumulated inflow rate; the inflow rate is the derivative of the total. +Integrating the net inflow rate gives the change in stored volume. Add the initial volume to obtain the actual amount in the tank. Outflow can make the accumulated change decrease. -### Economics -Total cost is the accumulated marginal cost; marginal cost is the derivative of total cost. +### Position and velocity -### Physics work-energy -Work done is the area under a force-displacement curve; force is the derivative (rate of change) of accumulated work with displacement. +For a continuous velocity, integrating over time gives displacement. Differentiating a position function gives velocity; the initial position is the extra constant needed to recover absolute position. diff --git a/content/lessons/calculus/fundamental-theorem/lesson.yaml b/content/lessons/calculus/fundamental-theorem/lesson.yaml index b6b9c208..30c80c65 100644 --- a/content/lessons/calculus/fundamental-theorem/lesson.yaml +++ b/content/lessons/calculus/fundamental-theorem/lesson.yaml @@ -51,7 +51,7 @@ charts: - 10 marker: b series: - - -2*cos(x) + 0.5*x + 2 + - -2*cos(x) + 0.5*x + 2*cos(a) - 0.5*a primary: b presets: - { a: 0, b: 3 } From 33fdd087206b8ec86c7cd4368df87c4bdc951d5d Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:36:02 +0300 Subject: [PATCH 068/124] content: rewrite gradient for first-time learners in both languages --- content/lessons/calculus/gradient/ar.md | 59 +++++++++++------------- content/lessons/calculus/gradient/en.md | 61 +++++++++++-------------- 2 files changed, 54 insertions(+), 66 deletions(-) diff --git a/content/lessons/calculus/gradient/ar.md b/content/lessons/calculus/gradient/ar.md index 66887b66..045b7d19 100644 --- a/content/lessons/calculus/gradient/ar.md +++ b/content/lessons/calculus/gradient/ar.md @@ -1,66 +1,61 @@ --- title: الأسطح والتدرج -summary: >- - تقف على منحدر تل. التدرج سهم يشير دائمًا إلى أسرع طريق نحو القمة. +summary: 'اجمع الميلين في اتجاهي الإحداثيات لتعرف اتجاه أكبر زيادة محلية.' parameters: - x0: النقطة x - y0: النقطة y + x0: 'x₀ — الإحداثي x للنقطة المختارة' + y0: 'y₀ — الإحداثي y للنقطة المختارة' variables: - - الميل إذا تحركت في اتجاه x فقط - - الميل إذا تحركت في اتجاه y فقط - - متجه التدرج (السهم البرتقالي على الأرضية) + - '∂f/∂x: الميل عند تغيير x وحدها' + - '∂f/∂y: الميل عند تغيير y وحدها' + - '∇f: متجه الميلين الجزئيين في مستوى المدخلات' --- ## Try it -1. حرّك «النقطة x» و«النقطة y» إلى (0, 0)، أي قاع الوعاء. يتقلص سهم التدرج البرتقالي إلى العدم. -2. اسحب المنزلقين معًا لأعلى. يكبر السهم البرتقالي ويشير مباشرة بعيدًا عن القاع، أي في اتجاه الصعود الأشد انحدارًا. -3. اسحب «النقطة x» وحدها مع إبقاء «النقطة y» ثابتة. يميل المستوى المماس في اتجاه واحد فقط. +1. اضبط x₀ = y₀ = 0. تصبح المشتقتان الجزئيتان ومقدار التدرج صفرًا. يكون المستوى المماس أفقيًا عند أدنى نقطة في الوعاء. +2. اضبط x₀ = 1 وy₀ = 0. المشتقتان الجزئيتان 2 و0، فيشير التدرج نحو x الموجبة. +3. أبقِ x₀ = 1 واضبط y₀ = 1. يصبح التدرج (2, 2)، ومقداره نحو 2.828. اسحب العرض لتدوير الكاميرا، واستخدم المنزلقين لتحريك النقطة المختارة. ## Real-life examples -1. **الوقوف في قاع الوعاء.** عند (x, y) = (0, 0) تكون الأرض مستوية، فيتلاشى التدرج، ولا يوجد اتجاه واحد أشد انحدارًا من غيره. -2. **في منتصف منحدر شديد.** عند (x, y) = (1.5, 1.5) يكون سهم التدرج طويلًا، فالأرض ترتفع بسرعة في الاتجاه الذي يشير إليه. -3. **قرب الحافة، إلى جانب واحد.** عند (x, y) = (2-, 0.5) تقع النقطة قرب حافة الوعاء، حيث الميل حاد في اتجاه x وأهدأ في اتجاه y. +1. **عند القيمة الصغرى.** عند (0, 0)، تكون f = 0 والتدرج (0, 0). كل مشتقة اتجاهية تساوي صفرًا هناك، رغم أن السطح يرتفع بعيدًا عن النقطة. +2. **ميلان موجبان.** عند (1.5, 1.5)، تكون f = 4.5 والتدرج (3, 3)، ومقداره نحو 4.243. +3. **إشارتان مختلفتان.** عند (−2, 0.5)، تكون f = 4.25 والتدرج (−4, 1). الانتقال نحو x أكثر سلبية يزيد الارتفاع، ونحو x أكثر إيجابية ينقصه في البداية. ## Test yourself -1. جد نقطة قريبة من قاع الوعاء، ضمن 0.5 وحدة من المركز، يكون عندها التدرج قريبًا من الصفر. -2. اجعل طول التدرج نحو 5. -3. جد نقطة يكون عندها الميل في اتجاه x ضعف الميل في اتجاه y بالضبط. +1. اختر نقطة تبعد عن الأصل في مستوى x–y بأقل من 0.5. +2. اجعل مقدار التدرج يختلف عن 5 بما لا يتجاوز 0.5. +3. اجعل |x₀ − 2y₀| أقل من 0.05. يجعل ذلك الميل في اتجاه x قريبًا من ضعف الميل في اتجاه y لهذا السطح. ## Intuition -تخيل أنك تقف في مكان ما داخل وادٍ على شكل وعاء دائري، وتريد أن تعرف أي اتجاه يصعد مباشرة نحو الأعلى. اسحب لتدوير الصورة، ثم حرّك النقطة بالمنزلقين «النقطة x» و«النقطة y» لتقف عند مواضع مختلفة. البلاطة البرتقالية الصغيرة تحت قدميك هي المستوى المماس، أي رقعة مستوية تطابق ميل الوعاء عند تلك النقطة بالضبط، كأنها منصة صغيرة موزونة على المنحدر. +قد يرتفع السطح بمعدلات مختلفة حسب اتجاه الحركة. لقياس ميله في اتجاه x، نغيّر x ونثبت y. ولقياس ميله في اتجاه y نفعل العكس. هاتان مشتقتان جزئيتان. على الوعاء x² + y² تساويان 2x و2y؛ لذلك عند (1, 1) يزيد الارتفاع بمعدل لحظي 2 في كل اتجاه موجب للمحورين. -السهم الممدد على الأرضية هو التدرج، يشير دائمًا بعيدًا عن قاع الوعاء. يُظهر الاتجاه الوحيد الأشد صعودًا من موضعك، ويطول كلما اشتد انحدار الجدران حولك. قف بالضبط عند القاع (0, 0) فيتقلص السهم إلى العدم، فالأرض هناك مستوية، لأنك عند أدنى نقطة في الوعاء كله. +جمع الميلين في متجه يعطينا التدرج (2, 2). الحركة القطرية في اتجاهه تزيد الارتفاع لكل وحدة مسافة في مستوى x–y أسرع من الحركة على أحد المحورين وحده. يوضح السهم على القاعدة هذا الاتجاه، وتقرّب الرقعة المماسة السطح قرب النقطة المختارة. لطول السهم المرسوم حد أقصى؛ استخدم قراءة المقدار للمقارنة العددية. ## Formal -$\nabla f = (f_x, f_y)$. والمشتقة الاتجاهية على طول متجه الوحدة $\mathbf{u}$ هي $\nabla f \cdot \mathbf{u}$، وتبلغ أقصاها عندما يكون $\mathbf{u} \parallel \nabla f$. +لدالة قابلة للتفاضل f، يكون $\nabla f=(f_x,f_y)$. في اتجاه وحدة u في مستوى المدخلات، تكون $D_{\mathbf u}f=\nabla f\cdot\mathbf u$. عندما لا يكون التدرج صفريًا، تبلغ أكبر مشتقة اتجاهية $|\nabla f|$، وتتحقق في اتجاه التدرج نفسه. وإذا كان التدرج صفرًا، كانت المشتقات الاتجاهية الأولى كلها صفرًا. -المستوى المماس عند $(a,b)$ هو $z = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)$. +المستوى المماس عند (a, b) هو $z=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b)$. لهذا الوعاء $\nabla f=(2x,2y)$. يصف المستوى تغيرًا محليًا، ويختلف عادة عن السطح المنحني بعيدًا عن نقطة التماس. ## Advanced -التدرج عمودي على منحنيات المستوى، فعلى طول منحنى $\gamma$ تكون $f(\gamma(t))$ ثابتة، وقاعدة السلسلة تعطي $\nabla f \cdot \gamma' = 0$. وتُصنَّف النقاط الحرجة بواسطة مصفوفة هسّه، وهنا هي $2I$، موجبة التعريف تمامًا، وبالتالي فالنقطة نقطة صغرى قطعية. +عند نقطة منتظمة، يكون التدرج عموديًا على منحنى المستوى: اشتقاق f على ذلك المنحنى ذي الارتفاع الثابت يعطي ضربًا قياسيًا صفريًا مع مماسه. يعطي سالب التدرج أسرع نقصان محلي. في هذا الوعاء تثبت x² + y² ≥ 0 أن الأصل قيمة صغرى مطلقة؛ أما انعدام التدرج وحده فلا يثبت وجود قيمة صغرى لسطح آخر. ## Derivation -1. ثبّت $y$ واشتق بالطريقة المعتادة. -2. أي اتجاه هو مزيج من اتجاهي المحورين. -3. يبلغ أقصاه عندما $\alpha = 0$، فالسير على طول التدرج يصعد بأسرع ما يمكن. +1. نثبت y ونشتق x² + y² بالنسبة إلى x فنحصل على 2x. وبالمثل، تثبيت x يعطي 2y. +2. تجمع قاعدة السلسلة على مسار مستقيم بسرعة وحدة الميلين الجزئيين باستخدام مركبتي اتجاه المسار. +3. يساوي الضرب القياسي مقدار التدرج مضروبًا في جيب تمام الزاوية مع اتجاه الوحدة. يبلغ أكبر قيمة عندما يشير المتجهان غير الصفريين في الاتجاه نفسه. ## Real world -### تعلم الآلة -تدريب الشبكة العصبية هو انحدار تدريجي على سطح خسارة ذي ملايين الأبعاد. +### خرائط خطوط الارتفاع -### خرائط الطقس -الرياح يدفعها تدرج الضغط، وتقارب خطوط الضغط المتساوي يعني تدرجًا حادًا ورياحًا قوية. +لنموذج ارتفاع أملس، يعبر التدرج خطوط الارتفاع الثابت عموديًا، ويعطي أشد صعود محلي لكل وحدة مسافة على الخريطة. لا يحدد أقصر طريق إلى قمة بعيدة. -### تدفق الحرارة -تتدفق الحرارة في اتجاه تدرج درجة الحرارة السالب (قانون فورييه). +### تصغير دالة -### المشي لمسافات طويلة -على خريطة الخطوط الكنتورية يشير التدرج عموديًا على خطوط التساوي، وهو أشد المسارات انحدارًا. +تنقص خطوة صغيرة بما يكفي عكس تدرج غير صفري قيمة دالة قابلة للتفاضل محليًا. قد تتجاوز خطوة كبيرة المنطقة المطلوبة؛ ولا تضمن الخطوات المتكررة الوصول إلى قيمة صغرى مطلقة على سطح عام. diff --git a/content/lessons/calculus/gradient/en.md b/content/lessons/calculus/gradient/en.md index 8c64cab9..8d1791d7 100644 --- a/content/lessons/calculus/gradient/en.md +++ b/content/lessons/calculus/gradient/en.md @@ -1,68 +1,61 @@ --- title: Surfaces and the gradient -summary: >- - Standing on a hillside and wanting the fastest way to the top, without - walking the whole hill first, is exactly what the gradient — a compass - that always points straight uphill — tells you. +summary: 'Combine slopes in two coordinate directions to find the direction of greatest local increase.' parameters: - x0: point x - y0: point y + x0: 'x₀ — selected x coordinate' + y0: 'y₀ — selected y coordinate' variables: - - slope if you walk in the x direction only - - slope if you walk in the y direction only - - the gradient vector (orange arrow on the floor) + - '∂f/∂x: slope when only x changes' + - '∂f/∂y: slope when only y changes' + - '∇f: vector of the two partial slopes in the input plane' --- ## Try it -1. Move «point x» and «point y» to (0, 0), the bottom of the bowl. The orange gradient arrow shrinks to nothing. -2. Drag both sliders up together. The orange arrow grows and points straight away from the bottom — the steepest way up. -3. Drag only «point x» while keeping «point y» fixed. The tangent plane tilts along one direction only. +1. Set x₀ = y₀ = 0. Both partial derivatives and the gradient magnitude are zero. The tangent plane is horizontal at the bowl's minimum. +2. Set x₀ = 1 and y₀ = 0. The partial derivatives are 2 and 0, so the gradient points along positive x. +3. Keep x₀ = 1 and set y₀ = 1. The gradient becomes (2, 2), with magnitude about 2.828. Drag the view to rotate the camera; use the sliders to move the selected point. ## Real-life examples -1. **Standing at the bottom of the bowl.** At (x, y) = (0, 0) the ground is flat: the gradient vanishes, so there is no single steepest way up. -2. **Partway up a steep slope.** At (x, y) = (1.5, 1.5) the gradient arrow is long: the ground climbs quickly in the direction it points. -3. **Near the rim, off to one side.** At (x, y) = (-2, 0.5) the point sits close to the edge of the bowl, where the slope is steep in the x-direction and gentler in the y-direction. +1. **At the minimum.** At (0, 0), f = 0 and the gradient is (0, 0). Every directional derivative is zero there, although the surface rises away from the point. +2. **Two positive slopes.** At (1.5, 1.5), f = 4.5 and the gradient is (3, 3), with magnitude about 4.243. +3. **Different signs.** At (−2, 0.5), f = 4.25 and the gradient is (−4, 1). Moving toward more negative x increases height; moving toward more positive x initially decreases it. ## Test yourself -1. Find a point close to the bottom of the bowl — within 0.5 units of the centre — where the gradient is nearly zero. -2. Make the gradient's length about 5. -3. Find a point where the slope in the x-direction is exactly twice the slope in the y-direction. +1. Choose a point whose distance from the origin in the x–y plane is less than 0.5. +2. Make the gradient magnitude within 0.5 of 5. +3. Make |x₀ − 2y₀| less than 0.05. Here that also makes the x slope approximately twice the y slope. ## Intuition -Imagine standing somewhere on the inside of a round, bowl-shaped valley, wanting to know which direction leads straight uphill. Drag to rotate the picture, then move the point with the sliders «point x» and «point y» to stand at different spots. The small orange tile beneath your feet is the tangent plane — a flat patch that matches the bowl's tilt at exactly that spot, like a tiny platform balanced on the slope. +A surface can rise differently in different directions. To measure its x slope, change x while holding y fixed. To measure its y slope, do the reverse. These are partial derivatives. On the bowl x² + y² they are 2x and 2y, so at (1, 1) either positive coordinate direction initially increases height at rate 2. -The arrow lying flat on the floor is the gradient: it always points directly away from the bottom of the bowl, showing the one steepest way up from where you stand, and it grows longer as the walls around you get steeper. Stand exactly at the bottom (0, 0) and the arrow shrinks to nothing — the ground is flat there, because you are at the lowest point of the whole bowl. +Combining those slopes gives the gradient (2, 2). Moving diagonally in its direction increases height faster per unit distance in the x–y plane than moving along either axis alone. The floor arrow indicates this direction, and the tangent patch approximates the surface near the selected point. The arrow's drawn length is capped; use the magnitude readout for a numerical comparison. ## Formal -$\nabla f = (f_x, f_y)$. The directional derivative along a unit vector $\mathbf{u}$ is $\nabla f \cdot \mathbf{u}$, maximised when $\mathbf{u} \parallel \nabla f$. +For a differentiable function f, $\nabla f=(f_x,f_y)$. Along a unit direction u in the input plane, $D_{\mathbf u}f=\nabla f\cdot\mathbf u$. When the gradient is nonzero, the greatest directional derivative is $|\nabla f|$, attained in the same direction as the gradient. If the gradient is zero, all first directional derivatives are zero. -Tangent plane at $(a,b)$: $z = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)$. +The tangent plane at (a, b) is $z=f(a,b)+f_x(a,b)(x-a)+f_y(a,b)(y-b)$. For this bowl, $\nabla f=(2x,2y)$. The plane describes local change; it generally differs from the curved surface away from the contact point. ## Advanced -The gradient is perpendicular to level curves: along a curve $\gamma$ with $f(\gamma(t))$ constant, the chain rule gives $\nabla f \cdot \gamma' = 0$. Critical points are classified by the Hessian — here $2I$, positive definite, hence a strict minimum. +At a regular point, the gradient is perpendicular to a level curve: differentiating f along that constant-height curve gives a zero dot product with its tangent. The negative gradient gives the steepest local decrease. On this bowl, x² + y² ≥ 0 proves a global minimum at the origin; a zero gradient alone would not prove a minimum for a different surface. ## Derivation -1. Freeze $y$ and differentiate as usual. -2. Any direction is a mix of the two axis directions. -3. Largest when $\alpha = 0$: walking along the gradient climbs fastest. +1. Hold y fixed and differentiate x² + y² with respect to x to get 2x. Holding x fixed similarly gives 2y. +2. The chain rule along a straight unit-speed path combines those partial slopes using the path's direction components. +3. The dot product is gradient magnitude times the cosine of the angle to the unit direction. Its largest value occurs when the nonzero vectors point the same way. ## Real world -### Machine learning -Training a neural network is gradient descent on a loss surface with millions of dimensions. +### Contour maps -### Weather maps -Wind is driven by the pressure gradient; tightly packed isobars mean a steep gradient and strong wind. +For a smooth height model, the gradient crosses constant-height contours perpendicularly and gives the steepest local rise per unit map distance. It does not determine the shortest route to a distant summit. -### Heat flow -Heat flows along the negative temperature gradient (Fourier’s law). +### Minimising a function -### Hiking -On a contour map the gradient points straight across the contour lines — the steepest path. +A sufficiently small step opposite a nonzero gradient decreases a differentiable function locally. A step that is too large can overshoot; repeated steps need not find a global minimum on a general surface. From 19986076a45ed146c1d0591b17e918740498323c Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:36:02 +0300 Subject: [PATCH 069/124] content: rewrite improper-integrals for first-time learners in both languages --- .../lessons/calculus/improper-integrals/ar.md | 59 ++++++++---------- .../lessons/calculus/improper-integrals/en.md | 61 ++++++++----------- .../calculus/improper-integrals/lesson.yaml | 6 +- 3 files changed, 57 insertions(+), 69 deletions(-) diff --git a/content/lessons/calculus/improper-integrals/ar.md b/content/lessons/calculus/improper-integrals/ar.md index 2e16727f..a3687fa1 100644 --- a/content/lessons/calculus/improper-integrals/ar.md +++ b/content/lessons/calculus/improper-integrals/ar.md @@ -1,66 +1,61 @@ --- title: 'التكاملات المعتلة ومتسلسلة p' -summary: >- - صاروخ يبتعد عن الأرض إلى ما لا نهاية. هل الطاقة اللازمة رقم محدود أم تكبر بلا حد؟ +summary: 'اسأل هل تبقى المساحة تحت منحنى موجب منتهية عندما نمد الفترة بلا حد.' parameters: - p: الأس p - a: a (البداية، ثابتة قرب 1) - b: b (ادفع بعيدًا إلى اليمين) + p: 'p — أس التناقص' + a: 'a — حد البداية الموجب' + b: 'b — حد النهاية المنتهي' variables: - - الأس في المنحنى المضمحل $1/x^p$ - - حدّا التقريب المظلل، حيث $b$ منتهٍ + - 'p: الأس في 1/xᵖ' + - 'a, b: حدا التكامل المنتهي المعروض' --- ## Try it -1. اجعل «الأس p» أقل من 1 (جرّب 0.5) واسحب «b» حتى 60. تستمر المساحة المظللة في النمو بشكل ملحوظ حتى عند قيم b الكبيرة. -2. الآن اجعل «الأس p» فوق 1 (جرّب 2) واسحب «b» مجددًا. بعد نقطة معينة لا يكاد دفع b أبعد يغيّر المساحة المظللة. -3. قارن بين الحالتين. حين تكون p أقل من 1 لا تستقر المساحة أبدًا، وحين تكون أكبر من 1 تستقر عند رقم ثابت. +1. اضبط a = 1 وp = 0.5. زد b من 10 إلى 50. ينمو التكامل من نحو 4.325 إلى 12.142، رغم اقتراب المنحنى من الصفر. +2. أبقِ a = 1 واضبط p = 2. عند b = 10 يكون التكامل 0.9، وعند b = 50 يكون 0.98. المساحة الحدية 1، والمتبقي عند b = 50 يساوي 0.02. +3. اضبط p = 1. عند b = 10 يكون التكامل نحو 2.303، وعند b = 50 نحو 3.912. يستمر هذا النمو البطيء بلا حد. ## Real-life examples -1. **ذيل بطيء الاضمحلال (p < 1).** مع p = 0.5، مد المنطقة حتى b = 50 يضيف مساحة ذات قيمة باستمرار، فالتكامل لا يستقر أبدًا. -2. **ذيل سريع الاضمحلال (p > 1).** مع p = 2، المد حتى b = 50 لا يكاد يغيّر المساحة بعد الآن، فالتكامل يتقارب. -3. **الحالة الحدّية (p = 1).** عند p = 1 بالضبط، تنمو المساحة بلا حدود، لكن ببطء شديد يوازي نمو اللوغاريتم، وهذه هي الحافة بين التقارب واللاتقارب. +1. **تناقص بطيء.** مع p = 0.5 وa = 1 وb = 50، يكون التكامل المنتهي 2(√50 − 1) ≈ 12.142. أما التكامل غير المحدود فيتباعد. +2. **تناقص أسرع.** مع p = 2 وa = 1 وb = 50، تكون المساحة المنتهية 0.98. تقترب من 1 عندما تزداد b بلا حد. +3. **الحالة الفاصلة.** مع p = 1 وa = 1 وb = 30، تكون المساحة المنتهية ln 30 ≈ 3.401. لا يوجد مجموع حدي منتهٍ. ## Test yourself -1. مع معدل اضمحلال أقل من 1، ادفع المساحة المظللة فوق 5. -2. مع معدل اضمحلال أكبر من 1، ادفع «b» بعيدًا وأبقِ المساحة دون 2. -3. جد معدل اضمحلال وحدودًا تستقر عندها المساحة عند نحو 1. +1. اختر p أقل من 1 وb أكبر من a، بحيث تتجاوز المساحة المنتهية 5. +2. اختر p أكبر من 1 وb أكبر من a، بحيث تقل المساحة المنتهية عن 2. +3. اختر b أكبر من a، واجعل التكامل المنتهي يختلف عن 1 بما لا يتجاوز 0.2. الهدف هو التكامل المنتهي المعروض، وليس بالضرورة نهاية التكامل على الفترة غير المحدودة. ## Intuition -تخيل صاروخًا يغادر الأرض. تسحبه الجاذبية بقوة أقل فأقل كلما ابتعد، ويريد الفيزيائيون معرفة إن كانت الطاقة الكلية اللازمة للإفلات نهائيًا رقمًا منتهيًا أم لا نهائيًا. على الشاشة، يتلاشى المنحنى بحسب «الأس p»، والمنطقة المظللة تحته، حتى «b»، هي الطاقة المتراكمة حتى الآن. اجعل «الأس p» أقل من 1 (جرّب 0.5) واسحب «b» حتى 60. تستمر المساحة المظللة في النمو بشكل ملحوظ حتى بعيدًا هناك، فالمنحنى لا يتلاشى بسرعة كافية لتستقر شريحة المساحة المتنامية. +قد يقترب منحنى من الصفر بينما تنمو المساحة تحته إلى غير نهاية. قد تضيف كل شريحة جديدة أقل مما أضافته الشرائح السابقة، لكن عدد الشرائح التي يمكن ضمها لا ينتهي. السؤال هو هل تقترب مساهماتها مجتمعة من مجموع منتهٍ، لا هل يصعب رؤية المنحنى. -الآن ادفع «الأس p» فوق 1 (جرّب 2) واسحب «b» مجددًا. بعد نقطة معينة لا يكاد دفع «b» أبعد يغيّر المساحة المظللة، فقد أصبح ذيل المنحنى رفيعًا جدًا حتى إن ما تبقى منه لا يكاد يُذكر. هذا التوقف الظاهر عن النمو هو بالضبط ما يبدو عليه استقرار المجموع عند رقم منتهٍ واحد بدلًا من النمو إلى الأبد. +للدالة 1/x² بدءًا من 1، ترفع زيادة النهاية من 10 إلى 50 المساحة من 0.9 إلى 0.98، ويقترب المجموع من 1. أما للدالة 1/x فالمساحة ln b، وتستمر في الازدياد بلا حد. لا تكفي قراءة بطيئة التغير على الشاشة للحكم بالتقارب؛ يحسمه حساب النهاية. ## Formal -$\int_1^\infty x^{-p}\,dx = \lim_{b\to\infty}\int_1^b x^{-p}\,dx$. هذه النهاية منتهية إذا وفقط إذا كانت $p>1$، وفي هذه الحالة تساوي $\frac{1}{p-1}$. +نعرّف التكامل المعتل بالعلاقة $\int_1^\infty x^{-p}\,dx=\lim_{b\to\infty}\int_1^b x^{-p}\,dx$. يتقارب إذا وفقط إذا كان $p>1$، وتكون قيمته $1/(p-1)$. أما عندما تكون p ≤ 1، فيتباعد إلى موجب ما لا نهاية. -يتباعد التكامل من أجل $p \le 1$. فعند $p=1$ ينمو مثل $\ln b \to \infty$، ومن أجل $p<1$ ينمو مثل $b^{1-p} \to \infty$. +للحدين الموجبين a < b ومع $p\ne1$، يكون التكامل المنتهي $(b^{1-p}-a^{1-p})/(1-p)$. وعند p = 1 يكون $\ln(b/a)$. عندما تكون p > 1، تكون مساحة الذيل المتبقي بعد b هي $b^{1-p}/(p-1)$؛ لذا يظل العرض المنتهي يستبعد مساحة موجبة يمكن حسابها. ## Advanced -هذا هو اختبار التكامل للمتسلسلات. تتقارب $\sum n^{-p}$ إذا وفقط إذا كانت $p>1$ لنفس السبب بالضبط، لأن الدالة الموجبة المتناقصة $f(x)=x^{-p}$ تجعل $\sum_{n\ge1} f(n)$ محصورة بين $\int_1^\infty f$ و$f(1)+\int_1^\infty f$. التكامل غير القويم والمتسلسلة اللانهائية يتباعدان أو يتقاربان معًا. +يربط اختبار التكامل هذه النتيجة بالمتسلسلة Σ1/nᵖ عندما تكون p موجبة: بما أن x⁻ᵖ موجبة ومتناقصة، يتقارب التكامل والمتسلسلة أو يتباعدان معًا. لا تتساوى قيمتاهما المنتهيتان عمومًا. وقد يكون التكامل معتلًا بسبب نقطة غير محدودة عند طرفه؛ قرب الصفر يكون شرط تقارب ∫₀¹x⁻ᵖ dx هو p < 1، أي المتباينة المعاكسة. ## Derivation -1. دالة أصلية عادية بقاعدة القوة، مُقيَّمة عند الحدّين. -2. أس سالب على $b$ متزايدة يُرسل هذا الحد إلى الصفر. -3. عوّض بالحد المتلاشي، فيتقارب التكامل غير القويم إلى قيمة منتهية. +1. عندما تختلف p عن 1 وتثبت a عند 1، نكامل بقاعدة القوة ونحسب الفرق عند النهاية المنتهية b. +2. إذا كانت p أكبر من 1، كان الأس 1 − p سالبًا، فتؤول b مرفوعة إليه إلى الصفر. +3. نعوّض بهذه النهاية فنحصل على 1/(p − 1). تستخدم الحالة المستبعدة p = 1 اللوغاريتم وتتباعد؛ وتعطي p < 1 قوة موجبة متزايدة وتتباعد أيضًا. ## Real world -### الجاذبية وسرعة الإفلات -الشغل اللازم للإفلات من مجال جاذبية هو تكامل معتل لـ$1/r^2$ من سطح كوكب إلى اللانهاية، وهو يتقارب لأن $p=2>1$. +### ضبط كثافة احتمالية -### توزيعات الاحتمال -يجب أن تتكامل الكثافة الاحتمالية إلى مجموع منتهٍ (1) على مجال لا نهائي، وتقع التوزيعات ذات الذيل الثقيل بالضبط عند حد التقارب هذا. +يمكن ضرب كثافة مقترحة تتناسب مع x⁻ᵖ على [1, ∞) في ثابت ليصبح احتمالها الكلي 1، فقط عندما تكون p > 1. يكون الثابت عندئذ p − 1. -### طاقة الإشارة -إجمالي الطاقة في إشارة هو تكامل مربع سعتها على زمن لا نهائي، وتحديد أنها منتهية أم لا يقرر إن كانت الإشارة «محدودة الطاقة». +### تقدير الجزء المحذوف -### فقدان الحرارة الإشعاعي -تتضمن بعض نماذج التبريد والإشعاع تكاملات على مجالات غير محدودة يحدد تقاربها إن كانت الحرارة الكلية المفقودة منتهية. +عندما يتوقف حساب عند نهاية منتهية، قد يحدد تكامل معتل متقارب مقدار المساهمة المتبقية بدل افتراض أنها صفر. diff --git a/content/lessons/calculus/improper-integrals/en.md b/content/lessons/calculus/improper-integrals/en.md index 5963f98e..19db142e 100644 --- a/content/lessons/calculus/improper-integrals/en.md +++ b/content/lessons/calculus/improper-integrals/en.md @@ -1,68 +1,61 @@ --- title: Improper integrals and p-series convergence -summary: >- - A rocket trying to escape Earth's gravity needs to know whether the total - energy required settles at a finite number or keeps growing forever the - farther it travels — this idea tells you which. +summary: 'Ask whether the area under a positive curve stays finite when the interval extends without bound.' parameters: - p: exponent p - a: 'a (start, fixed near 1)' - b: b (push far to the right) + p: 'p — decay exponent' + a: 'a — positive starting bound' + b: 'b — finite ending bound' variables: - - the power in the decaying curve $1/x^p$ - - 'the bounds of the shaded, finite-$b$ approximation' + - 'p: exponent in 1/xᵖ' + - 'a, b: bounds of the finite integral shown' --- ## Try it -1. Set «exponent p» below 1 (try 0.5) and drag «b» out to 60. The shaded area keeps growing noticeably even at large b. -2. Now set «exponent p» above 1 (try 2) and drag «b» out again. Past a point, pushing b further barely changes the shaded area at all. -3. Compare the two: below p = 1 the area never settles down; above p = 1 it settles onto a fixed number. +1. Set a = 1 and p = 0.5. Increase b from 10 to 50. The integral grows from about 4.325 to 12.142, even though the curve approaches zero. +2. Keep a = 1 and set p = 2. At b = 10 the integral is 0.9; at b = 50 it is 0.98. The limiting area is 1, and the remaining area at b = 50 is 0.02. +3. Set p = 1. At b = 10 the integral is about 2.303, and at b = 50 it is about 3.912. This slow growth continues without bound. ## Real-life examples -1. **A slowly-decaying tail (p < 1).** With p = 0.5, stretching the region out to b = 50 keeps adding a meaningful amount of area — the integral never settles down. -2. **A fast-decaying tail (p > 1).** With p = 2, stretching out to b = 50 barely changes the area any more — the integral is converging. -3. **The borderline case (p = 1).** Right at p = 1, the area grows without bound, but only as slowly as the logarithm — the edge between converging and not. +1. **Slow decay.** With p = 0.5, a = 1 and b = 50, the finite integral is 2(√50 − 1) ≈ 12.142. The improper integral diverges. +2. **Faster decay.** With p = 2, a = 1 and b = 50, the finite area is 0.98. It approaches 1 as b grows without bound. +3. **The boundary case.** With p = 1, a = 1 and b = 30, the finite area is ln 30 ≈ 3.401. It has no finite limiting total. ## Test yourself -1. With the decay rate below 1, push the shaded area above 5. -2. With the decay rate above 1, push «b» far out and keep the area below 2. -3. Find a decay rate and bounds where the area settles to about 1. +1. Choose p less than 1 and b greater than a, with finite area greater than 5. +2. Choose p greater than 1 and b greater than a, with finite area less than 2. +3. Choose b greater than a and make the finite integral within 0.2 of 1. This target is the displayed finite integral, not necessarily the infinite-interval limit. ## Intuition -Imagine a rocket leaving Earth: gravity pulls less and less the farther out it gets, and physicists want to know whether the total energy needed to escape forever is some finite number or infinite. On screen, the curve fades according to «exponent p», and the shaded region under it, out to «b», is the energy added up so far. Set «exponent p» below 1 (try 0.5) and drag «b» out to 60: the shaded area keeps growing noticeably even way out there — the curve is not fading fast enough for the growing strip of area to level off. +A curve can approach zero while the area beneath it grows forever. Each new strip may contribute less than earlier strips, but there are indefinitely many strips to include. The question is whether their combined contribution approaches a finite total, not whether the curve becomes hard to see. -Now push «exponent p» above 1 (try 2) and drag «b» out again: past a point, pushing «b» further barely changes the shaded area at all — the tail of the curve has become so thin that what is left barely matters. That visible "stops growing" is exactly what it looks like when the total settles on one finite number instead of growing forever. +For 1/x² starting at 1, extending the endpoint from 10 to 50 increases the area from 0.9 to 0.98. The total approaches 1. For 1/x, the area instead equals ln b and keeps increasing without bound. A slowly changing screen value cannot by itself decide convergence; the limiting calculation does. ## Formal -$\int_1^\infty x^{-p}\,dx = \lim_{b\to\infty}\int_1^b x^{-p}\,dx$; this limit is finite iff $p>1$, in which case it equals $\frac{1}{p-1}$. +The improper integral is defined by $\int_1^\infty x^{-p}\,dx=\lim_{b\to\infty}\int_1^b x^{-p}\,dx$. It converges exactly when $p>1$, giving $1/(p-1)$. For p ≤ 1 it diverges to positive infinity. -For $p \le 1$ the integral diverges: at $p=1$ it grows like $\ln b \to \infty$; for $p<1$ it grows like $b^{1-p} \to \infty$. +For positive bounds a < b and $p\ne1$, the finite integral is $(b^{1-p}-a^{1-p})/(1-p)$. At p = 1, it is $\ln(b/a)$. For p > 1, the remaining tail beyond b is $b^{1-p}/(p-1)$, so the finite display still omits a calculable positive area. ## Advanced -This is the integral test for series: $\sum n^{-p}$ converges iff $p>1$ for exactly the same reason, since a decreasing positive $f(x)=x^{-p}$ has $\sum_{n\ge1} f(n)$ sandwiched between $\int_1^\infty f$ and $f(1)+\int_1^\infty f$ — the improper integral and the infinite series diverge or converge together. +The integral test connects this result to the series Σ1/nᵖ for positive p: because x⁻ᵖ is positive and decreasing, its integral and series converge or diverge together. Their finite limiting values are not generally equal. An integral can also be improper because of a singular endpoint; near zero, the condition for ∫₀¹x⁻ᵖ dx is p < 1, the opposite inequality. ## Derivation -1. Ordinary power-rule antiderivative, evaluated at the bounds. -2. A negative exponent on a growing $b$ sends that term to zero. -3. Substitute the vanished term — the improper integral converges to a finite value. +1. For p different from 1 and a fixed at 1, integrate using the power rule and evaluate at the finite endpoint b. +2. If p is greater than 1, the exponent 1 − p is negative, so b raised to that exponent tends to zero. +3. Substitute that limit to obtain 1/(p − 1). The excluded case p = 1 uses the logarithm and diverges; p < 1 gives an increasing positive power and also diverges. ## Real world -### Gravity and escape velocity -The work to escape a gravitational field is an improper integral of $1/r^2$ from a planet's surface to infinity — it converges because $p=2>1$. +### Normalising a density -### Probability distributions -A probability density must integrate to a finite total (1) over an infinite domain — heavy-tailed distributions sit right at this convergence boundary. +A proposed density proportional to x⁻ᵖ on [1, ∞) can be scaled to total probability 1 only when p > 1. Its normalising multiplier is then p − 1. -### Signal energy -Total energy in a signal is an integral of its squared amplitude over infinite time; whether it is finite determines if a signal is "energy-limited". +### Bounding an omitted tail -### Radiative heat loss -Some cooling and radiation models involve integrals over unbounded domains whose convergence determines whether total heat lost is finite. +When a calculation stops at a finite endpoint, a convergent improper integral can quantify the remaining contribution instead of assuming it is zero. diff --git a/content/lessons/calculus/improper-integrals/lesson.yaml b/content/lessons/calculus/improper-integrals/lesson.yaml index a83ce9ca..75a47858 100644 --- a/content/lessons/calculus/improper-integrals/lesson.yaml +++ b/content/lessons/calculus/improper-integrals/lesson.yaml @@ -55,6 +55,6 @@ presets: - { p: 2, a: 1, b: 50 } - { p: 1, a: 1, b: 30 } challenges: - - { check: 'p < 1 and (b^(1-p) - a^(1-p))/(1-p) > 5' } - - { check: 'p > 1 and (b^(1-p) - a^(1-p))/(1-p) < 2' } - - { check: '(b^(1-p) - a^(1-p))/(1-p)', target: 1, tol: 0.2 } + - { check: 'b > a and p < 1 and (b^(1-p) - a^(1-p))/(1-p) > 5' } + - { check: 'b > a and p > 1 and (b^(1-p) - a^(1-p))/(1-p) < 2' } + - { check: 'b > a ? (p == 1 ? log(b/a) : (b^(1-p) - a^(1-p))/(1-p)) : -1', target: 1, tol: 0.2 } From 110bbe2f841f695a24a6a7fe26b13b6a55109589 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:36:02 +0300 Subject: [PATCH 070/124] content: rewrite integral for first-time learners in both languages --- content/lessons/calculus/integral/ar.md | 61 +++++++++--------- content/lessons/calculus/integral/en.md | 63 +++++++++---------- content/lessons/calculus/integral/lesson.yaml | 40 ++++++------ 3 files changed, 76 insertions(+), 88 deletions(-) diff --git a/content/lessons/calculus/integral/ar.md b/content/lessons/calculus/integral/ar.md index 10486833..ceb54c2e 100644 --- a/content/lessons/calculus/integral/ar.md +++ b/content/lessons/calculus/integral/ar.md @@ -1,67 +1,62 @@ --- title: التكامل -summary: >- - كدّس مستطيلات أرفع فأرفع تحت منحنى السرعة، فتحصل على المسافة المقطوعة بالضبط. +summary: 'قرّب مقدارًا متراكمًا بمجموع مستطيلات، ثم خذ النهاية عندما تتناقص عروضها.' parameters: - 'n': عدد المستطيلات - a: الحد الأدنى a - b: الحد الأعلى b + n: 'n — عدد المستطيلات' + a: 'a — حد البداية' + b: 'b — حد النهاية' variables: - - حيث يبدأ التراكم وينتهي - - عرض شريحة واحدة، يتقلص نحو الصفر - - مساحة شريحة رقيقة واحدة + - 'a, b: مدخلا البداية والنهاية؛ يهم ترتيبهما' + - 'dx: العرض في النهاية؛ عرض كل شريحة منتهية Δx' + - 'f(x) dx: مساهمة متناهية الصغر بإشارتها' --- ## Try it -1. اجعل «عدد المستطيلات» 4. تفوّت المستطيلات كثيرًا من المساحة تحت المنحنى. -2. حرّكه إلى 50 ثم 500. تختفي الفجوات. -3. قارن «مجموع المستطيلات» بـ«التكامل» تحت الرسم. يتقلص الفرق بينهما نحو 0، فالتكامل هو ما يتجه إليه المجموع. +1. في العرض ثنائي الأبعاد، اضبط a = 0 وb = 4 وn = 4. ارتفاعات المستطيلات عند الأطراف اليسرى هي 0 و1 و4 و9، وعرض كل منها 1. مجموعها 14، بينما التكامل نحو 21.3333. +2. ثبّت الحدين وارفع n إلى 50 ثم 500. يصبح المجموع نحو 20.6976 ثم 21.2694. يتناقص الخطأ المتبقي، لكنه لا يساوي صفرًا. +3. أبقِ n = 500 واضبط a = 3 وb = 1. يصبح التكامل −26/3. عكس ترتيب الحدين يعكس الإشارة؛ استخدم العرض ثنائي الأبعاد للحدود المعكوسة. ## Real-life examples -1. **تقدير أولي خشن.** مع 4 مستطيلات فقط من a = 0 إلى b = 4، يكون المجموع تخمينًا أوليًا خشنًا للمساحة الحقيقية. -2. **تقدير أدق على مدى أقصر.** مع 50 مستطيلًا من a = 1 إلى b = 3، تختفي معظم الفجوات بين المستطيلات والمنحنى. -3. **مساحة شبه دقيقة على كامل المجال.** مع 500 مستطيل من a = 0 إلى b = 5، يكون المجموع قد تقارب عمليًا مع التكامل الحقيقي. +1. **أربعة مستطيلات.** من 0 إلى 4، مع n = 4، يقل المجموع 14 عن 64/3 بنحو 7.3333. +2. **فترة أقصر.** من 1 إلى 3، مع n = 50، يكون مجموع الأطراف اليسرى 8.5072، مقابل التكامل 26/3 ≈ 8.6667. +3. **مستطيلات كثيرة.** من 0 إلى 5، مع n = 500، يكون المجموع نحو 41.54175، مقابل 125/3 ≈ 41.66667. زيادة المستطيلات تعطي تقريبًا، لا مجموعًا منتهيًا دقيقًا تمامًا. ## Test yourself -1. جد حدودًا تكون عندها المساحة الحقيقية تحت المنحنى نحو 9. -2. استخدم أكثر من 100 مستطيل مع إبقاء المساحة فوق 20. -3. اجعل المساحة الموجهة سالبة بجعل الحد الأدنى أكبر من الحد الأعلى. +1. اختر حدين يختلف تكاملهما عن 9 بما لا يتجاوز 0.3. +2. استخدم أكثر من 100 مستطيل، واجعل التكامل أكبر من 20. +3. اجعل التكامل سالبًا باختيار a أكبر من b في العرض ثنائي الأبعاد. ## Intuition -تخيل المنطقة تحت خط منحنٍ على الشاشة، وتريد مساحتها بالضبط، لكن الشكل الوحيد الذي تعرف مساحته يقينًا هو المستطيل، أي الطول ضرب العرض فقط. وإليك الحيلة. غطِّ المنطقة المنحنية بعدد من المستطيلات الرفيعة جنبًا إلى جنب، يحدده «عدد المستطيلات»، واجمع مساحاتها كلها بدلًا من ذلك. +لتقدير المساحة تحت x² من 0 إلى 4، نقسم الفترة إلى أربع شرائح عرض كل منها 1. نستخدم قيمة المنحنى عند بداية كل شريحة ارتفاعًا لمستطيلها. الارتفاعات 0 و1 و4 و9، فيكون المجموع 14. وبما أن المنحنى يرتفع خلال كل شريحة، تفوت المستطيلات جزءًا من المساحة. -مع ضبط «عدد المستطيلات» على 4 تكون المطابقة ضعيفة، إذ تفوّت المستطيلات بوضوح أجزاء من المساحة الحقيقية. حرّكه إلى 10 ثم 50 ثم 500. تختفي الفجوات ويستقر المجموع على رقم واحد، يقترب أكثر فأكثر من المساحة الحقيقية. ذلك الرقم المستقر هو التكامل. +تتبع الشرائح الأضيق المنحنى بدقة أكبر. تقترب مجاميعها من قيمة، رغم أن كل تقدير منتهٍ قد يظل فيه خطأ. هذه النهاية للتراكم هي التكامل المحدد. تغيير n يغيّر التقريب؛ أما تغيير الحدين a وb فيغيّر المقدار الذي نجمعه. ## Formal -$\int_a^b f(x)\,dx = \lim_{n \to \infty} \sum_{i=1}^{n} f(x_i^*)\,\Delta x$ حيث $\Delta x = \tfrac{b-a}{n}$. +لدالة متصلة على فترة تحقق $a- - Working out the exact distance a car covered from a wiggly speed graph is - not something a ruler can do — stacking thinner and thinner rectangles - under the curve is how this idea gets it exactly. +summary: 'Approximate accumulation with rectangles, then take the limit as their widths shrink.' parameters: - 'n': number of rectangles - a: lower bound a - b: upper bound b + n: 'n — number of rectangles' + a: 'a — starting bound' + b: 'b — ending bound' variables: - - where the accumulation starts and stops - - 'the width of one slice, shrinking toward zero' - - the area of one thin slice + - 'a, b: starting and ending inputs; their order matters' + - 'dx: limiting width; each finite strip has width Δx' + - 'f(x) dx: infinitesimal signed contribution' --- ## Try it -1. Set «number of rectangles» to 4. The rectangles miss a lot of the area under the curve. -2. Slide it to 50, then 500. The gaps disappear. -3. Compare «sum of rectangles» with «integral» under the picture: the difference shrinks toward 0. The integral is where the sum is heading. +1. In the 2D view, set a = 0, b = 4 and n = 4. The left-endpoint heights are 0, 1, 4 and 9, each with width 1. Their sum is 14; the integral is about 21.3333. +2. Keep the bounds and increase n to 50, then 500. The sums are about 20.6976 and 21.2694. The remaining error shrinks but is not zero. +3. Keep n = 500 and set a = 3, b = 1. The integral becomes −26/3. Reversing the bounds reverses the sign; use the 2D view for reversed bounds. ## Real-life examples -1. **A rough first estimate.** With just 4 rectangles from a = 0 to b = 4, the sum is a crude first guess at the true area. -2. **A tighter estimate over a shorter interval.** With 50 rectangles from a = 1 to b = 3, the gaps between rectangles and curve have mostly vanished. -3. **A near-exact area over the full domain.** With 500 rectangles from a = 0 to b = 5, the sum has essentially converged to the true integral. +1. **Four rectangles.** From 0 to 4 with n = 4, the sum 14 underestimates 64/3 by about 7.3333. +2. **A shorter interval.** From 1 to 3 with n = 50, the left sum is 8.5072, compared with the integral 26/3 ≈ 8.6667. +3. **Many rectangles.** From 0 to 5 with n = 500, the sum is about 41.54175, compared with 125/3 ≈ 41.66667. More rectangles give an approximation, not an exact finite sum. ## Test yourself -1. Find bounds where the true area under the curve equals about 9. -2. Use more than 100 rectangles while keeping the area above 20. -3. Make the signed area negative by setting the lower bound above the upper bound. +1. Choose bounds whose integral is within 0.3 of 9. +2. Use more than 100 rectangles and make the integral greater than 20. +3. Make the integral negative by choosing a greater than b in the 2D view. ## Intuition -Picture the region under a curving line on screen, and imagine wanting its exact area — but the only shape whose area you know for certain is a rectangle, just width times height. So here is the trick: cover the curved region with «number of rectangles» thin rectangles side by side, and add up all their areas instead. +To estimate the area under x² from 0 to 4, divide the interval into four strips of width 1. Use the curve's value at the start of each strip as its rectangle height. The heights are 0, 1, 4 and 9, so the total is 14. Because the curve rises across each strip, these rectangles miss part of the area. -With «number of rectangles» set to 4 the fit is poor — the rectangles clearly miss chunks of the true area. Slide it up to 10, then 50, then 500: the gaps vanish and the sum settles on a single number, closer and closer to the true area. That settling number is called the integral. +Narrower strips follow the curve more closely. Their sums approach a value even though every finite estimate can still have error. That limiting accumulation is the definite integral. Changing n changes the approximation; changing the bounds a and b changes the quantity being accumulated. ## Formal -$\int_a^b f(x)\,dx = \lim_{n \to \infty} \sum_{i=1}^{n} f(x_i^*)\,\Delta x$ with $\Delta x = \tfrac{b-a}{n}$. +For a continuous function on an interval with $a Date: Mon, 16 Nov 2026 22:36:02 +0300 Subject: [PATCH 071/124] content: rewrite limit for first-time learners in both languages --- content/lessons/calculus/limit/ar.md | 54 +++++++++++++-------------- content/lessons/calculus/limit/en.md | 56 +++++++++++++--------------- 2 files changed, 52 insertions(+), 58 deletions(-) diff --git a/content/lessons/calculus/limit/ar.md b/content/lessons/calculus/limit/ar.md index 97ddb5ca..1f58c0aa 100644 --- a/content/lessons/calculus/limit/ar.md +++ b/content/lessons/calculus/limit/ar.md @@ -1,61 +1,59 @@ --- title: النهاية -summary: >- - سرعتك في هذه اللحظة بالضبط، لا في الدقيقة الماضية. النهاية هي ما يقترب منه الرقم. +summary: 'اعرف القيمة التي تقترب منها الدالة قرب مدخل معين، حتى لو لم تكن معرّفة عند ذلك المدخل.' parameters: - d: المسافة من الصفر + d: 'd — المسافة الموجبة عن الصفر' variables: - - المدخل، ينزلق نحو الصفر من الجهتين - - غير معرّفة عند x = 0 (لأن ذلك يعطي 0/0)، تظهر كنقطة مفرغة + - 'x: المدخل بالراديان، ويقترب من الصفر' + - 'sin(x)/x: نسبة معرّفة عندما لا تساوي x صفرًا' --- ## Try it -1. حرّك المنزلق «البعد عن 0» نحو الصفر. تنزلق النقطتان نحو الفجوة في الوسط. -2. اقرأ الأرقام تحت الرسم. تقترب 0.84…، ثم 0.99…، ثم 0.9999… أكثر فأكثر من 1. -3. للدالة ثقب عند الصفر تمامًا، ومع ذلك يشير كل شيء إلى 1. هذا العدد 1 هو النهاية. +1. اضبط d = 1. تمثل النقطتان المدخلين −1 و1، وتعطي كلتاهما sin(x)/x ≈ 0.84147. +2. قلّل d إلى 0.1 ثم 0.01. تقارب القيمتان 0.99833 و0.999983. تعرض القراءات أيضًا المدخلين d/10 وd/100، وهما أقرب إلى الصفر. +3. انظر إلى النقطة المفرغة عند (0, 1). تمثل قيمة النهاية، لا قيمة معرّفة لـsin(x)/x عند الصفر. يقترب المنزلق من الصفر دون بلوغه. ## Real-life examples -1. **بعيدًا عن الثقب.** عند d = 3، ما زالت القراءة بعيدة عن النهاية الحقيقية، ويبقى مجال واسع للاقتراب أكثر. -2. **الاقتراب.** عند d = 0.5، تستقر القراءة بالفعل ضمن نحو 6% من النهاية الحقيقية 1. -3. **قريب جدًا.** عند d = 0.01، لا يمكن تمييز القراءة عن النهاية 1 بالعين المجردة. +1. **بعيدًا نسبيًا.** عند d = 3، يكون sin(3)/3 ≈ 0.04704. ليس لازمًا أن تشبه قيمة بعيدة عن الصفر قيمة النهاية. +2. **أقرب.** عند d = 0.5، يكون sin(0.5)/0.5 ≈ 0.95885، أي أقل من 1 بنحو 0.04115. +3. **قريب جدًا.** عند d = 0.01، تقارب القيمة 0.999983. قد يعرض التقريب العدد 1، لكن القيمة عند هذا المدخل غير الصفري تظل أقل من 1. ## Test yourself -1. اجعل القراءة ضمن 0.01 من النهاية الحقيقية. -2. ادفع القراءة دون 0.9. -3. جد مسافة تكون عندها القراءة سالبة. +1. اجعل |sin(d)/d − 1| أقل من 0.01. +2. أوجد d تكون عنده sin(d)/d أقل من 0.9. +3. أوجد d تكون عنده sin(d)/d سالبة. ## Intuition -جرّب قسمة 0 على 0 في آلة حاسبة فسترفض، فهذه العملية لا جواب لها، وهذا بالضبط ما يحدث لهذه الدالة عند المدخل 0، وتظهر هناك كنقطة مفرغة بلا نقطة ممتلئة. لكن النهاية لا تسأل أبدًا عمّا يحدث عند تلك النقطة المفقودة بالذات، بل تسأل إلى أين تتجه الدالة وأنت تقترب منها خلسة من الجهتين. +عند x = 0، تتطلب العبارة sin(x)/x قسمة على صفر، لذلك لا تكون معرّفة. لكن المدخلات القريبة غير الصفرية تظل لها نواتج. تسأل النهاية: هل نستطيع جعل هذه النواتج قريبة من عدد واحد بقدر ما نريد، بأخذ المدخل قريبًا بما يكفي من الصفر؟ لا يتطلب ذلك وجود قيمة عند الصفر نفسه. -اسحب المنزلق «البعد عن 0» نحو الصفر وراقب النقطتين تنزلقان نحو الفجوة، واقرأ الأرقام تحت الرسم، وهي 0.84، ثم 0.99، ثم 0.9999. تقترب أكثر فأكثر من 1 في كل مرة، من الجهتين معًا. تلك الوجهة، 1، هي النهاية، رغم أن الدالة نفسها غير معرَّفة هناك أبدًا. +في هذا المثال تقترب القيم من 1 من الجهتين. للنسبة القيمة نفسها عند x وعند −x لأن البسط والمقام يغيّران إشارتيهما معًا. يقترح الرسم والعينات النتيجة، وتوضح حجة الانحشار أدناه لماذا يستمر الاقتراب بعد القيم المحدودة التي يستطيع المنزلق عرضها. نقيس مدخل الجيب بالراديان في هذا المثال كله. ## Formal -يعني $\lim_{x \to a} f(x) = L$ أنه لكل $\varepsilon > 0$ يوجد $\delta > 0$ بحيث إن تحقق $0 < |x - a| < \delta$ استلزم $|f(x) - L| < \varepsilon$. +تعني العبارة $\lim_{x\to a}f(x)=L$ أننا نستطيع جعل النواتج قريبة من L بقدر ما نريد، بأخذ كل مدخلات المجال قريبة بما يكفي من a، مع استبعاد a نفسها. وتتطلب النهاية من الجهتين اتفاقهما عندما تكونان متاحتين. -هنا $a = 0$، $L = 1$. والشرط $0 < |x - a|$ هو سبب عدم أهمية قيمة الدالة عند $a$ نفسها. +بدقة، لكل $\varepsilon>0$ يوجد $\delta>0$ بحيث إن $0<|x-a|<\delta$ يستلزم $|f(x)-L|<\varepsilon$. تمثل إبسيلون الخطأ المسموح في الناتج، وتمثل دلتا مسافة كافية للمدخل. في مثالنا $a=0$ و$L=1$. ## Advanced -نفي هذا التعريف هو الطريقة التي يُثبت بها عدم وجود نهاية، إذ يوجد $\varepsilon > 0$ بحيث يحتوي كل جوار نصف قطره $\delta$ على $x$ يحقق $|f(x) - L| \ge \varepsilon$. وبصورة معادلة، حسب تعريف هاينه، يتحقق $f(x_n) \to L$ لكل متتالية $x_n \to a$ مع $x_n \ne a$، وهذا بالضبط ما تختبره القراءات المتقلصة. +إذا عرّفنا دالة جديدة تساوي sin(x)/x بعيدًا عن الصفر وتساوي 1 عنده، ملأنا الفجوة وجعلنا الدالة متصلة. إسناد قيمة أخرى عند الصفر لا يغيّر النهاية، لكنه يبقي الانقطاع. لا تكفي عينات قليلة متفقة لإثبات نهاية دالة عامة؛ فالتعريف يشمل كل مدخلات المجال القريبة بما يكفي. ## Derivation -1. قارن مساحات مثلث وقطاع دائري ومثلث أكبر على دائرة الوحدة. -2. يرتفع الحد الأدنى نحو 1، والحد الأعلى يساوي 1 أصلًا. -3. مبرهنة الانحشار تقول إن الدالة المحصورة بين شيئين يقتربان من 1 لا بد أن تقترب من 1 أيضًا. +1. تعطي مقارنة مساحات على دائرة الوحدة cos x < sin(x)/x < 1 عندما تكون 0 < x < π/2. النسبة وجيب التمام دالتان زوجيتان، فتسري الحدود نفسها على المدخلات السالبة المقابلة. +2. عندما تقترب x من الصفر، يقترب الحد السفلي cos x من 1، بينما الحد العلوي يساوي 1 أصلًا. +3. تلزم مبرهنة الانحشار العبارة الواقعة بينهما بالاقتراب من 1 أيضًا. ## Real world -### السرعة اللحظية -السرعة في لحظة معينة هي نهاية لمتوسطات السرعة على فترات زمنية تتقلص باستمرار. +### حسابات الزوايا الصغيرة -### تقريب الزاوية الصغيرة -هذه النهاية بالذات هي سبب صحة التقريب $\sin\theta \approx \theta$ في البندولات والبصريات. +للزاوية الصغيرة بالراديان، يكون الجيب قريبًا من الزاوية نفسها. تفسر هذه النهاية التقريب؛ ويتوقف مدى صغر الزاوية المقبول على مقدار الخطأ المسموح. -### الطرق العددية -كل محاكاة تصغّر خطوتها الحسابية تعتمد على وجود نهاية. +### التغير اللحظي + +تستخدم المشتقة نهاية لمعدلات تغير متوسطة على فترات تتقلص. قد تكون النسبة غير معرّفة عند فترة طولها صفر، رغم وجود نهايتها. diff --git a/content/lessons/calculus/limit/en.md b/content/lessons/calculus/limit/en.md index b324eae5..4364d539 100644 --- a/content/lessons/calculus/limit/en.md +++ b/content/lessons/calculus/limit/en.md @@ -1,63 +1,59 @@ --- title: Limit -summary: >- - A GPS working out your speed at this exact instant, not your average over - the last minute, needs to know what your speed is heading toward as the - time window shrinks to nothing — that is what a limit gives you. +summary: 'Find the value a function approaches near an input, even when the function is undefined at that input.' parameters: - d: distance from 0 + d: 'd — positive distance from zero' variables: - - 'the input, sliding toward 0 from both sides' - - undefined at x = 0 (that would be 0/0) — shown as a hollow point + - 'x: input in radians, approaching zero' + - 'sin(x)/x: ratio defined for nonzero x' --- ## Try it -1. Drag the slider «distance from 0» toward 0. The two dots slide toward the gap in the middle. -2. Read the numbers under the picture: 0.84…, 0.99…, 0.9999… They get closer and closer to 1. -3. The function has a hole exactly at 0, yet everything points at 1. That number 1 is the limit. +1. Set d = 1. The marked inputs are −1 and 1; both give sin(x)/x ≈ 0.84147. +2. Reduce d to 0.1, then 0.01. The corresponding values are about 0.99833 and 0.999983. The readout also samples inputs d/10 and d/100, even closer to zero. +3. Look at the hollow point at (0, 1). It marks the limiting value, not a defined value of sin(x)/x at zero. The slider approaches zero without reaching it. ## Real-life examples -1. **Far from the hole.** At d = 3, the readout is still a loose approximation of the limit — plenty of room left to close in. -2. **Getting close.** At d = 0.5, the readout already sits within about 6% of the true limit of 1. -3. **Extremely close.** At d = 0.01, the readout is indistinguishable from the limit 1 to the naked eye. +1. **Farther away.** At d = 3, sin(3)/3 ≈ 0.04704. A value far from zero need not resemble the limit. +2. **Closer.** At d = 0.5, sin(0.5)/0.5 ≈ 0.95885, about 0.04115 below 1. +3. **Very close.** At d = 0.01, the value is about 0.999983. Rounding may show 1, but the value at this nonzero input is still less than 1. ## Test yourself -1. Get the readout within 0.01 of the true limit. -2. Push the readout below 0.9. -3. Find a distance where the readout is negative. +1. Make |sin(d)/d − 1| less than 0.01. +2. Find d for which sin(d)/d is less than 0.9. +3. Find d for which sin(d)/d is negative. ## Intuition -Try dividing 0 by 0 on a calculator and it refuses — that calculation has no answer, and exactly that happens to this function at the input 0, shown as a hollow point with no dot filled in. But a limit never asks what happens exactly at that missing point; it asks what the function is heading toward as you sneak up on it from both sides. +At x = 0, the expression sin(x)/x would require division by zero, so it is undefined. Nearby nonzero inputs still have valid outputs. A limit asks whether those outputs become arbitrarily close to one number as the input approaches zero. It does not require a value at zero itself. -Drag the slider «distance from 0» toward 0 and watch the two dots slide toward the gap, reading off the numbers beneath the picture: 0.84, then 0.99, then 0.9999 — closer and closer to 1 every time, from both directions. That destination, 1, is the limit, even though the function itself is never actually defined there. +Here both sides approach 1. The ratio has the same value at x and −x because numerator and denominator both change sign. The graph and samples suggest the result; the squeeze argument below explains why the approach continues beyond the finite values a slider can show. Throughout this example, the sine input is in radians. ## Formal -$\lim_{x \to a} f(x) = L$ means: for every $\varepsilon > 0$ there is a $\delta > 0$ such that $0 < |x - a| < \delta$ implies $|f(x) - L| < \varepsilon$. +The statement $\lim_{x\to a}f(x)=L$ means that we can make the outputs as close to L as desired by taking all domain inputs sufficiently close to a, while excluding a itself. A two-sided limit requires agreement from both sides when both are available. -Here $a = 0$, $L = 1$. The condition $0 < |x - a|$ is why the value at $a$ itself is irrelevant. +Precisely, for every $\varepsilon>0$ there is a $\delta>0$ such that $0<|x-a|<\delta$ implies $|f(x)-L|<\varepsilon$. Epsilon is the allowed output error, and delta is a sufficient input distance. In this example $a=0$ and $L=1$. ## Advanced -Negating the definition is how limits are shown not to exist: there is an $\varepsilon > 0$ such that every $\delta$-neighbourhood contains an $x$ with $|f(x) - L| \ge \varepsilon$. Equivalently (Heine), $f(x_n) \to L$ for every sequence $x_n \to a$ with $x_n \ne a$ — which is exactly what the shrinking readouts sample. +Defining a new function to equal sin(x)/x away from zero and to equal 1 at zero fills the hole continuously. Giving it a different value at zero would not change the limit, but would leave a discontinuity. A few matching samples cannot establish a limit for an arbitrary function; the definition concerns all sufficiently nearby domain inputs. ## Derivation -1. Compare areas of a triangle, a circular sector and a larger triangle on the unit circle. -2. The lower bound rises to 1; the upper bound is already 1. -3. Squeeze theorem: trapped between two things that approach 1, it must approach 1 too. +1. Comparing areas on the unit circle gives cos x < sin(x)/x < 1 for 0 < x < π/2. The ratio and cosine are even, so the same bounds hold for the corresponding negative inputs. +2. As x approaches zero, the lower bound cos x approaches 1, while the upper bound is already 1. +3. The squeeze theorem forces the middle expression to approach 1 as well. ## Real world -### Instantaneous speed -Speed “at an instant” is a limit of average speeds over shrinking time intervals. +### Small-angle calculations -### Small-angle approximation -This exact limit is why $\sin\theta \approx \theta$ works for pendulums and optics. +For a small radian angle, sine is close to the angle itself. This limit explains the approximation; how small is acceptable depends on the required error. -### Numerical methods -Every simulation that refines its step size is relying on a limit existing. +### Instantaneous change + +A derivative uses a limit of average rates over shrinking intervals. The relevant quotient may be undefined at a zero interval even though its limit exists. From c1246cb6ade8a7c197b7890f5e6a3cb836202389 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:36:02 +0300 Subject: [PATCH 072/124] content: rewrite limits-at-infinity for first-time learners in both languages --- .../lessons/calculus/limits-at-infinity/ar.md | 61 +++++++++--------- .../lessons/calculus/limits-at-infinity/en.md | 63 +++++++++---------- 2 files changed, 56 insertions(+), 68 deletions(-) diff --git a/content/lessons/calculus/limits-at-infinity/ar.md b/content/lessons/calculus/limits-at-infinity/ar.md index 0576ddef..046b10e0 100644 --- a/content/lessons/calculus/limits-at-infinity/ar.md +++ b/content/lessons/calculus/limits-at-infinity/ar.md @@ -1,67 +1,62 @@ --- title: 'النهايات عند اللانهاية والخطوط المقاربة' -summary: >- - المظلي لا يسقط أسرع من حد معين مهما طال السقوط. المنحنى أيضًا يستقر عند خط لا يتجاوزه. +summary: 'اعرف القيمة التي تقترب منها دالة كسرية مع ازدياد مدخلها، وميّز المقارب من الحد الأعلى.' parameters: - a: a (الارتفاع النهائي) - b: b - x: x (اسحب بعيدًا إلى اليمين) + a: 'a — قيمة النهاية' + b: 'b — الثابت الموجب في المقام' + x: 'x — المدخل المختار' variables: - - معامل الحد الرائد، يصبح ارتفاع المقارب - - ثابت يُضاف إلى الحد الرائد في المقام - - المدخل، يتجه نحو قيم كبيرة + - 'a: معامل x² في البسط' + - 'b: الثابت المضاف إلى x² في المقام' + - 'x: المدخل الذي نزيده لفحص النهاية' --- ## Try it -1. اسحب «x (اسحب بعيدًا إلى اليمين)» إلى ما بعد 30 أو 40. يتسطح المنحنى ويلتصق بخط أفقي. -2. اقرأ الارتفاع المسطح وقارنه بـ«a (الارتفاع النهائي)». تجدهما متطابقين. -3. غيّر «b» وراقب قرب x = 0. يعيد المنحنى تشكّله هناك، لكن الارتفاع المسطح بعيدًا إلى اليمين لا يتحرك أبدًا. +1. اضبط a = 2 وb = 3. قارن x = 5 وx = 50؛ القيمتان نحو 1.82143 و1.99800، وتقتربان من 2. +2. أبقِ a = 2 وزد b. تتغير القيم عند x المنتهية، لكن النهاية تبقى 2. +3. اضبط a = 0.5 وb = 1. عند x = 0 تكون القيمة 1، ومع ازدياد x تقترب من 0.5 من الأعلى. ليس لازمًا أن يكون المقارب حدًا أعلى. ## Real-life examples -1. **قراءة مبكرة، ما زالت تستقر.** مع a = 2، b = 3، وx = 5، لم يصل المنحنى بعد إلى مقاربه المسطح، وما زال يتغيّر بوضوح. -2. **الاقتراب من السرعة النهائية.** مع a = 1.5، b = 6، وx = 50، استقرت سرعة جسم ساقط قريبًا جدًا من قيمتها النهائية a. -3. **تفاعل إنزيمي قرب أقصى معدله.** مع a = 3.5، b = 1، وx = 45، ارتفع معدل التفاعل قريبًا من سقفه Vmax، ويمثله هنا a. +1. **فرق واضح.** عند a = 2 وb = 3 وx = 5، تكون القيمة 51/28 ≈ 1.82143، أي أقل من النهاية بنحو 0.17857. +2. **فرق صغير.** عند a = 1.5 وb = 6 وx = 50، تكون القيمة نحو 1.49681، أي أقل من النهاية بنحو 0.00319. +3. **أقرب من ذلك.** عند a = 3.5 وb = 1 وx = 45، تكون القيمة نحو 3.49877، أي أقل من النهاية بنحو 0.00123. ## Test yourself -1. ادفع x بعيدًا بما يكفي حتى يستقر المنحنى ضمن 0.01 من مقاربه المسطح a. -2. اجعل المقارب أعلى من 3، وتأكّد أن المنحنى استقر ضمن 0.05 منه. -3. أبقِ x قرب 0 واجعل قيمة المنحنى أدنى من المقارب a بأكثر من 3. +1. اجعل القيمة المطلقة للفرق بين f(x) وa أقل من 0.01. +2. اختر a أكبر من 3، واجعل ذلك الفرق أقل من 0.05 بالقيمة المطلقة. +3. أبقِ x أقل من 0.5، واجعل a − f(x) أكبر من 3. ## Intuition -تخيل غواصًا مظليًا قفز للتو: يتسارع بسرعة في البداية، لكن مقاومة الهواء تزداد هي الأخرى، وفي النهاية تتوقف سرعة سقوطه عن الازدياد وتستقر عند رقم ثابت، هو السرعة الحدّية. على الشاشة، اسحب «x (اسحب بعيدًا إلى اليمين)» إلى ما بعد 30 أو 40، ليمثل مزيدًا من زمن السقوط. ومهما تعرّج المنحنى قرب البداية، فإنه يتسطح ويلتصق بخط أفقي. +في الكسر (ax² + 1)/(x² + b)، يعتمد نمو البسط والمقام أساسًا على x² عندما تكبر x. يحتوي البسط على a أمثال هذا الحد، والمقام على مثله مرة واحدة، فتقترب النسبة من a. تظل الحدود الثابتة مؤثرة في كل قراءة منتهية، لكن تأثيرها النسبي يتناقص. -اقرأ ذلك الارتفاع المسطح وقارنه بمنزلق «a (الارتفاع النهائي)». تجدهما متطابقين، مهما كانت قيمة «b». غيّر الآن «b» وراقب بدقة. فهو يعيد تشكيل المنحنى بوضوح قرب البداية، حيث ما زال أثره مقارَبًا في الحجم لبقية الحدود، لكنه لا يؤثر إطلاقًا على الارتفاع المسطح بعيدًا إلى اليمين، لأن الحد الأسرع نموًا هناك يطغى على كل شيء آخر. +المستقيم y = a مقارب أفقي. يصف سلوك الدالة بعيدًا على محور المدخلات، وليس حاجزًا يستحيل أن تعبره. في هذه العائلة تحديدًا، بسط الفرق عن a هو 1 − ab، فتثبت إشارته، أو يساوي المنحنى كله a عندما تكون ab = 1. وقد تعبر دوال أخرى مقارباتها الأفقية. ## Formal -$\lim_{x\to\infty}\frac{ax^2+1}{x^2+b} = a$، لأن قسمة البسط والمقام على $x^2$ يرسل الحدود الثابتة إلى $0$. +مع b الموجبة المستخدمة هنا، تكون $f(x)=(ax^2+1)/(x^2+b)$ معرّفة لكل x حقيقية. قسمة البسط والمقام على x² عندما تكون x غير صفرية تعطي $f(x)=(a+1/x^2)/(1+b/x^2)$، ومنه $\lim_{x\to\infty}f(x)=a$. وتتحقق النهاية نفسها عندما تتجه x إلى سالب ما لا نهاية. -الخط $y=a$ مقارب أفقي، يقترب منه الرسم البياني مع $x\to\infty$ لكنه ليس مضطرًا للوصول إليه أبدًا. +الفرق الدقيق هو $f(x)-a=(1-ab)/(x^2+b)$. لذلك تجعل x الكبيرة الخطأ صغيرًا، ولا يلزم أن تجعله صفرًا. إذا كان $ab=1$، فالخطأ صفر لكل مدخل أصلًا. يصل المنزلق إلى 60 فقط؛ ويثبت الجبر النهاية بعد النافذة المرئية. ## Advanced -هذه حالة خاصة من القاعدة العامة للدوال النسبية $p(x)/q(x)$. فإذا كانت $\deg p = \deg q$ فإن النهاية عند اللانهاية هي نسبة المعاملات الرائدة. وإذا كانت $\deg p < \deg q$ فهي $0$. وإذا كانت $\deg p > \deg q$ فلا توجد نهاية منتهية (تتباعد الدالة، وربما على طول مقارب مائل). +لنسبة كثيرتي حدود غير صفريتين، نقارن الدرجتين. تساويهما يعطي نهاية منتهية تساوي نسبة المعاملين الرئيسيين، وصغر درجة البسط يعطي صفرًا. أما كبر درجة البسط فلا يعطي نهاية أفقية منتهية. يمكن عندئذ استخدام قسمة كثيرات الحدود لوصف السلوك عند المدخلات الكبيرة. ## Derivation -1. اقسم كل حد على $x^2$، وهي أعلى قوة موجودة. -2. أي ثابت مقسوم على $x^2$ متزايدة يتلاشى في النهاية. -3. عوّض بالحدود المتلاشية، فلا يبقى سوى المعاملات الرائدة. +1. نقسم كل حد في البسط والمقام على x². نستخدم هذه الصيغة بعيدًا عن الصفر، وهو كافٍ لدراسة نهاية عند اللانهاية. +2. عند تثبيت a وb، تقترب 1/x² وb/x² من الصفر مع ازدياد x. +3. يقترب المقام من 1 لا من صفر، فتقترب النسبة من a/1. ## Real world -### السرعة النهائية -نماذج مقاومة الهواء مثل $v(t) \to v_{\text{terminal}}$ مع $t\to\infty$ هي نهايات من نوع المقارب الأفقي. +### متوسط مع استهلاك ثابت -### حركية الإنزيمات لميكائيليس-منتن -يقترب معدل التفاعل من الحد الأقصى $V_{\max}$ مع تزايد تركيز الركيزة، وهو مقارب لدالة نسبية. +إذا كان نموذج استهلاك الموارد لعدد q من القطع هو F + cq، كان متوسط الاستهلاك c + F/q. يقترب المتوسط من c مع ازدياد q. هذا مثال آخر لنهاية دالة كسرية، بصيغته وافتراضاته الخاصة. -### متوسطات التكلفة على المدى الطويل -متوسط تكلفة الوحدة مع تزايد الإنتاج يستقر نحو التكلفة الحدية، وهي المقارب الأفقي لمنحنى نسبة التكلفة. +### تقدير السلوك عند مدخل كبير -### تشبع نسبة الإشارة إلى الضوضاء -تتشبع استجابة العديد من الكواشف نحو مستوى ثابت مع تزايد شدة الإدخال بلا حدود. +تساعد النهاية على تقريب صيغة عند مدخلات كبيرة. وإذا عرفنا تعبيرًا دقيقًا للخطأ، أمكننا فحص ما إذا كان مدخل معين كبيرًا بما يكفي للدقة المطلوبة. diff --git a/content/lessons/calculus/limits-at-infinity/en.md b/content/lessons/calculus/limits-at-infinity/en.md index 6532e243..73790583 100644 --- a/content/lessons/calculus/limits-at-infinity/en.md +++ b/content/lessons/calculus/limits-at-infinity/en.md @@ -1,69 +1,62 @@ --- title: Limits at infinity and horizontal asymptotes -summary: >- - A skydiver falling from a plane can't fall faster than their top speed no - matter how long the fall continues — a horizontal asymptote is the number - a curve settles toward and never runs past, the same way. +summary: 'Find the value a rational function approaches as its input grows, and distinguish an asymptote from a ceiling.' parameters: - a: a (limiting height) - b: b - x: x (drag far to the right) + a: 'a — limiting value' + b: 'b — positive denominator constant' + x: 'x — selected input' variables: - - coefficient of the leading term — becomes the asymptote height - - constant added to the denominator's leading term - - 'input, dragged out toward large values' + - 'a: coefficient of x² in the numerator' + - 'b: constant added to x² in the denominator' + - 'x: input increased to examine the limit' --- ## Try it -1. Drag «x (drag far to the right)» out past 30 or 40. The curve flattens and hugs a horizontal line. -2. Read the flat height and compare it to «a (limiting height)». They match. -3. Change «b» and watch near x = 0: the curve reshapes there, but the flat height far to the right never moves. +1. Set a = 2 and b = 3. Compare x = 5 with x = 50: the values are about 1.82143 and 1.99800, increasingly close to 2. +2. Keep a = 2 and increase b. Finite-x values change, but the limiting value remains 2. +3. Set a = 0.5 and b = 1. At x = 0 the value is 1; as x grows it approaches 0.5 from above. An asymptote need not be an upper bound. ## Real-life examples -1. **Early reading, still settling.** With a = 2, b = 3 and x = 5, the curve hasn't reached its flat asymptote yet — it's still visibly changing. -2. **Terminal velocity nearly reached.** With a = 1.5, b = 6 and x = 50, a falling object's speed has settled almost exactly onto its terminal value a. -3. **An enzyme reaction near its maximum rate.** With a = 3.5, b = 1 and x = 45, the reaction rate has climbed close to its ceiling Vmax, here represented by a. +1. **A visible difference.** At a = 2, b = 3 and x = 5, the value is 51/28 ≈ 1.82143, about 0.17857 below the limit. +2. **A small difference.** At a = 1.5, b = 6 and x = 50, the value is about 1.49681, about 0.00319 below the limit. +3. **Closer still.** At a = 3.5, b = 1 and x = 45, the value is about 3.49877, about 0.00123 below the limit. ## Test yourself -1. Push x out far enough that the curve sits within 0.01 of its flat asymptote a. -2. Make the asymptote higher than 3, and confirm the curve has settled within 0.05 of it. -3. Keep x near 0 and make the curve's value more than 3 below the asymptote a. +1. Make the difference between f(x) and a less than 0.01 in magnitude. +2. Choose a greater than 3 and make that difference less than 0.05. +3. Keep x less than 0.5 and make a − f(x) greater than 3. ## Intuition -Picture a skydiver who has just jumped: at first they speed up quickly, but air resistance grows too, and eventually their falling speed stops increasing and settles at a fixed number — the terminal velocity. On screen, drag «x (drag far to the right)» out past 30 or 40, standing in for more and more time spent falling: the curve, however it wiggled near the start, flattens out and hugs a horizontal line. +In the fraction (ax² + 1)/(x² + b), both numerator and denominator grow mainly like x² when x is large. The numerator contains a copies of that dominant term and the denominator one copy. Their ratio therefore approaches a. The constant terms still affect each finite reading, but their relative influence shrinks. -Read off that flat height and compare it to the slider «a (limiting height)» — they match, no matter how «b» is set. Now change «b» and watch closely: it visibly reshapes the curve near the very start, where its effect is still comparable in size to everything else, but it has no effect at all on the flat height far to the right, because out there the fastest-growing term dwarfs everything else. +The limiting line y = a is a horizontal asymptote. It describes behaviour far along the input axis, not a barrier the function can never cross. For this particular family, the difference from a has numerator 1 − ab, so its sign stays fixed, or the whole curve equals a when ab = 1. Other functions can cross their horizontal asymptotes. ## Formal -$\lim_{x\to\infty}\frac{ax^2+1}{x^2+b} = a$, since dividing numerator and denominator by $x^2$ sends the constant terms to $0$. +For the positive b used here, $f(x)=(ax^2+1)/(x^2+b)$ is defined for all real x. Dividing numerator and denominator by x² for nonzero x gives $f(x)=(a+1/x^2)/(1+b/x^2)$, hence $\lim_{x\to\infty}f(x)=a$. The same limit holds as x tends to negative infinity. -The line $y=a$ is a horizontal asymptote: the graph approaches it as $x\to\infty$ but need not ever equal it. +The exact error is $f(x)-a=(1-ab)/(x^2+b)$. Thus large x makes the error small; it need not make it zero. If $ab=1$, the error is already zero for every input. The control reaches only 60, so the algebra establishes the limit beyond the visible window. ## Advanced -This is a special case of the general rule for rational functions $p(x)/q(x)$: if $\deg p = \deg q$, the limit at infinity is the ratio of leading coefficients; if $\deg p < \deg q$ it is $0$; if $\deg p > \deg q$ there is no finite limit (the function diverges, possibly along a slant asymptote). +For a ratio of nonzero polynomials, compare their degrees. Equal degrees give a finite limit equal to the ratio of leading coefficients; a smaller numerator degree gives zero. A larger numerator degree gives no finite horizontal limit. Polynomial division can then describe the remaining large-input behaviour. ## Derivation -1. Divide every term by $x^2$, the highest power present. -2. Any constant divided by a growing $x^2$ vanishes in the limit. -3. Substitute the vanished terms — only the leading coefficients survive. +1. Divide each term in numerator and denominator by x². This rearrangement is used away from zero, which is sufficient for a limit at infinity. +2. With a and b fixed, 1/x² and b/x² both approach zero as x grows. +3. The denominator approaches 1 rather than zero, so the quotient approaches a/1. ## Real world -### Terminal velocity -Drag models like $v(t) \to v_{\text{terminal}}$ as $t\to\infty$ are horizontal-asymptote limits. +### Average with fixed overhead -### Michaelis–Menten enzyme kinetics -Reaction rate approaches a maximum $V_{\max}$ as substrate concentration grows — a rational-function asymptote. +In a model with total resource use F + cq for q items, average use is c + F/q. As q grows it approaches c. This is another rational-function limit, with its own formula and assumptions. -### Long-run cost averages -Average cost per unit as production scales up settles toward the marginal cost, the horizontal asymptote of a cost-ratio curve. +### Estimating large-input behaviour -### Signal-to-noise saturation -Many detector responses saturate toward a fixed level as input intensity grows without bound. +A limiting value helps approximate a formula at large inputs. An explicit error expression, when available, lets you check whether a particular input is large enough for the accuracy needed. From d89c6828b309cd9a3eb8bdf86e13268898a9eb42 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:36:02 +0300 Subject: [PATCH 073/124] content: rewrite logistic-growth for first-time learners in both languages --- .../lessons/calculus/logistic-growth/ar.md | 63 +++++++++--------- .../lessons/calculus/logistic-growth/en.md | 65 +++++++++---------- 2 files changed, 58 insertions(+), 70 deletions(-) diff --git a/content/lessons/calculus/logistic-growth/ar.md b/content/lessons/calculus/logistic-growth/ar.md index 143c619b..e84e6850 100644 --- a/content/lessons/calculus/logistic-growth/ar.md +++ b/content/lessons/calculus/logistic-growth/ar.md @@ -1,68 +1,63 @@ --- title: النمو اللوجستي والطاقة الاستيعابية -summary: >- - تطبيق جديد ينتشر بسرعة ثم يتباطأ كلما اقترب من كل الناس. منحنى على شكل S. +summary: 'استكشف نموًا متناسبًا يتباطأ قرب سعة مستقرة، واعرف متى يظهر منحنى على شكل S.' parameters: - K: الطاقة الاستيعابية K - y0: المبلغ الابتدائي y₀ - k: معدل النمو k - x: الزمن t + K: 'K — السعة في النموذج' + y0: 'y₀ — الكمية الابتدائية' + k: 'k — ثابت معدل النمو الموجب' + x: 't — الزمن المختار' variables: - - الطاقة الاستيعابية، أي السقف الذي يقترب منه المنحنى - - المبلغ الابتدائي عند $t=0$ - - معدل النمو الجوهري + - 'K: كمية الاتزان المستقر في هذا النموذج' + - 'y₀: الكمية الموجبة عند الزمن صفر' + - 'k: معدل النمو النسبي الذاتي، بوحدة مقلوب الزمن' --- ## Try it -1. اسحب النقطة عبر الجزء المبكر من المنحنى، حيث تكون y صغيرة. يزداد ميل المماس بشدة، وكأنه نمو أسي بسيط تقريبًا. -2. واصل السحب نحو «الطاقة الاستيعابية K». يتسطح المماس رغم أن y عند أقصاها. -3. قارن أكثر نقطة انحدارًا في المنحنى بـK. تقع تلك النقطة تقريبًا في منتصف الطريق إليها بالضبط، عند K/2. +1. اضبط K = 8 وy₀ = 0.5 وk = 0.6. حرّك t من 0 إلى نحو 4.5. تزداد الكمية ويشتد ميل المماس مع اقتراب y من K/2 = 4. +2. تابع إلى t = 8 ثم 15. تقترب الكمية من 8 بينما يتناقص معدل زيادتها. +3. اضبط K = 2 وy₀ = 3. تتناقص الكمية الآن نحو K من الأعلى. البدء فوق السعة لا يعطي منحنى S الصاعد. ## Real-life examples -1. **مجتمع في مرحلة مبكرة، ما زال في الطور الأسي.** مع K = 8، y0 = 0.5، k = 0.6، وx = 2، يبدو النمو شبه حر تقريبًا. -2. **منتصف النمو، قرب نقطة الانعطاف.** بنفس K وy0 وk لكن مع x = 8، يمر المجتمع بأسرع مراحل نموه، قرب K/2. -3. **منتج بطيء التبني يقترب من تشبع السوق.** مع K = 5، y0 = 2، k = 0.3، وx = 18، يكون التبني قد ملأ السوق تقريبًا بالكامل. +1. **بداية النمو.** مع K = 8 وy₀ = 0.5 وk = 0.6 وt = 2، تكون y ≈ 1.450. العامل 1 − y/K نحو 0.819، وقد بدأ بالفعل بتقليل معدل النمو النسبي. +2. **بعد أسرع نمو.** بالمعاملات نفسها عند t = 8، تكون y ≈ 7.121. حدث أسرع نمو قرب t = 4.513 عندما كانت y = 4؛ وهذا الإعداد يقع في مرحلة التباطؤ قرب السعة. +3. **قرب السعة.** مع K = 5 وy₀ = 2 وk = 0.3 وt = 18، تكون y ≈ 4.966، أي نحو 99.3% من K. ## Test yourself -1. اجعل y تساوي K/2 لتصل إلى نقطة الانعطاف، حيث يكون النمو أسرع ما يكون. -2. ادفع المجتمع فوق 95% من طاقته الاستيعابية K. -3. أبقِ المجتمع دون 10% من K حتى بعد أن تبلغ x القيمة 5 أو أكثر. +1. اجعل |y − K/2| أقل من 0.1. +2. اجعل y أكبر من 0.95K. للاقتراب من الأسفل، ابدأ بقيمة y₀ أصغر من K. +3. أبقِ y أقل من 0.1K عند زمن مختار t لا يقل عن 5. ## Intuition -تخيل تطبيقًا جديدًا لن يستخدمه أكثر من 50,000 شخص أبدًا، وهذا السقف هو «الطاقة الاستيعابية K». اسحب النقطة عبر الجزء المبكر من المنحنى، حيث عدد المستخدمين ما زال صغيرًا مقارنة بذلك السقف. يزداد ميل المماس بشدة، وكأن التطبيق يضاعف مستخدميه مرة بعد مرة دون أي شيء يبطئه. +يستخدم النمو الأسي معدلًا يتناسب مع الكمية الحالية. يضرب النموذج اللوجستي هذا المعدل في النسبة المتبقية 1 − y/K. عندما تكون y صغيرة مقارنة بـK، يقترب العامل من 1. عند نصف السعة يساوي 0.5، وقرب السعة يقترب من الصفر. -واصل السحب نحو «الطاقة الاستيعابية K». يتسطح المماس رغم أن عدد المستخدمين عند أقصاه، لأن التطبيق بدأ ينفد من الأشخاص الجدد الذين يمكنه الوصول إليهم. فكل من تبقى ليسجّل يمثّل شريحة متقلصة من السكان، ويكبح النمو نفسه رغم أن لا شيء خارجيًا تغيّر. +يتنافس أثران: الكمية الأكبر قد تولّد نموًا أكبر، لكن السعة المتبقية أقل. للكمية الواقعة بين صفر وK، يكون النمو أسرع عند K/2. إذا بدأنا دون نقطة المنتصف، يشتد الميل أولًا ثم يتسطح. وإذا بدأنا فوقها، يتباطأ النمو منذ البداية. تمثل K افتراضًا في النموذج، وليست سقفًا عامًا مقيسًا. ## Formal -المعادلة التفاضلية الحاكمة هي $\dot y = ky(1-y/K)$. نمو يتناسب مع $y$ كالنمو الأسي، لكنه مخمَّد بعامل يتلاشى مع $y \to K$. +مع ثابتين k > 0 وK > 0، وقيمة y₀ > 0، يكون النموذج $dy/dt=ky(1-y/K)$ مع $y(0)=y_0$. حله هو $y(t)=K/[1+((K-y_0)/y_0)e^{-kt}]$ عندما تكون t ≥ 0. يمثل الإحداثي x في الرسم الزمن t. -الحل هو الدالة اللوجستية $y(t) = K/\big(1+\big(\tfrac{K-y_0}{y_0}\big)e^{-kt}\big)$، منحنى على شكل S متماثل له نقطة انعطاف عند $y=K/2$. +عندما يكون $0K$، تتناقص نحوها. وإذا كان $y_0=K$ تبقى ثابتة. يبلغ تعبير معدل النمو أقصاه $kK/4$ عند $y=K/2$، لكن مسارًا يبدأ فوق K/2 لا يمر بهذه الكمية عند زمن موجب. ## Advanced -نقطة الانعطاف، حيث يبلغ معدل النمو نفسه أقصاه، تقع بالضبط عند $y=K/2$. اشتقاق $\dot y = ky(1-y/K)$ بالنسبة لـ$y$ وجعله صفرًا يعطي $y=K/2$، بصرف النظر عن $k$ أو $y_0$. فأكثر جزء انحدارًا في أي منحنى لوجستي، أيًّا كانت معاملاته، يقع دائمًا عند منتصف الطريق إلى الطاقة الاستيعابية. +عندما تكون 0 < y₀ < K، يكون زمن الانعطاف ln((K − y₀)/y₀)/k. لا يكون موجبًا إلا إذا كانت y₀ < K/2. الحل الصفري حالة اتزان أيضًا، رغم أن المنزلق يستبعده. قد تتغير السعة أو تتأخر الاستجابة في الواقع؛ ولا تحسب المعادلة اللوجستية الثابتة هذه الآثار. ## Derivation -1. افصل المتغيرات في المعادلة التفاضلية اللوجستية. -2. تقسّم الكسور الجزئية الطرف الأيسر إلى تكاملين أوليين. -3. كامل، ثم ارفع للأس، وحدد الثابت باستخدام $y(0)=y_0$. +1. بعيدًا عن قيمتي الاتزان صفر وK، نفصل المتغيرات بالقسمة على y(1 − y/K). +2. نجزئ الكسر إلى حدين ونكاملهما، فنحصل على ln|y| − ln|1 − y/K| = kt + C. +3. نعيد الترتيب ونستخدم الكمية الابتدائية لتحديد الثابت. تعطي الصيغة الناتجة الحل الثابت عندما تكون y₀ = K أيضًا، ونتحقق منه مباشرة في المعادلة. ## Real world -### إيكولوجيا السكان -تنمو أعداد الحيوانات أسيًا ما دامت الموارد وفيرة، ثم تستقر بالقرب من الطاقة الاستيعابية للبيئة. +### نموذج نمو بسعة محدودة -### الأوبئة -ينحني منحنى S لإجمالي الإصابات في نموذج وبائي بسيط ليتسطح مع نفاد مجموعة الأشخاص المعرضين للعدوى. +عندما يتناسب نمو كمية مع مقدارها الحالي ومع نسبة السعة المتبقية معًا، تصف المعادلة اللوجستية هذا الافتراض. نقارن المشاهدات بالنموذج قبل استخدامه لتوقع الاستقرار. -### تبنّي المنتجات -غالبًا ما يتبع تبنّي التقنية الجديدة منحنى S لوجستيًا، يبدأ ببداية بطيئة، ثم نمو سريع في المنتصف، ثم تشبع في السوق. +### التمييز بين الكمية والمعدل -### نماذج نمو الأورام -يُنمذج نمو بعض الأورام لوجستيًا، حيث يمثل $K$ الحجم الأقصى المحدود بالموارد أو المساحة. +قد تكون الكمية كبيرة ومعدل نموها صغيرًا قرب السعة. يساعد رسم الكمية وفحص مماسها على التمييز بين المقدار الموجود وسرعة تغيره. diff --git a/content/lessons/calculus/logistic-growth/en.md b/content/lessons/calculus/logistic-growth/en.md index 8fc45ca5..6fabef63 100644 --- a/content/lessons/calculus/logistic-growth/en.md +++ b/content/lessons/calculus/logistic-growth/en.md @@ -1,70 +1,63 @@ --- title: Logistic growth and carrying capacity -summary: >- - A new app that spreads quickly at first cannot keep doubling its users - forever — this idea predicts the S-shaped curve of growth that slows as it - nears the size of the whole market. +summary: 'Explore proportional growth that slows near a stable capacity, and check when an S-shaped curve actually occurs.' parameters: - K: carrying capacity K - y0: starting amount y₀ - k: growth rate k - x: time t + K: 'K — model capacity' + y0: 'y₀ — initial amount' + k: 'k — positive growth-rate constant' + x: 't — selected time' variables: - - carrying capacity — the ceiling the curve approaches - - starting amount at $t=0$ - - intrinsic growth rate + - 'K: stable equilibrium amount in this model' + - 'y₀: positive amount at time zero' + - 'k: intrinsic proportional growth rate, in inverse time' --- ## Try it -1. Drag the point through the early part of the curve, where y is small. The tangent grows steeply, almost like plain exponential growth. -2. Keep dragging toward «carrying capacity K». The tangent flattens out even though y is at its largest. -3. Compare the steepest point of the curve to K: it sits almost exactly halfway up, at K/2. +1. Set K = 8, y₀ = 0.5 and k = 0.6. Move t from 0 toward 4.5. The amount increases and the tangent becomes steeper as y approaches K/2 = 4. +2. Continue to t = 8, then 15. The amount approaches 8 while its rate of increase decreases. +3. Set K = 2 and y₀ = 3. The model now decreases toward K from above. Starting above capacity does not produce the rising S-shaped curve. ## Real-life examples -1. **An early-stage population, still in the exponential phase.** With K = 8, y0 = 0.5, k = 0.6 and x = 2, growth still looks almost unchecked. -2. **Mid-growth, near the inflection point.** With the same K, y0 and k but x = 8, the population is climbing through its fastest-growing stretch, near K/2. -3. **A slow-adoption product nearing market saturation.** With K = 5, y0 = 2, k = 0.3 and x = 18, adoption has almost filled the whole market. +1. **Early growth.** With K = 8, y₀ = 0.5, k = 0.6 and t = 2, y ≈ 1.450. The factor 1 − y/K is about 0.819, already reducing the proportional growth rate. +2. **After the fastest growth.** With the same parameters at t = 8, y ≈ 7.121. The fastest growth occurred near t = 4.513, when y = 4; this preset is already slowing near capacity. +3. **Near capacity.** With K = 5, y₀ = 2, k = 0.3 and t = 18, y ≈ 4.966, about 99.3% of K. ## Test yourself -1. Reach the inflection point, where growth is fastest: make y equal K/2. -2. Push the population above 95% of its carrying capacity K. -3. Keep the population below 10% of K even after x has reached 5 or more. +1. Make |y − K/2| less than 0.1. +2. Make y greater than 0.95K. For an approach from below, start with y₀ less than K. +3. Keep y less than 0.1K at a selected time t of at least 5. ## Intuition -Picture a new app with 50,000 people who might ever use it — call that ceiling «carrying capacity K». Drag the point through the early part of the curve, where the number of users is still small compared to that ceiling: the tangent grows steeply, almost like the app is doubling its users again and again with nothing slowing it down. +Exponential growth uses a rate proportional to the current amount. The logistic model multiplies that rate by the remaining fraction 1 − y/K. When y is small compared with K, this factor is close to 1. At half capacity it is 0.5, and near capacity it is close to zero. -Keep dragging toward «carrying capacity K»: the tangent flattens out even though the user count is at its largest, because the app is running out of new people to reach — everyone left to sign up is a shrinking slice of the population, and growth throttles itself even though nothing external changed. +Two effects compete: a larger amount can generate more growth, but less capacity remains. For an amount between zero and K, growth is fastest at K/2. If the starting amount is below that halfway point, the forward-time curve first steepens and then flattens. If it starts above halfway, it slows from the start. K is an assumed model parameter, not a measured universal ceiling. ## Formal -The governing ODE is $\dot y = ky(1-y/K)$: growth proportional to $y$ (like exponential growth) but damped by a factor that vanishes as $y \to K$. +With constants k > 0, K > 0 and y₀ > 0, the model is $dy/dt=ky(1-y/K)$, with $y(0)=y_0$. Its solution is $y(t)=K/[1+((K-y_0)/y_0)e^{-kt}]$ for t ≥ 0. The graph's x coordinate represents time t. -The solution is the logistic function $y(t) = K/\big(1+\big(\tfrac{K-y_0}{y_0}\big)e^{-kt}\big)$, symmetric S-shape with inflection at $y=K/2$. +For $0K$, it decreases toward K. If $y_0=K$, it stays constant. The growth-rate expression has maximum $kK/4$ at $y=K/2$, but a trajectory starting above K/2 does not pass through that amount at positive time. ## Advanced -The inflection point, where growth rate itself is maximal, occurs exactly at $y=K/2$: differentiating $\dot y = ky(1-y/K)$ with respect to $y$ and setting it to zero gives $y=K/2$, independent of $k$ or $y_0$ — the steepest part of every logistic curve, whatever its parameters, is always at the halfway point to capacity. +For 0 < y₀ < K, the inflection time is ln((K − y₀)/y₀)/k. It is positive only when y₀ < K/2. The zero solution is also an equilibrium, although the slider excludes it. Real processes may have changing capacities or delayed responses; the fixed logistic equation does not account for those effects. ## Derivation -1. Separate variables in the logistic ODE. -2. Partial fractions split the left side into two elementary integrals. -3. Integrate, exponentiate, and fix the constant using $y(0)=y_0$. +1. Away from the equilibrium values zero and K, separate the variables by dividing by y(1 − y/K). +2. Split the fraction into two terms and integrate to obtain ln|y| − ln|1 − y/K| = kt + C. +3. Rearrange and use the initial amount to determine the constant. The resulting formula also gives the constant solution when y₀ = K, checked directly in the equation. ## Real world -### Population ecology -Animal populations grow exponentially while resources are abundant, then level off near the environment's carrying capacity. +### A limited-capacity growth model -### Epidemics -The S-curve of total infections in a simple epidemic model flattens as the pool of susceptible people is used up. +When a quantity grows in proportion both to its current size and to the fraction of capacity remaining, the logistic equation describes that assumption. Compare observations with the model before using it to predict a plateau. -### Product adoption -New technology adoption often follows a logistic S-curve: slow start, rapid middle growth, saturating market. +### Separating amount and rate -### Tumor growth models -Some tumor growth is modeled logistically, with $K$ representing a resource- or space-limited maximum size. +A large amount can coexist with a small growth rate near capacity. Plotting the amount and examining its tangent helps distinguish how much is present from how fast it changes. From 62ded01bade53f249d6657772f5d50e561924adc Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:36:02 +0300 Subject: [PATCH 074/124] content: rewrite one-sided-and-infinite-limits for first-time learners in both languages --- .../one-sided-and-infinite-limits/ar.md | 57 ++++++++---------- .../one-sided-and-infinite-limits/en.md | 59 ++++++++----------- 2 files changed, 52 insertions(+), 64 deletions(-) diff --git a/content/lessons/calculus/one-sided-and-infinite-limits/ar.md b/content/lessons/calculus/one-sided-and-infinite-limits/ar.md index 830d485e..e6ae4f83 100644 --- a/content/lessons/calculus/one-sided-and-infinite-limits/ar.md +++ b/content/lessons/calculus/one-sided-and-infinite-limits/ar.md @@ -1,65 +1,60 @@ --- title: النهايات الجانبية واللانهائية -summary: >- - وزّع تكلفة ثابتة على عدد أقل فأقل من الناس، فيكبر نصيب كل واحد بلا حد. +summary: 'قارن جهتي الدالة 1/x قرب الصفر، حيث تكبر القيم بلا حد بإشارتين متعاكستين.' parameters: - d: المسافة من x = 0 + d: 'd — المسافة الموجبة عن الصفر' variables: - - مسافة النقطتين المقتربتين من $x=0$ - - النهاية عند الاقتراب من اليسار - - النهاية عند الاقتراب من اليمين + - 'd: مدخلا النقطتين هما −d وd' + - 'النهاية اليسرى: السلوك عند اقتراب x السالبة من الصفر' + - 'النهاية اليمنى: السلوك عند اقتراب x الموجبة من الصفر' --- ## Try it -1. قلّل «المسافة من x = 0» نحو الصفر. راقب النقطتين تقتربان من الفجوة من جهتين متعاكستين. -2. اقرأ جدول القيم. من اليمين تتزايد الأرقام إلى قيم ضخمة، ومن اليسار تهبط. -3. لاحظ أنهما لا تتجهان أبدًا نحو العدد نفسه، فالنهاية ثنائية الجانب غير موجودة. +1. اضبط d = 1. المدخلان المحددان هما −1 و1، وناتجاهما −1 و1. +2. قلّل d إلى 0.1. تصبح قيمتا الدالة عند النقطتين −10 و10. كلما صغرت d الموجبة، كبرت القيمتان بالقيمة المطلقة. +3. اضبط d = 0.02. تصبح القيمتان −50 و50، خارج المدى الرأسي للرسم. يأخذ الجدول العددي عينات من المدخلات الموجبة d وd/10 وd/100؛ ولا يعرض الجهتين معًا. ## Real-life examples -1. **ما زالت بعيدة عن المقارب.** عند d = 1، القراءتان مجرد رقمين متواضعين، بعيدتان عن اللانهاية حتى الآن. -2. **قريبة جدًا: قيم بلغت المئات.** عند d = 0.1، بلغت القراءتان 10±. -3. **بأقصى ما يسمح به المنزلق.** عند d = 0.02، تبلغ القراءتان نحو 50±، وهذا أقرب ما يستطيعه هذا المنزلق. +1. **على بعد وحدة من الصفر.** عند d = 1 تكون قيمتا النقطتين ±1. يحسب جدول الجهة الموجبة أيضًا عند 0.1 و0.01، فيعطي 10 و100. +2. **أقرب عشر مرات.** عند d = 0.1 تكون قيمتا النقطتين ±10. وتعطي العينتان الموجبتان الإضافيتان 100 و1000. +3. **عند أدنى قيمة للمنزلق.** عند d = 0.02 تكون قيمتا النقطتين ±50. وتعطي العينتان عند 0.002 و0.0002 العددين 500 و5000. كل هذه القيم منتهية. ## Test yourself -1. ادفع القيمة اليمنى فوق 40. -2. اجعل القيمة اليمنى تساوي نحو 10. -3. أنزل القيمة اليمنى دون 1. +1. اجعل قيمة النقطة اليمنى 1/d أكبر من 40. +2. اجعل 1/d تختلف عن 10 بما لا يتجاوز 0.3. +3. اجعل 1/d أقل من 1. ## Intuition -تخيل توزيع إيجار قاعة ثابت قدره 100 دولار على عدد الضيوف الحاضرين مهما كان. مع 100 ضيف يدفع كل واحد دولارًا واحدًا، ومع 10 ضيوف يدفع كل واحد 10 دولارات، وكلما اقترب عدد الضيوف من 1 ثم من كسر من شخص، ينفجر نصيب كل واحد نحو مبلغ بلا حدود. على الشاشة، قلّل «المسافة من x = 0» نحو الصفر وراقب النقطتين تقتربان من تلك النقطة المنهارة نفسها من جهتين متعاكستين. من اليمين تتزايد القراءة بلا حدود نحو رقم موجب ضخم، ومن اليسار تهبط نحو رقم سالب ضخم. +مقلوب 1 هو 1، ومقلوب 0.1 هو 10، ومقلوب 0.01 هو 100. كلما قسمنا المدخل الموجب على عشرة، تضاعف مقلوبه عشر مرات. لا توجد قيمة عظمى؛ فاختيار مدخل موجب صغير بما يكفي يتجاوز أي حد موجب نقترحه. -إنهما لا تتقاربان نحو العدد نفسه، بل تتسابقان في اتجاهين متعاكسين. وكلما اختلف الجانبان على هذا النحو، يقول علماء الرياضيات إن النهاية ببساطة غير موجودة، رغم أن لكل جانب على حدة اتجاهًا هاربًا واضحًا خاصًا به. +تختلف المدخلات السالبة في الإشارة. عند −0.1 تكون القيمة −10، وعند −0.01 تكون −100. لذلك تنمو القيم في الجهة اليمنى موجبًا بلا حد، وتنخفض في اليسرى سالبًا بلا حد. لا تقترب الجهتان من قيمة مشتركة. تصف اللانهاية هنا سلوكًا غير محدود، وليست عددًا يبلغه المنزلق. ## Formal -$\lim_{x\to 0^+} \frac1x = +\infty$ و$\lim_{x\to 0^-}\frac1x = -\infty$. وبما أن هاتين النهايتين الجانبيتين مختلفتان، فإن $\lim_{x\to0}\frac1x$ غير موجودة، حتى وإن كانت نهاية لا نهائية. +العبارتان الجانبيتان هما $\lim_{x\to0^+}1/x=+\infty$ و$\lim_{x\to0^-}1/x=-\infty$. لاختلافهما، لا توجد $\lim_{x\to0}1/x$ كنهاية منتهية ولا كنهاية لا نهائية واحدة ذات إشارة محددة. والدالة غير معرّفة عند الصفر. -المقارب الرأسي عند $x=c$ يعني أن إحدى النهايتين الجانبيتين هناك على الأقل تساوي $+\infty$ أو $-\infty$. +للتعبير بدقة عن التباعد الموجب، نختار لكل $M>0$ قيمة $\delta=1/M$. عندها يستلزم $0M$. وبالمثل، يستلزم $-\delta M$". أي أن الدالة تصبح في النهاية أكبر من أي حد، لا أنها تتقارب نحو قيمة تُسمى اللانهاية. +قارن بالدالة 1/x²: تتجه الجهتان إلى موجب ما لا نهاية، فتوجد نهاية موجبة لا نهائية من الجهتين، لكن لا توجد نهاية حقيقية منتهية. لذلك لا يشترط المقارب الرأسي تغير الإشارة. لا يستطيع رسم محدود إثبات عدم المحدودية؛ تتعامل حجة المتباينة مع حدود كبيرة كيفما اخترناها. ## Derivation -1. مع اقتراب $x$ من $0$ من اليمين، تتزايد $1/x$ بلا حدود. -2. هذا هو بالضبط تعريف النهاية اللانهائية بأسلوب $\varepsilon$–$\delta$. -3. من اليسار، يعطي المنطق نفسه $1/x \to -\infty$، أي بإشارة معاكسة. +1. عندما تكون x موجبة وأصغر من δ، تعكس عملية أخذ المقلوب المتباينة، فتصبح 1/x أكبر من 1/δ. +2. نضع δ = 1/M لنتجاوز أي حد موجب مطلوب M كلما اقترب المدخل الموجب بما يكفي من الصفر. +3. نستبدل المدخل بقيمة سالبة لها المقدار نفسه. يتغير مقلوبه في الإشارة، فتثبت النهاية السالبة اللانهائية من اليسار. ## Real world -### المجال الكهربائي قرب شحنة نقطية -تتناسب شدة المجال مع $1/r^2$ وتتباعد كلما اقتربت من الشحنة، وهذا مقارب رأسي فيزيائي. +### مساحة ثابتة وعرض متغير -### ضبابية بؤرة العدسة -تتزايد صيغ التكبير في البصريات بلا حدود كلما اقترب جسم من المسافة البؤرية. +لمستطيل مساحته الثابتة 1، يساوي الطول 1/العرض. عندما يقترب العرض الموجب من الصفر، يزداد الطول المطلوب في النموذج بلا حد. لا معنى فيزيائيًا لعرض سالب، لذلك يستخدم هذا التطبيق النهاية اليمنى فقط. -### توزيع الموارد -تكلفة الوحدة من تكلفة ثابتة موزعة على $x$ وحدة، أي $C/x$، تتباعد مع $x\to 0$. فتوزيع تكلفة ثابتة على شيء يكاد يكون معدومًا مكلف بلا حدود. +### الحساسية قرب مقام صفري -### أنظمة التحكم -أقطاب دالة النقل هي بالضبط النقاط التي يكون عندها ناتجها من هذا النوع من النهايات اللانهائية المنقلبة الإشارة، وهي علامة على عدم الاستقرار. +قد تحول صيغة ذات مقام صغير تغيرًا صغيرًا في المدخل إلى تغير كبير في الناتج. نراجع مجالها وافتراضات نموذجها قبل تفسير نتيجة عددية كبيرة جدًا. diff --git a/content/lessons/calculus/one-sided-and-infinite-limits/en.md b/content/lessons/calculus/one-sided-and-infinite-limits/en.md index 1e183a4f..79f93bfd 100644 --- a/content/lessons/calculus/one-sided-and-infinite-limits/en.md +++ b/content/lessons/calculus/one-sided-and-infinite-limits/en.md @@ -1,67 +1,60 @@ --- title: One-sided and infinite limits -summary: >- - Splitting a fixed cost over fewer and fewer people makes each person's - share blow up without limit — a one-sided infinite limit is exactly that - runaway behaviour, matched from the other side. +summary: 'Compare the two sides of 1/x near zero, where values grow without bound with opposite signs.' parameters: - d: distance from x = 0 + d: 'd — positive distance from zero' variables: - - distance of the two approaching points from $x=0$ - - limit approaching from the left - - limit approaching from the right + - 'd: marked inputs are −d and d' + - 'left-hand limit: behaviour as negative x approaches zero' + - 'right-hand limit: behaviour as positive x approaches zero' --- ## Try it -1. Shrink «distance from x = 0» toward 0. Watch the two dots close in on the gap from opposite sides. -2. Read the table of values: from the right, the numbers grow huge; from the left, they plunge. -3. Notice they never head to the same number — the two-sided limit does not exist. +1. Set d = 1. The marked inputs are −1 and 1, giving outputs −1 and 1. +2. Reduce d to 0.1. At the marked inputs, the outputs are −10 and 10. Smaller positive d makes their magnitudes larger. +3. Set d = 0.02. The marked outputs are −50 and 50, outside the plot's vertical window. The numerical table samples the positive inputs d, d/10 and d/100; it does not list both sides. ## Real-life examples -1. **Still far from the asymptote.** At d = 1, the readouts are only modest numbers — nowhere near infinite yet. -2. **Very close: values already in the hundreds.** At d = 0.1, both readouts have grown to ±10. -3. **As close as the slider allows.** At d = 0.02, the readouts reach roughly ±50 — the closest this slider can get. +1. **Unit distance from zero.** At d = 1, the marked values are ±1. The positive-side table also evaluates 0.1 and 0.01, giving 10 and 100. +2. **Ten times closer.** At d = 0.1, the marked values are ±10. The additional positive samples give 100 and 1000. +3. **At the slider minimum.** At d = 0.02, the marked values are ±50. The additional samples at 0.002 and 0.0002 give 500 and 5000. Every one of these is finite. ## Test yourself -1. Push the right-hand value above 40. -2. Make the right-hand value equal about 10. -3. Bring the right-hand value down below 1. +1. Make the right-hand marked value 1/d greater than 40. +2. Make 1/d within 0.3 of 10. +3. Make 1/d less than 1. ## Intuition -Imagine splitting a fixed 100-dollar venue rental among however many guests show up. With 100 guests, each pays 1 dollar; with 10 guests, each pays 10; and as the guest count drops toward 1, then toward a fraction of a person, each share explodes toward an unlimited amount. On screen, shrink «distance from x = 0» toward 0 and watch both dots close in on that same collapsing point from opposite sides: from the right, the readout grows without bound toward a huge positive number, while from the left, it plunges toward a huge negative one. +The reciprocal of 1 is 1, the reciprocal of 0.1 is 10, and the reciprocal of 0.01 is 100. Each tenfold reduction of a positive input multiplies its reciprocal by ten. There is no largest value: choosing a sufficiently small positive input can exceed any proposed positive bound. -They are not converging on the same number — they are racing off in opposite directions. Whenever the two sides disagree like this, mathematicians say the limit simply does not exist, even though each side individually has a clear runaway trend of its own. +Negative inputs behave differently in sign. At −0.1 the value is −10, and at −0.01 it is −100. Thus the right side grows positively without bound and the left side decreases negatively without bound. They do not approach one common value. Infinity here describes unbounded behaviour, not a number reached by the slider. ## Formal -$\lim_{x\to 0^+} \frac1x = +\infty$ and $\lim_{x\to 0^-}\frac1x = -\infty$; since these one-sided limits disagree, $\lim_{x\to0}\frac1x$ does not exist (not even as an infinite limit). +The one-sided statements are $\lim_{x\to0^+}1/x=+\infty$ and $\lim_{x\to0^-}1/x=-\infty$. Because they disagree, $\lim_{x\to0}1/x$ exists neither as a finite limit nor as a single signed infinite limit. The function is undefined at zero. -A vertical asymptote at $x=c$ means at least one of the one-sided limits there is $+\infty$ or $-\infty$. +To express positive divergence precisely, for every $M>0$ choose $\delta=1/M$. Then $0M$. Similarly, $-\delta M$" — the function is eventually larger than any bound, not that it converges to some value called infinity. +Compare 1/x²: both sides tend to positive infinity, so it does have a two-sided positive infinite limit, though no finite real limit. A vertical asymptote therefore does not require a sign change. A finite graph cannot prove unboundedness; the inequality argument handles arbitrarily large bounds. ## Derivation -1. As $x$ shrinks toward $0$ from the right, $1/x$ grows without bound. -2. This is precisely the $\varepsilon$–$\delta$-style definition of an infinite limit. -3. From the left, the same argument gives $1/x \to -\infty$ — the opposite sign. +1. For positive x smaller than δ, taking reciprocals reverses the inequality, giving 1/x greater than 1/δ. +2. Set δ = 1/M to exceed any requested positive output bound M whenever the positive input is sufficiently close to zero. +3. Replace the input by a negative value of the same magnitude. The reciprocal changes sign, establishing the negative infinite limit from the left. ## Real world -### Electric field near a point charge -Field strength scales like $1/r^2$ and diverges as you approach the charge — a physical vertical asymptote. +### Fixed area, variable width -### Lens focal blur -Magnification formulas in optics blow up as an object approaches the focal distance. +For a rectangle of fixed area 1, length equals 1/width. As a positive width approaches zero, the model's required length grows without bound. Negative widths have no physical meaning, so this application uses only the right-hand limit. -### Resource allocation -Cost-per-unit of a fixed cost spread over $x$ units, $C/x$, diverges as $x\to 0$ — spreading a fixed cost over almost nothing is unboundedly expensive. +### Sensitivity near a zero denominator -### Control systems -A transfer function's poles are exactly the points where its output has this kind of infinite, sign-flipping limit, marking instability. +A formula containing a small denominator can turn a small input change into a large output change. Check its domain and model assumptions before interpreting a very large numerical result. From bc4b81d8130750550163ea37f4b04461ecca11ff Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:36:02 +0300 Subject: [PATCH 075/124] content: rewrite partial-derivatives-saddle for first-time learners in both languages --- .../calculus/partial-derivatives-saddle/ar.md | 59 ++++++++---------- .../calculus/partial-derivatives-saddle/en.md | 61 ++++++++----------- 2 files changed, 54 insertions(+), 66 deletions(-) diff --git a/content/lessons/calculus/partial-derivatives-saddle/ar.md b/content/lessons/calculus/partial-derivatives-saddle/ar.md index cdeb1618..5c0b7b31 100644 --- a/content/lessons/calculus/partial-derivatives-saddle/ar.md +++ b/content/lessons/calculus/partial-derivatives-saddle/ar.md @@ -1,66 +1,61 @@ --- title: المشتقات الجزئية ونقاط السرج -summary: >- - ممر جبلي: أخفض نقطة على طول السلسلة وأعلى نقطة عبرها. هذه نقطة السرج. +summary: 'اعرف لماذا قد ينعدم التدرج عند نقطة ليست قيمة عظمى ولا صغرى.' parameters: - x0: النقطة x - y0: النقطة y + x0: 'x₀ — الإحداثي x للنقطة المختارة' + y0: 'y₀ — الإحداثي y للنقطة المختارة' variables: - - الميل عند السير في اتجاه $x$، وهنا يساوي $2x$، محدّب لأعلى دائمًا - - الميل عند السير في اتجاه $y$، وهنا يساوي $-2y$، محدّب لأسفل دائمًا - - التدرّج، يساوي صفرًا بالضبط عند نقطة السرج + - '∂f/∂x: الميل 2x مع تثبيت y' + - '∂f/∂y: الميل −2y مع تثبيت x' + - '∇f: المتجه (2x, −2y)' --- ## Try it -1. حرّك النقطة على طول محور x مع إبقاء «النقطة y» عند 0. ينحني المستوى المماس لأعلى كجدار وادٍ. -2. حرّكها الآن على طول محور y بدلًا من ذلك مع إبقاء «النقطة x» عند 0. ينحني السطح نفسه لأسفل كقمة تل. -3. أعد النقطة إلى نقطة الأصل. يصبح المستوى المماس مسطحًا، لكن هذه النقطة المسطحة ليست قمة ولا واديًا، بل سرج. +1. أبقِ y₀ = 0 وحرّك x₀ من −1 إلى 0 ثم 1. ارتفاعات السطح 1 و0 و1؛ ينحني هذا المقطع إلى أعلى. +2. أبقِ x₀ = 0 وحرّك y₀ عبر القيم نفسها. الارتفاعات −1 و0 و−1؛ ينحني هذا المقطع إلى أسفل. +3. اضبط x₀ = y₀ = 0. يكون المستوى المماس أفقيًا وتنعدم المشتقتان الجزئيتان، لكن نقاطًا قريبة من السطح تقع فوقه وتحته. ## Real-life examples -1. **الجلوس بالضبط عند نقطة السرج.** عند (x, y) = (0, 0)، المستوى المماس مسطح ويتلاشى التدرج، ومع ذلك فهذه النقطة ليست قمة تل ولا قاع وادٍ. -2. **السير مباشرة في اتجاه الصعود.** عند (x, y) = (1.5, 0)، ينحني السطح لأعلى، كبداية صعود جدار وادٍ. -3. **السير مباشرة في اتجاه الهبوط.** عند (x, y) = (0, 1.5)، ينحني السطح نفسه لأسفل، كبداية نزول من قمة تل. +1. **عند السرج.** عند (0, 0)، يكون الارتفاع والتدرج صفرًا. المستوى المماس هو z = 0. +2. **على المقطع الصاعد.** عند (1.5, 0)، يكون الارتفاع 2.25 والتدرج (3, 0). +3. **على المقطع الهابط.** عند (0, 1.5)، يكون الارتفاع −2.25 والتدرج (0, −3). يشير اتجاه أسرع زيادة محلية نحو تناقص y. ## Test yourself -1. جد نقطة بعيدة عن نقطة الأصل يكون عندها الارتفاع 0 بالضبط، أي على قمة السرج القطرية. -2. اصعد إلى ارتفاع فوق 3 بالتحرك على طول محور x. -3. اهبط إلى ارتفاع دون 3- بالتحرك على طول محور y. +1. اجعل |x₀² − y₀²| أقل من 0.05، مع كون إحدى القيمتين |x₀| أو |y₀| أكبر من 0.3 على الأقل. +2. أوجد نقطة ارتفاعها أكبر من 3. يمكنك البدء بضبط y₀ = 0. +3. أوجد نقطة ارتفاعها أقل من −3. يمكنك البدء بضبط x₀ = 0. ## Intuition -حرّك النقطة على طول محور x مع إبقاء «النقطة y» عند 0. يميل المستوى المماس كجدار وادٍ، منحنيًا لأعلى كما يفعل وعاء. حرّكها الآن على طول محور y بدلًا من ذلك مع إبقاء «النقطة x» عند 0. فينحني السطح نفسه لأسفل كقمة تل. سطح واحد، وسلوكان متعاكسان تمامًا حسب الاتجاه الذي تسير فيه. +انعدام المشتقة في متغير واحد يجعل النقطة مرشحة لتغير اتجاه المنحنى، ولا يضمن ذلك. ينطبق التنبه نفسه في متغيرين. عند أصل السطح x² − y²، ينعدم الميلان الجزئيان. لكن حركة صغيرة على x تعطي ارتفاعًا موجبًا، وحركة صغيرة على y تعطي ارتفاعًا سالبًا. -أعد النقطة إلى نقطة الأصل (0, 0). يصبح المستوى المماس مسطحًا تمامًا ويتقلص سهم التدرّج إلى العدم، تمامًا كما يحدث عند حد أدنى أو أقصى حقيقي. لكن هذه النقطة المسطحة ليست أيًا منهما، فهي سرج، وهو الشكل الذي يجلس عليه راكب الحصان: ينحني لأعلى نحو رأس الحصان وذيله، ولأسفل نحو جانبيه. +إذن توجد نقاط أعلى وأدنى قريبة من الأصل بقدر ما نريد. لا يمكن أن يكون الأصل قيمة عظمى أو صغرى محلية؛ إنه نقطة سرج. تصف الرقعة المماسة المستوية الميلين من الرتبة الأولى فقط، بينما ينحني السطح فوقها وتحتها. المستوى نفسه لا ينحني، حتى عندما نرسمه على سطح منحنٍ. ## Formal -$f_x = 2x$، $f_y = -2y$، ويتلاشى كلاهما عند نقطة الأصل فقط، لذا $(0,0)$ هي النقطة الحرجة الوحيدة. +للدالة $f(x,y)=x^2-y^2$، تكون المشتقتان الجزئيتان $f_x=2x$ و$f_y=-2y$. ينعدم التدرج فقط عند $(0,0)$، فتكون النقطة الحرجة الوحيدة. على y = 0 تصبح الدالة x²، وعلى x = 0 تصبح −y². -مصفوفة هسّه هي $\begin{pmatrix}2&0\\0&-2\end{pmatrix}$، وقيمها الذاتية متعاكسة الإشارة. وهذا هو الطابع المميز لنقطة السرج، فهي ليست حدًا أقصى محليًا ولا حدًا أدنى. +مصفوفة هسّه للمشتقات الثانية هي $H=\begin{pmatrix}2&0\\0&-2\end{pmatrix}$. قيمتاها الذاتيتان متعاكستا الإشارة، فتؤكدان وجود السرج. تتكون مجموعة الارتفاع الصفري من المستقيمين $y=x$ و$y=-x$؛ ونقاطهما غير الصفرية ليست نقاطًا حرجة. ## Advanced -يعطي اختبار المشتقة الثانية الصيغة الدقيقة لهذه الصورة، فمع $D = f_{xx}f_{yy} - f_{xy}^2$ تضمن $D<0$ عند نقطة حرجة وجود سرج بصرف النظر عن الاتجاه المختار، لأن الصيغة التربيعية $f_{xx}h^2 + 2f_{xy}hk + f_{yy}k^2$ (التقريب الموضعي لـ$f$ قرب النقطة) تأخذ الإشارتين معًا، وهنا $2h^2 - 2k^2$ موجبة على طول $h$ وسالبة على طول $k$. +لدالة مشتقاتها الثانية متصلة عند نقطة حرجة، يثبت محدد هسّه السالب وجود سرج. المحدد هنا −4. حد تايلور من الرتبة الثانية هو نصف الصيغة التربيعية لهسّه، فيعطي h² − k² قرب الأصل؛ وحذف عامل النصف يضاعف تغير الارتفاع الحقيقي. ## Derivation -1. اشتق مع تثبيت المتغير الآخر، واحدًا تلو الآخر. -2. النقاط الحرجة هي حيث يتلاشى التدرّج. -3. قيم هسّه الذاتية المتعاكسة الإشارة تصنّف نقطة الأصل بأنها سرج، لا نقطة قصوى. +1. نثبت أحد المتغيرين ونشتق بالنسبة إلى الآخر لحساب المشتقتين الجزئيتين. +2. نجعل المشتقتين صفرًا. لا تنعدمان معًا إلا عندما تكون x وy صفريتين. +3. نشتق مرة أخرى للحصول على هسّه. اختلاف إشارتي الانحناء في الاتجاهين يميز السرج من القيمة الصغرى أو العظمى. ## Real world -### الممرات الجبلية -الممر الجبلي الحقيقي نقطة سرج، فهو أخفض نقطة على طول سلسلة الجبال وأعلى نقطة على طول المسار العابر لها. +### قراءة نموذج تضاريس -### توازنات نظرية الألعاب -توازن الحد الأدنى-الأقصى في لعبة محصلتها صفر هو نقطة سرج لدالة العائد، فهو أفضل استجابة في اتجاه وأسوأها في الاتجاه الآخر. +يمكن تمثيل ممر محليًا بسطح يرتفع في اتجاه وينخفض في آخر. يوضح السرج المثالي لماذا قد يعطي مقطع واحد وحده انطباعًا مضللًا. -### مزالق الأمثلة -يمكن أن يتوقف الانحدار التدرّجي بالقرب من نقاط السرج في أسطح الخسارة عالية الأبعاد، إذ يكاد التدرّج يتلاشى دون أن يكون عند حد أدنى حقيقي. +### فحص نتيجة تصغير -### الهندسة الإنشائية -الأسقف على شكل سرج (مكافئ زائدي القطع) قوية بالضبط لأنها تنحني بشكل متعاكس في اتجاهين، ما يقاوم الانبعاج في كلا الاتجاهين. +إعلان طريقة عددية أن التدرج صغير لا يعني بالضرورة العثور على قيمة صغرى. نفحص القيم القريبة أو الانحناء للتمييز بين الصغرى والسرج. diff --git a/content/lessons/calculus/partial-derivatives-saddle/en.md b/content/lessons/calculus/partial-derivatives-saddle/en.md index 0cf29cd3..715d7e5f 100644 --- a/content/lessons/calculus/partial-derivatives-saddle/en.md +++ b/content/lessons/calculus/partial-derivatives-saddle/en.md @@ -1,68 +1,61 @@ --- title: Partial derivatives and saddle points -summary: >- - A mountain pass is the lowest point along the ridge but the highest point - along the trail crossing it — a saddle point is exactly that two-faced - spot, and this shows you how to spot one. +summary: 'See why a zero gradient can occur at a point that is neither a maximum nor a minimum.' parameters: - x0: point x - y0: point y + x0: 'x₀ — selected x coordinate' + y0: 'y₀ — selected y coordinate' variables: - - 'slope walking in the $x$ direction — here $2x$, always concave up' - - 'slope walking in the $y$ direction — here $-2y$, always concave down' - - the gradient — zero exactly at the saddle point + - '∂f/∂x: slope 2x with y fixed' + - '∂f/∂y: slope −2y with x fixed' + - '∇f: vector (2x, −2y)' --- ## Try it -1. Move the point along the x-axis, keeping «point y» at 0. The tangent plane curves upward like the wall of a valley. -2. Now move along the y-axis instead, keeping «point x» at 0. The same surface curves downward like a hilltop. -3. Bring the point back to the origin. The tangent plane goes flat, but this flat point is neither a peak nor a valley — it's a saddle. +1. Keep y₀ = 0 and move x₀ from −1 to 0 to 1. The surface heights are 1, 0 and 1: this cross-section curves upward. +2. Keep x₀ = 0 and move y₀ through the same values. Heights are −1, 0 and −1: this cross-section curves downward. +3. Set x₀ = y₀ = 0. The tangent plane is horizontal and both partial derivatives vanish, yet nearby surface points lie both above and below it. ## Real-life examples -1. **Sitting exactly at the saddle point.** At (x, y) = (0, 0), the tangent plane is flat and the gradient vanishes — yet this is neither a hilltop nor a valley floor. -2. **Walking straight into the uphill direction.** At (x, y) = (1.5, 0), the surface curves upward, like starting up a valley wall. -3. **Walking straight into the downhill direction.** At (x, y) = (0, 1.5), the same surface curves downward, like starting down a hilltop. +1. **At the saddle.** At (0, 0), height and gradient are zero. The tangent plane is z = 0. +2. **On the upward cross-section.** At (1.5, 0), height is 2.25 and the gradient is (3, 0). +3. **On the downward cross-section.** At (0, 1.5), height is −2.25 and the gradient is (0, −3). The steepest local increase points toward decreasing y. ## Test yourself -1. Find a point away from the origin where the height is exactly 0 — on the saddle's diagonal ridge. -2. Climb to a height above 3 by moving along the x-axis. -3. Drop to a height below -3 by moving along the y-axis. +1. Make |x₀² − y₀²| less than 0.05, with at least one of |x₀| and |y₀| greater than 0.3. +2. Find a point with height greater than 3. Setting y₀ = 0 is one approach. +3. Find a point with height less than −3. Setting x₀ = 0 is one approach. ## Intuition -Move the point along the x-axis, keeping «point y» at 0: the tangent plane tilts like the wall of a valley, curving upward the way a bowl does. Now move along the y-axis instead, keeping «point x» at 0: the same surface curves downward like a hilltop. One surface, two completely opposite behaviours depending on which direction you walk. +A zero derivative in one variable is a candidate for a turning point, not a guarantee. The same caution applies in two variables. At the origin of x² − y², both partial slopes are zero. But moving a little along x gives a positive height, and moving a little along y gives a negative height. -Bring the point back to the origin (0, 0): the tangent plane goes perfectly flat and the gradient arrow shrinks to nothing, just as it would at a true minimum or maximum — but this flat point is neither. It is a saddle, the shape a horse rider sits on: curving up toward the horse's head and tail, down toward its sides. +There are therefore higher and lower points arbitrarily close to the origin. It cannot be a local maximum or minimum; it is a saddle point. The flat tangent patch describes only the first-order slopes. The surface curves above and below that plane. A plane itself does not curve, even when it is drawn on a curved surface. ## Formal -$f_x = 2x$, $f_y = -2y$; both vanish only at the origin, so $(0,0)$ is the only critical point. +For $f(x,y)=x^2-y^2$, the partial derivatives are $f_x=2x$ and $f_y=-2y$. The gradient vanishes only at $(0,0)$, making it the only critical point. Along y = 0 the function is x², and along x = 0 it is −y². -The Hessian is $\begin{pmatrix}2&0\\0&-2\end{pmatrix}$, with eigenvalues of opposite sign — the signature of a saddle point, neither a local max nor min. +The Hessian matrix of second derivatives is $H=\begin{pmatrix}2&0\\0&-2\end{pmatrix}$. Its eigenvalues have opposite signs, confirming a saddle. The zero-height set consists of the lines $y=x$ and $y=-x$; their nonzero points are not critical points. ## Advanced -The second-derivative test formalises the picture: with $D = f_{xx}f_{yy} - f_{xy}^2$, $D<0$ at a critical point guarantees a saddle regardless of direction chosen, because the quadratic form $f_{xx}h^2 + 2f_{xy}hk + f_{yy}k^2$ (the local approximation of $f$ near the point) takes both signs — here $2h^2 - 2k^2$, positive along $h$, negative along $k$. +For a twice continuously differentiable function at a critical point, a negative Hessian determinant proves a saddle. Here the determinant is −4. The second-order Taylor term is one half of the Hessian quadratic form, giving h² − k² near the origin; omitting the factor one half would double the actual height change. ## Derivation -1. Differentiate holding the other variable fixed, one at a time. -2. Critical points are where the gradient vanishes. -3. The Hessian's mixed-sign eigenvalues classify the origin as a saddle, not an extremum. +1. Hold one variable fixed while differentiating with respect to the other to calculate the two partial derivatives. +2. Set both partial derivatives to zero. They vanish together only when x and y are zero. +3. Differentiate again to obtain the Hessian. Opposite signs in the two coordinate curvatures distinguish the saddle from a minimum or maximum. ## Real world -### Mountain passes -A literal mountain pass is a saddle point: lowest along the ridge, highest along the trail crossing it. +### Reading a terrain model -### Game theory equilibria -A minimax equilibrium in a zero-sum game is a saddle point of the payoff function — best response in one direction, worst in the other. +A pass can be modelled locally by a surface that rises in one direction and falls in another. The ideal saddle illustrates why one cross-section alone can give a misleading impression. -### Optimization pitfalls -Gradient descent can stall near saddle points in high-dimensional loss surfaces, since the gradient nearly vanishes without being at a true minimum. +### Checking an optimisation result -### Structural engineering -Saddle-shaped (hyperbolic paraboloid) roofs are strong precisely because they curve oppositely in two directions, resisting buckling both ways. +A numerical method reporting a small gradient has not necessarily found a minimum. Examine nearby values or curvature to distinguish a minimum from a saddle. From 976dfaed36e01f4b67c38f4c498396c133168247 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:36:02 +0300 Subject: [PATCH 076/124] content: rewrite sum-of-all-numbers for first-time learners in both languages --- .../lessons/calculus/sum-of-all-numbers/ar.md | 66 +++++++++--------- .../lessons/calculus/sum-of-all-numbers/en.md | 67 +++++++++---------- .../calculus/sum-of-all-numbers/lesson.yaml | 2 +- 3 files changed, 63 insertions(+), 72 deletions(-) diff --git a/content/lessons/calculus/sum-of-all-numbers/ar.md b/content/lessons/calculus/sum-of-all-numbers/ar.md index f9f45a5a..1ef1fcf0 100644 --- a/content/lessons/calculus/sum-of-all-numbers/ar.md +++ b/content/lessons/calculus/sum-of-all-numbers/ar.md @@ -1,69 +1,65 @@ --- title: هل مجموع الأعداد كلها عدد سالب؟ -summary: >- - اجمع 1 و2 و3 بلا توقف فيكبر المجموع بلا حد. الجواب المشهور «سالب واحد على اثني عشر» يأتي من منحنى، لا من الجمع. +summary: 'ميّز مجموع الأعداد الصحيحة الموجبة المتباعد من قيمة دالة زيتا بعد امتدادها التحليلي.' parameters: - s: الأس s - N: عدد الأعداد N + s: 's — معامل الأس في n⁻ˢ' + N: 'N — عدد حدود المجموع الجزئي' variables: - - 'منحنى زيتا. ارتفاعه عند كل أس هو العدد الذي يقف عنده المجموع، ثم يكمل طريقه إلى يسار الجدار' - - 'الأس. إذا كان 2 جمعنا واحدًا على 1 ثم واحدًا على 4 ثم واحدًا على 9، وإذا كان سالب 1 جمعنا 1 ثم 2 ثم 3' - - عدد الأعداد التي جمعناها حتى الآن + - 'ζ(s): قيمة زيتا، مع امتدادها خارج نطاق التقارب' + - 's: معامل الحد؛ كل حد هو n مرفوعة إلى −s' + - 'N: عدد صحيح موجب للحدود المجموعة' --- ## Try it -1. اترك «الأس s» عند 2. يجمع الرسم الآن $1 + \frac{1}{4} + \frac{1}{9} + \cdots$. ارفع «عدد الأعداد N» إلى 50. تتوقف الأعمدة في اليمين عن الارتفاع قرب 1.645، وهذا هو ارتفاع النقطة على المنحنى. -2. اسحب النقطة إلى اليسار حتى تتجاوز الجدار المتقطع ويصير الأس $-1$. يجمع الرسم الآن $1 + 2 + 3 + \cdots$، وقد بلغ مجموع أول 50 عددًا 1275. الأعمدة ترتفع ولا تتوقف. -3. انظر الآن إلى النقطة نفسها. ارتفاع المنحنى المتقطع في هذا المكان $-\frac{1}{12}$. المنحنى له قيمة هنا، والمجموع ليس له قيمة. +1. اضبط s = 2 وN = 50. تنتهي أعمدة المجاميع الجزئية قرب 1.62513، بينما قيمة زيتا نحو 1.64493. لم يبلغ المجموع المنتهي قيمة المجموع اللانهائي. +2. اضبط s = −1. مجموع أول 50 عددًا صحيحًا موجبًا هو 1275، بينما يقرأ منحنى زيتا −1/12. تغيير N يغيّر المجموع الجزئي، لا قيمة زيتا. +3. اضبط s = −2. قيمة الدالة الممتدة صفر، لكن مجاميع المربعات الموجبة تستمر في الزيادة. يصف الجزآن مقدارين مختلفين خارج نطاق تقارب المتسلسلة. ## Real-life examples -1. **لغز أويلر.** في عام 1734 جمع العالم أويلر $1 + \frac{1}{4} + \frac{1}{9} + \cdots$، أي واحدًا على كل عدد مضروب في نفسه. وجد أن المجموع يقف قرب 1.645. هنا يتفق المجموع مع المنحنى. -2. **كتب تبرز عن حافة الطاولة.** ضع كتبًا بعضها فوق بعض، واجعل كل كتاب يبرز قليلًا عن الكتاب الذي تحته. نحسب طول البروز كله من المجموع $1 + \frac{1}{2} + \frac{1}{3} + \cdots$. هذا المجموع يكبر بلا توقف لكنه بطيء جدًا، فخمسون عددًا تعطي 4.5 تقريبًا. مكانه على الجدار تمامًا، والمنحنى ليس له قيمة هناك. -3. **وتر يهتز.** يصدر الوتر نغمة أساسية، ونغمات أخرى ترددها ضعف الأساسية و3 أضعافها وأكثر. يجمع الفيزيائيون طاقة هذه النغمات كلها في نظرية الأوتار، فيصلون إلى $1 + 2 + 3 + \cdots$. يأخذون بدلًا منه قيمة المنحنى، وهي $-\frac{1}{12}$. -4. **لوحان معدنيان في الفراغ.** يجذب كل لوح الآخر بقوة ضعيفة جدًا. حين يحسب الفيزيائيون هذه القوة يصلون إلى المجموع $1 + 8 + 27 + \cdots$. قيمة المنحنى هناك $\frac{1}{120}$. قاس العلماء القوة في المختبر عام 1997، فوافقت الحساب. +1. **مقلوبات المربعات.** عند s = 2 وN = 50، يكون المجموع الجزئي نحو 1.62513، والمجموع اللانهائي المتقارب π²/6 ≈ 1.64493. +2. **المقلوبات.** عند s = 1 وN = 50، يكون المجموع التوافقي الجزئي نحو 4.49921. تتباعد المتسلسلة، ولزيتا قطب عند 1 بدل قيمة منتهية. +3. **الأعداد الصحيحة الموجبة.** عند s = −1 وN = 50، يكون المجموع الجزئي 1275. قيمة الامتداد −1/12 ليست نهاية هذه المجاميع. +4. **المكعبات الموجبة.** عند s = −3 وN = 20، يكون المجموع الجزئي 44100، بينما قيمة الامتداد 1/120. الامتداد هنا أيضًا عملية مختلفة عن الجمع العادي. ## Test yourself -1. اجعل الرسم يجمع $1 + 2 + 3 + \cdots$. -2. أبقِ الأس عند 2 واجمع 40 عددًا أو أكثر. -3. ابحث يسار الجدار عن المكان الذي يصير فيه ارتفاع المنحنى صفرًا. +1. اضبط s على −1 لتصبح الحدود الأعداد الصحيحة الموجبة. +2. اضبط s على 2 وN على 40 أو أكثر. +3. أوجد صفر الدالة الممتدة عند s = −2. ## Intuition -عندك حصالة. تضع فيها ريالًا اليوم، وريالين غدًا، و3 ريالات بعد غد، وتزيد ريالًا كل يوم. بعد 10 أيام يصير فيها 55 ريالًا، وبعد 100 يوم يصير فيها 5050 ريالًا. لن يتوقف المبلغ عن الزيادة مهما طال الوقت. لذلك ليس لمجموع الأعداد كلها جواب، فهو يكبر بلا نهاية. الأعمدة في يمين الرسم تبيّن ذلك. +جمع 1 ثم 2 ثم 3 يعطي المجاميع المتتابعة 1 و3 و6. بعد عشرة حدود يصبح المجموع 55، وبعد خمسين يصبح 1275. كل حد مضاف موجب، والمجاميع تكبر بلا حد. بالمعنى المعتاد للمجموع اللانهائي، تتباعد 1 + 2 + 3 + … إلى موجب ما لا نهاية، ولا يمكن أن تساوي كسرًا سالبًا. -جرّب الآن جمعًا آخر. اجمع واحدًا، ثم ربعًا، ثم تُسعًا، ثم جزءًا من 16. كل قطعة أصغر كثيرًا من التي قبلها، فيقف المجموع قرب 1.645 ولا يتجاوزه. يحدث هذا مع كل أس يقع يمين الجدار المتقطع. الأعداد التي يقف عندها المجموع هي التي ترسم المنحنى المتصل. +نستبدل الآن كل حد n بالقيمة n مرفوعة إلى −s. عندما تكون s الحقيقية أكبر من 1، تتقارب المجاميع الجزئية وتعرّف دالة زيتا في هذا النطاق. عند s = 2 نجمع مقلوبات المربعات. تعرض الأعمدة المجاميع الجزئية المنتهية، ويعرض المنحنى قيمة النهاية حيث تتقارب المتسلسلة. -هذا المنحنى ناعم لا انكسار فيه. أثبت علماء الرياضيات أن له طريقًا واحدًا فقط يكمل به إلى يسار الجدار وهو ناعم، وهذا الطريق هو الجزء المتقطع. حين يصير الأس $-1$ يصبح الجمع $1 + 2 + 3 + \cdots$. ارتفاع المنحنى المتقطع هناك $-\frac{1}{12}$. - -إذن سالب واحد على اثني عشر هو ارتفاع المنحنى، وليس المبلغ الذي في الحصالة. اضغط زر 3D لترى الصورة كاملة، فهي سطح واحد متصل. الجمع ينفع في النصف الذي يمين الجدار فقط، أما السطح فيمتد إلى النصف الآخر. +يمد الامتداد التحليلي الدالة خارج ذلك النطاق بشرط أقوى بكثير من رسم منحنى ناعم. تجعل قابلية الاشتقاق المركب الامتداد وحيدًا على المجال المتصل الذي يستبعد القطب عند 1. قيمته عند −1 هي −1/12. ولا يجعل هذا الامتداد مجاميع الأعداد الصحيحة الموجبة الأصلية متقاربة. ## Formal -حين يكون $s > 1$ نعرّف دالة زيتا بالمجموع $\zeta(s) = 1^{-s} + 2^{-s} + 3^{-s} + \cdots$، وهو مجموع متقارب. وحين يكون $s \le 1$ يتباعد المجموع. مثلًا عند $s = -1$ يساوي مجموع أول $N$ حدًّا $\frac{N(N+1)}{2}$، وهذا المقدار يكبر بلا حد. +عندما يكون $s>1$ حقيقيًا، نعرّف $\zeta(s)=\sum_{n=1}^{\infty}n^{-s}$. تتباعد هذه المتسلسلة عندما تكون s الحقيقية ≤ 1. عند s = −1، مجاميعها الجزئية $S_N=N(N+1)/2$، وهي تؤول إلى موجب ما لا نهاية. -توجد دالة تحليلية واحدة فقط تساوي هذا المجموع حين $s > 1$ ولها قيمة عند كل $s \ne 1$. تسمى هذه الدالة الامتداد التحليلي (analytic continuation). قيمتها عند $s = -1$ هي $\zeta(-1) = -\frac{1}{12}$. من يكتب أن مجموع الأعداد كلها يساوي $-\frac{1}{12}$ يقصد هذه القيمة، ولا يقصد جمعًا عاديًّا. +للدالة امتداد تحليلي إلى المستوى المركب باستثناء قطب عند s = 1. وقيمة الامتداد هي $\zeta(-1)=-1/12$. هذه قيمة منتظمة بطريقة زيتا للتعبير المتباعد، وليست مجموعه المعتاد. انظر [تعريف NIST والامتداد](https://dlmf.nist.gov/25.2). ## Advanced -يحقق الامتداد التحليلي المعادلة $\zeta(s) = 2^{s}\pi^{s-1}\sin\left(\frac{\pi s}{2}\right)\Gamma(1-s)\,\zeta(1-s)$. تربط هذه المعادلة $\zeta(-1)$ بالقيمة المعروفة $\zeta(2) = \frac{\pi^2}{6}$. ونصل إلى العدد نفسه بطريقة أخرى لا امتداد فيها. نضرب كل حد في معامل يصغر تدريجيًّا ولا نقطع المجموع فجأة، فنجد $\sum_{n \ge 1} n\,e^{-n/N} = N^2 - \frac{1}{12} + \cdots$. نحذف الجزء المتزايد $N^2$ فيبقى سالب واحد على اثني عشر. يعرض المشهد الثلاثي الأبعاد $|\zeta(s)|$ حين يكون $s$ عددًا مركبًا. ترى سطحًا واحدًا فيه قمة واحدة عند $s = 1$. +لا تحدد النعومة وحدها امتدادًا وحيدًا. الشرط المعني هو التحليلية المركبة بعيدًا عن القطب. يرسم العرض ثلاثي الأبعاد المقدار |ζ(s)| للمدخلات المركبة، ويحد ارتفاع القيم الكبيرة لأغراض العرض. لذلك يفقد الإشارة التي نراها على المنحنى الحقيقي ثنائي الأبعاد: عند s = −1 يكون المقدار 1/12، رغم أن القيمة المكتوبة سالبة. والتفرد عند s = 1 ليس قمة منتهية. ## Derivation -1. نجمع أول $N$ عددًا فنحصل على $\frac{N(N+1)}{2}$. الناتج 55 لعشرة أعداد و5050 لمئة عدد، وهو يكبر ولا يقف. -2. نرفع كل عدد إلى الأس $-s$ ثم نجمع. حين يكون $s > 1$ تصغر الحدود بسرعة فيقف المجموع عند عدد نسميه $\zeta(s)$. -3. عند $s = 2$ يقف المجموع عند $\frac{\pi^2}{6}$، أي 1.645 تقريبًا. هذا مكان النقطة حين تفتح الدرس. -4. يكمل المنحنى طريقه إلى يسار الجدار دون انكسار. ارتفاعه عند $s = -1$ هو $-\frac{1}{12}$. +1. نجمع أول N عددًا صحيحًا موجبًا فنحصل على N(N + 1)/2. يثبت ذلك تباعد متسلسلة الأعداد الصحيحة الموجبة بالمعنى المعتاد. +2. نعرّف زيتا بمتسلسلة القوى المقلوبة المتقاربة عندما تكون s الحقيقية أكبر من 1. +3. عند s = 2، يساوي المجموع اللانهائي π²/6، وتظل المجاميع الجزئية المنتهية أقل منه. +4. تعطي نتيجة مستقلة في الامتداد التحليلي ζ(−1) = −1/12. لا تنتج بمعاملة متسلسلة متباعدة كمجموع منتهٍ عادي. يعرض NIST القيم والصيغ الخاصة بالمدخلات الصحيحة. ## Real world -### تأثير كازيمير -ضع لوحين معدنيين في الفراغ والمسافة بينهما أقل من سماكة شعرة، فيجذب كل منهما الآخر. حين نحسب قوة الجذب يظهر مجموع يكبر بلا توقف. نأخذ قيمة منحنى زيتا بدلًا منه، فنحصل على القوة التي تقيسها المختبرات. +### قراءة نتيجة منتظمة + +عندما يسند حساب قيمة إلى تعبير متباعد، نحدد قاعدة الانتظام المستخدمة. لا نستبدل عملية أخرى بالجمع المعتاد دون توضيح تغير المعنى. -### نظرية الأوتار -تفترض هذه النظرية أن أصغر الجسيمات أوتار صغيرة تهتز. حين نجمع طاقات نغمات الوتر كلها نصل إلى مجموع الأعداد كلها. نأخذ بدلًا منه سالب واحد على اثني عشر، ومن هذا العدد نعرف كم بُعدًا تحتاج النظرية. +### فحص التقارب عدديًا -### الأعداد الأولية -يخبرنا منحنى زيتا أيضًا كيف تتوزع الأعداد الأولية. لم يعرف أحد بعد كل الأماكن التي يساوي فيها الصفر. هذا السؤال اسمه فرضية ريمان، ولمن يحله جائزة قدرها مليون دولار. +نقارن المجاميع الجزئية مع زيادة N ونستخدم حجة تقارب. إرجاع برنامج قيمة زيتا منتهية خارج s > 1 لا يثبت تقارب المتسلسلة المقابلة. توجد القيم المرجعية في [صيغ NIST للمدخلات الصحيحة](https://dlmf.nist.gov/25.6). diff --git a/content/lessons/calculus/sum-of-all-numbers/en.md b/content/lessons/calculus/sum-of-all-numbers/en.md index fa2792ab..e216d94c 100644 --- a/content/lessons/calculus/sum-of-all-numbers/en.md +++ b/content/lessons/calculus/sum-of-all-numbers/en.md @@ -1,70 +1,65 @@ --- title: 'Does 1 + 2 + 3 + … equal −1/12?' -summary: >- - Adding 1, 2, 3 and so on forever never stops growing, so the famous answer - of minus one twelfth does not come from adding. It comes from a curve. +summary: 'Distinguish the divergent sum of positive integers from the value of the analytically continued zeta function.' parameters: - s: the power s - N: how many numbers N + s: 's — exponent parameter in n⁻ˢ' + N: 'N — number of terms in the partial sum' variables: - - 'the zeta curve: for each power, the total the sum settles at, continued smoothly to the left of the wall' - - 'the power: every number n in the sum is replaced by one over n multiplied by itself s times' - - how many numbers have been added so far + - 'ζ(s): zeta value, continued outside the convergence range' + - 's: term parameter; each term is n raised to −s' + - 'N: positive integer number of terms added' --- ## Try it -1. Leave «the power s» at 2. The picture now adds $1 + \frac{1}{4} + \frac{1}{9} + \cdots$. Raise «how many numbers N» to 50. The bars on the right level off near 1.645, the height of the dot on the curve. -2. Drag the dot left, past the dashed wall, until s is $-1$. The picture now adds $1 + 2 + 3 + \cdots$, and the first 50 numbers already total 1275. The bars keep climbing. -3. Now look at the dot. The dashed curve passes quietly through $-\frac{1}{12}$ at this spot. The curve has a value here. The sum does not. +1. Set s = 2 and N = 50. The partial-sum bars end near 1.62513, while the zeta value is about 1.64493. The finite sum has not reached the infinite sum. +2. Set s = −1. The first 50 positive integers sum to 1275, while the zeta curve reads −1/12. Increasing N changes the partial sum, not the zeta value. +3. Set s = −2. The continued function is zero, but the positive-square partial sums keep increasing. The two panels describe different quantities outside the series' convergence range. ## Real-life examples -1. **Euler's puzzle.** In 1734 Euler added one over each square number, $1 + \frac{1}{4} + \frac{1}{9} + \cdots$, and found that the total settles at about 1.645. Here the sum and the curve agree. -2. **Books hanging over a table.** Stack books so that each one sticks out a little further than the one above it. The overhang follows $1 + \frac{1}{2} + \frac{1}{3} + \cdots$, which grows forever but very slowly. Fifty numbers reach only about 4.5. This is the wall, and the curve has no value on it. -3. **A vibrating string.** A string can ring at 1, 2, 3 and more times its lowest note. When physicists add the energy of all these notes in string theory they meet $1 + 2 + 3 + \cdots$, and they use the curve's value $-\frac{1}{12}$ in its place. -4. **Two metal plates in empty space.** The calculation of the tiny pull between the plates meets $1 + 8 + 27 + \cdots$. The curve gives $\frac{1}{120}$ there, and the pull measured in a laboratory in 1997 matched it. +1. **Reciprocal squares.** At s = 2 and N = 50, the partial sum is about 1.62513 and the convergent infinite sum is π²/6 ≈ 1.64493. +2. **Reciprocals.** At s = 1 and N = 50, the harmonic partial sum is about 4.49921. The series diverges, and zeta has a pole at 1 rather than a finite value. +3. **Positive integers.** At s = −1 and N = 50, the partial sum is 1275. The continued value −1/12 is not the limit of these sums. +4. **Positive cubes.** At s = −3 and N = 20, the partial sum is 44100, whereas the continued value is 1/120. Again, continuation is a different operation from ordinary summation. ## Test yourself -1. Turn the sum into $1 + 2 + 3 + \cdots$. -2. Keep the power at 2 and add at least 40 numbers. -3. Left of the wall, find the place where the curve touches zero. +1. Set s to −1, making the terms the positive integers. +2. Set s to 2 and N to at least 40. +3. Find the continued function's zero at s = −2. ## Intuition -Put 1 riyal in a jar today, 2 riyals tomorrow and 3 the day after. After 10 days the jar holds 55 riyals, and after 100 days it holds 5050. The jar never stops filling. So the honest answer to "what do all the whole numbers add up to?" is that there is no such number. The total grows without end, and the bars on the right show it. +Adding 1, then 2, then 3 gives running totals 1, 3 and 6. After ten terms the total is 55; after fifty it is 1275. Every added term is positive and the totals grow without bound. In the ordinary meaning of an infinite sum, 1 + 2 + 3 + … diverges to positive infinity. It cannot equal a negative fraction. -Now change the game. Add 1, then a quarter, then a ninth, each time one over a square number. These pieces shrink so fast that the total settles near 1.645. The same happens for every power to the right of the dashed wall, and the settled totals draw the solid curve. +Now replace each term n by n raised to −s. For real s > 1, the partial sums converge, defining the zeta function in that range. For s = 2, they add reciprocal squares. The bars show the finite partial sums, while the curve shows the limiting value where the series converges. -That curve is smooth, and there is only one smooth way to carry it on to the left of the wall. Mathematicians follow it there, and that is the dashed part. Where the power is $-1$ the sum would be $1 + 2 + 3 + \cdots$, and the dashed curve reads $-\frac{1}{12}$. - -So minus one twelfth is the height of the curve and not what is in the jar. Switch to 3D to see the whole thing as one surface. The sum can only see the half to the right of the wall, and the surface carries on to the other half by itself. +Analytic continuation extends the function beyond that range under a much stronger requirement than drawing a smooth curve. Complex differentiability makes the extension unique on the connected domain excluding the pole at 1. Its value at −1 is −1/12. The extension does not make the original positive-integer partial sums converge. ## Formal -For $s > 1$ the zeta function is the sum $\zeta(s) = 1^{-s} + 2^{-s} + 3^{-s} + \cdots$, and the sum converges. For $s \le 1$ it diverges. At $s = -1$ the first $N$ terms total $\frac{N(N+1)}{2}$, which has no finite limit. +For real $s>1$, define $\zeta(s)=\sum_{n=1}^{\infty}n^{-s}$. For real s ≤ 1 this series diverges. At s = −1, its partial sums are $S_N=N(N+1)/2$, which tend to positive infinity. -Exactly one analytic function agrees with this sum for $s > 1$ and is defined for every $s \ne 1$. It is called the analytic continuation of the sum, and its value at $s = -1$ is $\zeta(-1) = -\frac{1}{12}$. Writing that all the whole numbers add up to $-\frac{1}{12}$ is shorthand for this statement. It is not an ordinary sum. +The function has an analytic continuation to the complex plane except for a pole at s = 1. Its continued value is $\zeta(-1)=-1/12$. This is a zeta-regularised value of the divergent expression, not its ordinary sum. See the [NIST definition and continuation](https://dlmf.nist.gov/25.2). ## Advanced -The continuation obeys the functional equation $\zeta(s) = 2^{s}\pi^{s-1}\sin\left(\frac{\pi s}{2}\right)\Gamma(1-s)\,\zeta(1-s)$, which turns $\zeta(-1)$ into $\zeta(2) = \frac{\pi^2}{6}$. The same number appears without any continuation when the sum is faded out gently instead of being cut off, since $\sum_{n \ge 1} n\,e^{-n/N} = N^2 - \frac{1}{12} + \cdots$. Minus one twelfth is the constant left over once the growing part $N^2$ is removed. The 3D view shows $|\zeta(s)|$ over complex $s$, a single surface with one spike at $s = 1$. +Smoothness alone does not specify a unique continuation. The relevant condition is complex analyticity away from the pole. The 3D view plots the magnitude |ζ(s)| for complex inputs, with tall values capped for display. It therefore loses the sign visible in the real 2D curve: at s = −1 the magnitude is 1/12, although the labelled value is negative. The singularity at s = 1 is not a finite peak. ## Derivation -1. Adding the first $N$ whole numbers gives $\frac{N(N+1)}{2}$, which is 55 for ten numbers and 5050 for a hundred. It never settles. -2. Raise each number to the power $-s$ instead. For $s > 1$ the numbers shrink fast enough for the sum to settle, and the total is called $\zeta(s)$. -3. At $s = 2$ the total is $\frac{\pi^2}{6}$, about 1.645. This is where the dot starts. -4. The curve carries on smoothly to the left of the wall, and at $s = -1$ it reads $-\frac{1}{12}$. +1. Sum the first N positive integers to obtain N(N + 1)/2. This establishes divergence of the ordinary positive-integer series. +2. Define zeta by the convergent reciprocal-power series for real s > 1. +3. At s = 2, the infinite sum equals π²/6; finite partial sums remain below it. +4. A separate analytic-continuation result gives ζ(−1) = −1/12. It does not follow by treating a divergent series as an ordinary finite sum. NIST lists the relevant integer values and formulas. ## Real world -### The Casimir effect -Two metal plates a hair's width apart in empty space pull on each other. The calculation runs into a sum that grows forever, and the value of the zeta curve gives the force that laboratories measure. +### Reading a regularised result + +When a calculation assigns a value to a divergent expression, identify the regularisation rule. Different operations must not be substituted for an ordinary sum without explaining the change of meaning. -### String theory -Adding the energies of all the notes of a vibrating string leads to the sum of all whole numbers. Using minus one twelfth in its place is what fixes the number of dimensions the theory needs. +### Checking numerical convergence -### Prime numbers -The same curve holds the pattern of the prime numbers. Where exactly it touches zero is the Riemann hypothesis, an open question with a prize of one million dollars. +Compare partial sums as N increases and use a convergence argument. A function evaluator returning a finite zeta value outside s > 1 does not show that the corresponding series converges. Reference values appear in [NIST's integer-argument formulas](https://dlmf.nist.gov/25.6). diff --git a/content/lessons/calculus/sum-of-all-numbers/lesson.yaml b/content/lessons/calculus/sum-of-all-numbers/lesson.yaml index 2f83001c..c210950f 100644 --- a/content/lessons/calculus/sum-of-all-numbers/lesson.yaml +++ b/content/lessons/calculus/sum-of-all-numbers/lesson.yaml @@ -1,7 +1,7 @@ id: sum-of-all-numbers subject: calculus difficulty: university -equation: '\zeta(s) = 1^{-s} + 2^{-s} + 3^{-s} + \cdots, \qquad \zeta(-1) = -\frac{1}{12}' +equation: '\zeta(s) = 1^{-s} + 2^{-s} + 3^{-s} + \cdots\ (s>1), \qquad \zeta(-1) = -\frac{1}{12}' concepts: - divergent-series - zeta-function From cdff7ec840ab4e3e1f6f00f9c96243a74507156f Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:36:02 +0300 Subject: [PATCH 077/124] content: rewrite taylor-series for first-time learners in both languages --- content/lessons/calculus/taylor-series/ar.md | 53 +++++++++---------- content/lessons/calculus/taylor-series/en.md | 55 +++++++++----------- 2 files changed, 48 insertions(+), 60 deletions(-) diff --git a/content/lessons/calculus/taylor-series/ar.md b/content/lessons/calculus/taylor-series/ar.md index 9670e6cb..6e69b5b7 100644 --- a/content/lessons/calculus/taylor-series/ar.md +++ b/content/lessons/calculus/taylor-series/ar.md @@ -1,10 +1,9 @@ --- title: متسلسلة تايلور -summary: >- - الآلة الحاسبة لا تخزن رسم الجيب، بل تبنيه من قوى x. هنا ترى الحيلة خطوة خطوة. +summary: 'قرّب الجيب بكثيرات حدود مبنية من مشتقاته عند الصفر، وافحص الخطأ بعيدًا عن هذا المركز.' parameters: - N: درجة كثيرة الحدود N - x: النقطة x + N: 'N — درجة كثيرة الحدود' + x: 'x — المدخل بالراديان' variables: [] charts: - title: 'sin(x) للمقارنة' @@ -16,54 +15,50 @@ charts: ## Try it -1. اجعل «درجة كثيرة الحدود N» تساوي 1. يكون المنحنى مجرّد خط مستقيم، مطابقة ضعيفة بعيدًا عن المركز. -2. ارفع «N» خطوة خطوة. يثني كل زوج حدود جديد المنحنى ليلتصق بموجة الجيب الحقيقية على مسافة أوسع. -3. اسحب «النقطة x» إلى الخارج مع N كبيرة. حتى أفضل كثيرة حدود تبتعد في النهاية عن المنحنى الحقيقي. +1. اضبط N = 1 وx = 0.3. الرسم الرئيسي هو المستقيم P₁(x) = x. قيمته 0.3 قريبة من sin(0.3) ≈ 0.29552 في مخطط المقارنة المنفصل. +2. اضبط N = 5 وx = 2. لكثيرة الحدود ثلاثة حدود غير صفرية، وقيمتها نحو 0.93333؛ أما الجيب فنحو 0.90930. +3. اضبط N = 11 وx = 6. تعطي كثيرة الحدود نحو −2.06026، بينما الجيب نحو −0.27942. لا تضمن الدرجة العالية خطأ صغيرًا في كل نافذة الرسم. ## Real-life examples -1. **تخمين بخط مستقيم، بعيدًا عن المركز.** مع N = 1 وx = 3، كثيرة الحدود مجرّد خط، بعيدة كل البعد عن المنحنى الحقيقي هناك. -2. **تقريب بخمسة حدود، ما زال قريبًا جدًا.** مع N = 5 وx = 2، لا تزال كثيرة الحدود تتبع الجيب بدقة معقولة. -3. **أعلى درجة متاحة، مدفوعة بعيدًا.** مع N = 11 وx = 6، حتى هذا العدد من الحدود يُختبر عند حافة ما يعمل عنده جيدًا. +1. **تقريب خطي بعيد عن الصفر.** تعطي N = 1 عند x = 3 القيمة 3، مقابل sin 3 ≈ 0.14112. الخطأ المطلق نحو 2.85888. +2. **الدرجة الخامسة، ثلاثة حدود.** تعطي N = 5 عند x = 2 خطأ مطلقًا نحو 0.02404، أقل من 0.05. +3. **الدرجة الحادية عشرة، ستة حدود.** تعطي N = 11 عند x = 6 خطأ مطلقًا نحو 1.78084. نحتاج هنا حدودًا أكثر أو مدخلًا أصغر لتقريب أدق. ## Test yourself -1. باستخدام N = 1 فقط (خط مستقيم)، جد x التي يبقى عندها التقريب ضمن 0.01 من sin(x). -2. مع N = 5، جد إلى أي مدى يمكنك دفع x بعيدًا عن المركز والبقاء ضمن 0.05 من منحنى الجيب الحقيقي. -3. مع متسلسلة N = 11 الكاملة، اقترب من sin(x) ضمن 0.05 بأبعد ما تستطيع. +1. مع N = 1، أوجد x يكون عندها خطأ التقريب المطلق أقل من 0.01. +2. مع N = 5، أوجد x يكون عندها الخطأ المطلق أقل من 0.05. +3. مع N = 11، أوجد x يكون عندها الخطأ المطلق أقل من 0.05. كتجربة إضافية، ابتعد عن الصفر وراقب أين يتجاوز الخطأ هذا الحد. ## Intuition -فكّر في زر الجيب على آلة حاسبة: لا صورة لموجة مخزّنة بداخله، ومع ذلك يحسب جيب أي رقم فورًا. تعمل هذه الحيلة بجمع قوى بسيطة للمدخل، والخط المنحني على الشاشة هو بالضبط ذلك، أي كثيرة حدود تايلور، مبنية فقط من قوى «النقطة x»، بينما المنحنى المتقطّع المرجعي هو موجة الجيب الحقيقية. عند «درجة كثيرة الحدود N» يساوي 1 تكون كثيرة الحدود مجرّد خط مستقيم، مطابقة ضعيفة بعيدًا عن المركز. +قرب الصفر، قيمة الجيب صفر وميله واحد. يطابق المستقيم x هاتين الخاصيتين، فيكون التقريب الأول. إضافة −x³/6 تطابق مشتقة الجيب الثالثة عند الصفر أيضًا، والحد التالي x⁵/120 يطابق مشتقته الخامسة. يستخدم كل حد مضاف معلومات محلية أكثر عن الدالة نفسها. -ارفع «N» خطوة خطوة، ويثني كل زوج حدود جديد المنحنى ليلتصق بموجة الجيب على مسافة أوسع. اسحب الآن «النقطة x» إلى الخارج. حتى كثيرة الحدود عالية الدرجة تبتعد في النهاية عن المنحنى الحقيقي بعيدًا بما يكفي عن المركز، لأن هذا النوع من التقريب مضمون الجودة قرب المركز فقط. +يمثل المنزلق N درجة كثيرة الحدود، لا عدد حدودها. لا تظهر إلا القوى الفردية لأن مشتقات الجيب الزوجية تنعدم عند الصفر. يعرض الرسم الرئيسي كثيرة الحدود المنتهية المختارة، ويعرض المخطط المنفصل الجيب. تتقاربان قرب المركز، وقد تختلفان كثيرًا بعيدًا عنه. ## Formal -قرب $x=0$ تُكتب أي دالة سلسة $f(x) \approx f(0) + f'(0)x + \dfrac{f''(0)}{2!}x^2 + \cdots$، مستخدمة مشتقّات أكثر فأكثر محسوبة عند المركز. لدالة $\sin x$ تصير $\sin x \approx x - \dfrac{x^3}{3!} + \dfrac{x^5}{5!} - \dfrac{x^7}{7!} + \cdots$. +كثيرة حدود تايلور من الدرجة N حول الصفر هي $P_N(x)=\sum_{j=0}^{N}f^{(j)}(0)x^j/j!$. للجيب بالراديان، تكون كثيرة الحدود ذات الدرجة الفردية $P_{2m+1}(x)=\sum_{j=0}^{m}(-1)^j x^{2j+1}/(2j+1)!$. يعني المضروب، مثل 3!، حاصل 3 × 2 × 1. -كل حدّ إضافي يُسمّى رفعًا للدرجة، وتقفز المنزلقات هنا درجتين في كل مرة لأن متسلسلة تايلور للجيب لا تحوي إلا القوى الفردية، إذ تتلاشى مشتقّاتها الزوجية عند الصفر كلها. +للدرجات الفردية المعروضة، يحقق الخطأ $|\sin x-P_N(x)|\leq |x|^{N+2}/(N+2)!$. معامل القوة الزوجية التالية للجيب صفر، ومقادير مشتقاته كلها لا تتجاوز 1، ومن ذلك نحصل على حد تايلور هذا. قد يكون الحد أكبر من الخطأ الفعلي. ## Advanced -بالنسبة لـ$\sin x$ تتقارب المتسلسلة إلى القيمة الدقيقة لكل $x$ حقيقي، أي نصف قطر تقارب لا نهائي، لكن عدد الحدود اللازمة لدقّة معيّنة يزداد كلما ابتعد $x$ عن المركز. دوال كثيرة، مثل $1/(1-x)$، لها نصف قطر تقارب منته يتباعد بعده المتسلسلة كليًا. +تتقارب متسلسلة الجيب اللانهائية إلى الجيب عند كل مدخل حقيقي، رغم أن كثيرة حدود منتهية ثابتة قد لا تقرّبه جيدًا بعيدًا عن الصفر. وليس لازمًا أن تساوي دالة ملساء عامة متسلسلة تايلور اللانهائية الخاصة بها. مثلًا، لا تتقارب متسلسلة 1/(1 − x) حول الصفر إلا عندما تكون |x| < 1. التقريب المنتهي والتقارب ومساواة الدالة أسئلة مختلفة. ## Derivation -1. ابدأ من التقريب المحلي العام باستخدام مشتقّات عند المركز. -2. احسب الجيب ومشتقّاته عند الصفر، ولا يبقى إلا الفردية منها. -3. عوّض تلك القيم لتحصل على متسلسلة القوى الفردية للجيب. +1. نختار معاملات كثيرة الحدود لتطابق مشتقاتها عند الصفر مشتقات الدالة حتى الدرجة المطلوبة. +2. تتكرر مشتقات الجيب بين الجيب وجيب التمام وسالبيهما، فتعطي عند الصفر 0 و1 و0 و−1 وهكذا. +3. نعوّض بالمعاملات غير الصفرية لنحصل على قوى فردية متناوبة الإشارة، مقسومة على مضروباتها. ## Real world -### الآلات الحاسبة ورقائق الحاسوب -زرّا الجيب وجيب التمام في الآلة الحاسبة يحسبان متسلسلة تايلور مبتورة، لا جدول قيم محفوظًا. +### نماذج الزوايا الصغيرة -### تقريبات فيزيائية -تقريب الزاوية الصغيرة $\sin\theta \approx \theta$، المستخدم للبندولات والبصريات، هو ببساطة الحدّ الأول من هذه المتسلسلة. +استبدال sin θ بـθ هو تقريب الدرجة الأولى، بشرط قياس θ بالراديان. يوضح تقدير الخطأ متى يكون الاستبدال دقيقًا بما يكفي. -### الحلول العددية -برمجيات المحاكاة التي تدفع نظامًا خطوة بخطوة في الزمن تعتمد على مبرهنة تايلور لتحديد حدّ خطأ كل خطوة. +### حسابات عددية محلية -### GPS والملاحة -حسابات مدارات الأقمار الصناعية تستخدم متسلسلات مبتورة لحساب الدوال المثلثية بسرعة كافية للتموضع اللحظي. +تستبدل التقريبات بكثيرات الحدود دالة معقدة بعمليات جمع وضرب قرب مركز مختار. قد تقلص الخوارزميات العملية مجال المدخل أو تستخدم تقريبات أخرى؛ ولا يصف هذا الدرس طريقة عمل كل حاسبة. diff --git a/content/lessons/calculus/taylor-series/en.md b/content/lessons/calculus/taylor-series/en.md index 61e69621..7caa89ee 100644 --- a/content/lessons/calculus/taylor-series/en.md +++ b/content/lessons/calculus/taylor-series/en.md @@ -1,12 +1,9 @@ --- title: Taylor series -summary: >- - A calculator's sine button has no picture of a wave stored inside it — it - rebuilds sin(x) on the spot from nothing but powers of x, and this shows - you that trick, piece by piece. +summary: 'Approximate sine with polynomials built from its derivatives at zero, and check the error away from that centre.' parameters: - N: degree of the polynomial N - x: point x + N: 'N — polynomial degree' + x: 'x — input in radians' variables: [] charts: - title: sin(x) for comparison @@ -18,54 +15,50 @@ charts: ## Try it -1. Set «degree of the polynomial N» to 1. The curve is just a straight line, a poor match away from the centre. -2. Raise «N» step by step. Each new pair of terms bends the curve to hug the true sine wave over a wider stretch. -3. Drag «point x» outward at a high N. Even the best-fitting polynomial eventually pulls away from the true curve. +1. Set N = 1 and x = 0.3. The main graph is the line P₁(x) = x. Its value 0.3 is close to sin(0.3) ≈ 0.29552 on the separate comparison chart. +2. Set N = 5 and x = 2. The polynomial has three nonzero terms, with value about 0.93333; sine is about 0.90930. +3. Set N = 11 and x = 6. The polynomial gives about −2.06026, while sine is about −0.27942. A high degree does not guarantee small error everywhere in the window. ## Real-life examples -1. **A straight-line guess, far from the centre.** With N = 1 and x = 3, the polynomial is just a line — nowhere close to the real curve out there. -2. **A five-term approximation, still fairly close.** With N = 5 and x = 2, the polynomial still tracks sine reasonably well. -3. **The highest available degree, pushed far out.** With N = 11 and x = 6, even this many terms is being tested at the edge of where it still works well. +1. **Linear approximation far from zero.** N = 1 at x = 3 gives 3, compared with sin 3 ≈ 0.14112. The absolute error is about 2.85888. +2. **Degree five, three terms.** N = 5 at x = 2 has absolute error about 0.02404, below 0.05. +3. **Degree eleven, six terms.** N = 11 at x = 6 has absolute error about 1.78084. More terms or a smaller input would be needed for a close approximation here. ## Test yourself -1. Using just N = 1 (a straight line), find x where the approximation is still within 0.01 of sin(x). -2. With N = 5, find how far from the centre you can push x and stay within 0.05 of the true sine curve. -3. With the full N = 11 series, get within 0.05 of sin(x) as far out as you can. +1. With N = 1, find x whose absolute approximation error is less than 0.01. +2. With N = 5, find x whose absolute error is less than 0.05. +3. With N = 11, find x whose absolute error is less than 0.05. As an extra experiment, move farther from zero and see where this tolerance fails. ## Intuition -Think of the sine button on a calculator: it has no picture of a wave stored inside, yet it can compute the sine of any number instantly. That trick works by adding up simple powers of the input, and the curved line on screen is exactly that: the Taylor polynomial, built only from powers of «point x», while the dashed reference curve is the true sine wave. With «degree of the polynomial N» at 1, the polynomial is just a straight line, a poor match away from the centre. +Near zero, sine has value zero and slope one. The line x matches both, so it is the first approximation. Adding −x³/6 also matches sine's third derivative at zero, and the next term x⁵/120 matches its fifth derivative. Each added term uses more local information about the same function. -Raise «N» step by step and each new pair of terms bends the curve to hug the sine wave over a wider stretch. Now drag «point x» outward: even a high-degree polynomial eventually pulls away from the true curve far enough from the centre, because this kind of approximation is only guaranteed to be good close to home. +The control N is the polynomial's degree, not its number of terms. Only odd powers appear because sine's even-order derivatives vanish at zero. The main graph shows the selected finite polynomial, while the separate chart shows sine. They agree closely near the centre but can differ substantially farther away. ## Formal -Near $x=0$, any smooth function can be written $f(x) \approx f(0) + f'(0)x + \dfrac{f''(0)}{2!}x^2 + \cdots$, using more and more derivatives evaluated at the centre. For $\sin x$ this becomes $\sin x \approx x - \dfrac{x^3}{3!} + \dfrac{x^5}{5!} - \dfrac{x^7}{7!} + \cdots$. +The Taylor polynomial of degree N about zero is $P_N(x)=\sum_{j=0}^{N}f^{(j)}(0)x^j/j!$. For sine in radians, the odd-degree polynomial is $P_{2m+1}(x)=\sum_{j=0}^{m}(-1)^j x^{2j+1}/(2j+1)!$. A factorial such as 3! means 3 × 2 × 1. -Each extra term added is called increasing the degree; the sliders here jump by two degrees at a time because sine's Taylor series only has odd powers, its even-order derivatives at 0 all vanish. +For the displayed odd degrees, the error obeys $|\sin x-P_N(x)|\leq |x|^{N+2}/(N+2)!$. Sine's next even coefficient is zero, and all its derivatives have magnitude at most 1, giving this Taylor bound. A bound may be larger than the actual error. ## Advanced -For $\sin x$ the series converges to the exact value for every real $x$, an infinite radius of convergence, but the number of terms needed for a given accuracy still grows the farther $x$ is from the centre. Many functions, such as $1/(1-x)$, have a finite radius of convergence beyond which the series diverges entirely. +The infinite sine series converges to sine at every real input, even though a fixed finite polynomial need not approximate it well far from zero. A general smooth function need not equal its infinite Taylor series. For example, the series for 1/(1 − x) about zero converges only for |x| < 1. Finite approximation, convergence and equality with the function are distinct questions. ## Derivation -1. Start from the general local approximation using derivatives at the centre. -2. Evaluate sine and its derivatives at 0; only the odd ones survive. -3. Substitute those values to get the odd-power series for sine. +1. Choose polynomial coefficients so that its derivatives at zero match the function's derivatives through the required degree. +2. Sine's derivatives cycle through sine, cosine, negative sine and negative cosine, giving values 0, 1, 0, −1 and so on at zero. +3. Substitute the nonzero coefficients to obtain alternating odd powers divided by factorials. ## Real world -### Calculators and computer chips -A calculator's sine and cosine buttons compute a truncated Taylor (or a closely related) series, not a lookup table. +### Small-angle models -### Physics approximations -The small-angle approximation $\sin\theta \approx \theta$, used for pendulums and optics, is just the first term of this series. +Replacing sin θ by θ is the degree-one approximation, with θ in radians. An error estimate tells you when the replacement is accurate enough. -### Numerical solvers -Simulation software that steps a system forward in time relies on Taylor's theorem to bound the error of each step. +### Local numerical calculations -### GPS and navigation -Satellite orbit calculations use truncated series expansions to evaluate trigonometric functions fast enough for real-time positioning. +Polynomial approximations replace a complicated function with additions and multiplications near a chosen centre. Practical algorithms can also reduce the input range or use other approximations; this lesson does not prescribe how every calculator works. From 3d0d6629a276fe491c27e0cb1c5ecfb41206f397 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:36:02 +0300 Subject: [PATCH 078/124] docs: record completed bilingual Calculus review --- content/lessons/EDITORIAL_REVIEW.md | 36 ++++++++++++++--------------- content/lessons/STYLE.en.md | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/content/lessons/EDITORIAL_REVIEW.md b/content/lessons/EDITORIAL_REVIEW.md index f45cc062..b8044cb2 100644 --- a/content/lessons/EDITORIAL_REVIEW.md +++ b/content/lessons/EDITORIAL_REVIEW.md @@ -1,6 +1,6 @@ # Bilingual editorial review -81 of 390 lessons reviewed. 309 remain. +97 of 390 lessons reviewed. 293 remain. A checked lesson has had both language files rewritten or reviewed against its configuration and visualization source. Automated validation alone does not mark a lesson reviewed. Browser interaction and independent learner review remain separate checks. @@ -75,25 +75,25 @@ Scope: every lesson, including summaries, parameter labels, examples, exercises, - [ ] [predator-prey](biology/predator-prey/en.md) · [Arabic](biology/predator-prey/ar.md) - [ ] [sir-epidemic](biology/sir-epidemic/en.md) · [Arabic](biology/sir-epidemic/ar.md) -## calculus (1/17) +## calculus (17/17) -- [ ] [area-under-curve](calculus/area-under-curve/en.md) · [Arabic](calculus/area-under-curve/ar.md) -- [ ] [chain-and-product-rule](calculus/chain-and-product-rule/en.md) · [Arabic](calculus/chain-and-product-rule/ar.md) -- [ ] [continuity](calculus/continuity/en.md) · [Arabic](calculus/continuity/ar.md) +- [x] [area-under-curve](calculus/area-under-curve/en.md) · [Arabic](calculus/area-under-curve/ar.md) +- [x] [chain-and-product-rule](calculus/chain-and-product-rule/en.md) · [Arabic](calculus/chain-and-product-rule/ar.md) +- [x] [continuity](calculus/continuity/en.md) · [Arabic](calculus/continuity/ar.md) - [x] [derivative](calculus/derivative/en.md) · [Arabic](calculus/derivative/ar.md) -- [ ] [differential-equations-intro](calculus/differential-equations-intro/en.md) · [Arabic](calculus/differential-equations-intro/ar.md) -- [ ] [exponential-growth](calculus/exponential-growth/en.md) · [Arabic](calculus/exponential-growth/ar.md) -- [ ] [fundamental-theorem](calculus/fundamental-theorem/en.md) · [Arabic](calculus/fundamental-theorem/ar.md) -- [ ] [gradient](calculus/gradient/en.md) · [Arabic](calculus/gradient/ar.md) -- [ ] [improper-integrals](calculus/improper-integrals/en.md) · [Arabic](calculus/improper-integrals/ar.md) -- [ ] [integral](calculus/integral/en.md) · [Arabic](calculus/integral/ar.md) -- [ ] [limit](calculus/limit/en.md) · [Arabic](calculus/limit/ar.md) -- [ ] [limits-at-infinity](calculus/limits-at-infinity/en.md) · [Arabic](calculus/limits-at-infinity/ar.md) -- [ ] [logistic-growth](calculus/logistic-growth/en.md) · [Arabic](calculus/logistic-growth/ar.md) -- [ ] [one-sided-and-infinite-limits](calculus/one-sided-and-infinite-limits/en.md) · [Arabic](calculus/one-sided-and-infinite-limits/ar.md) -- [ ] [partial-derivatives-saddle](calculus/partial-derivatives-saddle/en.md) · [Arabic](calculus/partial-derivatives-saddle/ar.md) -- [ ] [sum-of-all-numbers](calculus/sum-of-all-numbers/en.md) · [Arabic](calculus/sum-of-all-numbers/ar.md) -- [ ] [taylor-series](calculus/taylor-series/en.md) · [Arabic](calculus/taylor-series/ar.md) +- [x] [differential-equations-intro](calculus/differential-equations-intro/en.md) · [Arabic](calculus/differential-equations-intro/ar.md) +- [x] [exponential-growth](calculus/exponential-growth/en.md) · [Arabic](calculus/exponential-growth/ar.md) +- [x] [fundamental-theorem](calculus/fundamental-theorem/en.md) · [Arabic](calculus/fundamental-theorem/ar.md) +- [x] [gradient](calculus/gradient/en.md) · [Arabic](calculus/gradient/ar.md) +- [x] [improper-integrals](calculus/improper-integrals/en.md) · [Arabic](calculus/improper-integrals/ar.md) +- [x] [integral](calculus/integral/en.md) · [Arabic](calculus/integral/ar.md) +- [x] [limit](calculus/limit/en.md) · [Arabic](calculus/limit/ar.md) +- [x] [limits-at-infinity](calculus/limits-at-infinity/en.md) · [Arabic](calculus/limits-at-infinity/ar.md) +- [x] [logistic-growth](calculus/logistic-growth/en.md) · [Arabic](calculus/logistic-growth/ar.md) +- [x] [one-sided-and-infinite-limits](calculus/one-sided-and-infinite-limits/en.md) · [Arabic](calculus/one-sided-and-infinite-limits/ar.md) +- [x] [partial-derivatives-saddle](calculus/partial-derivatives-saddle/en.md) · [Arabic](calculus/partial-derivatives-saddle/ar.md) +- [x] [sum-of-all-numbers](calculus/sum-of-all-numbers/en.md) · [Arabic](calculus/sum-of-all-numbers/ar.md) +- [x] [taylor-series](calculus/taylor-series/en.md) · [Arabic](calculus/taylor-series/ar.md) ## chemistry (0/13) diff --git a/content/lessons/STYLE.en.md b/content/lessons/STYLE.en.md index 44c2e787..83da3b18 100644 --- a/content/lessons/STYLE.en.md +++ b/content/lessons/STYLE.en.md @@ -37,6 +37,6 @@ Run `pnpm check` after editing. It validates structure, formulas and challenge s ## Reviewed examples and remaining work -See [the lesson-by-lesson review checklist](EDITORIAL_REVIEW.md) for coverage. The Numbers, Functions, Algebra, Discrete, Geometry and Trigonometry sections and the derivative lesson have received a complete bilingual editorial pass under this guide. +See [the lesson-by-lesson review checklist](EDITORIAL_REVIEW.md) for coverage. The Numbers, Functions, Algebra, Discrete, Geometry, Trigonometry and Calculus sections have received a complete bilingual editorial pass under this guide. The remaining lessons still need individual review of their summaries, controls, explanations, examples and challenges. Do not treat a global phrase replacement or a successful build as an editorial review. From ea49971911827cfc1a59b4a71a5ef3201d9b1b84 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:54:11 +0300 Subject: [PATCH 079/124] content: rewrite permutations for first-time learners in both languages --- content/lessons/statistics/permutations/ar.md | 60 +++++++++---------- content/lessons/statistics/permutations/en.md | 59 +++++++++--------- 2 files changed, 56 insertions(+), 63 deletions(-) diff --git a/content/lessons/statistics/permutations/ar.md b/content/lessons/statistics/permutations/ar.md index 7443305d..0f280657 100644 --- a/content/lessons/statistics/permutations/ar.md +++ b/content/lessons/statistics/permutations/ar.md @@ -1,65 +1,61 @@ --- title: 'التباديل: حين يهمّ الترتيب' -summary: >- - كم ترتيبًا مختلفًا لنتائج سباق أو رمز سري؟ حين يهم الترتيب، اضرب الخيارات في بعضها. +summary: 'احسب عدد طرق اختيار عناصر وترتيبها دون تكرار، مثل تحديد المركزين الأول والثاني في سباق.' parameters: - 'n': n — العناصر المتاحة - k: k — الأماكن التي نملؤها + n: 'n — عدد العناصر المختلفة' + k: 'k — عدد الأماكن المراد ملؤها' variables: - - عدد العناصر التي تختار منها - - عدد الأماكن التي تملؤها بالترتيب - - >- - مضروب n، أي حاصل ضرب n في (n−1) في … في 1، وهو عدد طرق ترتيب كل العناصر الـ - n + - 'عدد العناصر المختلفة المتاحة للاختيار' + - 'عدد الأماكن التي نملؤها دون تكرار العنصر' + - 'مضروب n: حاصل ضرب الأعداد الصحيحة من 1 إلى n' --- ## Try it -1. راقب الترتيبات المسرودة تحت القطع وأنت تسحب «k — الأماكن التي نملؤها». -2. لاحظ أن الزوج (1,2) والزوج (2,1) يظهران معًا. الترتيب هنا مهم، تمامًا كالمركزين الأول والثاني في سباق. -3. ارفع «n — العناصر المتاحة» وراقب عدد الترتيبات يكبر أسرع بكثير من عدد القطع. +1. اجعل n = 4 وk = 2. ستجد 12 ترتيبًا؛ فللمكان الأول 4 خيارات، وللثاني 3 خيارات بعد اختيار الأول. +2. ابحث عن الترتيبين اللذين يحتويان على القطعتين 1 و2. تبديل موضعيهما يعطي ترتيبًا آخر، لأن لكل مكان معنى مختلفًا. +3. أبقِ n = 4، وجرّب k = 3 ثم k = 4. العدد في الحالتين 24؛ فبعد ملء ثلاثة أماكن لا يبقى للمكان الرابع إلا خيار واحد. استخدم k لا يتجاوز n؛ فالرسم يقصره على n عند تجاوزه. ## Real-life examples -1. **منصّة تتويج السباق.** وزّع الذهب والفضة والبرونز بين 8 متسابقين بـ336 ترتيبًا مختلفًا. -2. **كتب على رفّ.** رتّب 5 كتب كاملة في صفّ واحد بـ120 ترتيبًا مختلفًا. -3. **رمز الخزانة.** اختيار رمز مرتّب من 3 حروف من بين 6 حروف متاحة، بلا تكرار، يعطي 120 رمزًا ممكنًا. +1. **ثلاث ميداليات.** في سباق يضم 8 متسابقين، دون تعادل، يوجد 8 × 7 × 6 = 336 ترتيبًا لتوزيع الذهبية والفضية والبرونزية. +2. **كتب على رف.** يمكن ترتيب 5 كتب مختلفة في صف واحد بـ5 × 4 × 3 × 2 × 1 = 120 طريقة. +3. **رمز بلا تكرار.** لتكوين رمز من 3 حروف نختارها من 6 حروف مختلفة، دون تكرار الحرف، لدينا 6 × 5 × 4 = 120 رمزًا. ## Test yourself -1. جِد «n — العناصر المتاحة» و«k — الأماكن التي نملؤها» بحيث يكون عدد الترتيبات الممكنة 60 بالضبط. -2. املأ كل الأماكن، بجعل k مساويًا لـ n، واجعل عدد الترتيبات يتجاوز 100. -3. اترك 3 عناصر على الأقل بلا استخدام (n − k ≥ 3)، وأبقِ عدد الترتيبات مع ذلك دون 20. +1. اختر قيمتين تعطيان 60 ترتيبًا بالضبط. +2. اجعل k مساويًا لـn، بحيث يزيد عدد الترتيبات على 100. +3. اترك ثلاثة عناصر على الأقل دون اختيار، واجعل عدد الترتيبات أقل من 20. ## Intuition -انظر إلى الترتيبات المسرودة تحت القطع. عند «n — العناصر المتاحة» يساوي 4 و«k — الأماكن التي نملؤها» يساوي 2 تحصل على 12 ترتيبًا. أي قطعة من الأربع تأخذ المكان الأول، ثم أي قطعة من الثلاث الباقية تأخذ الثاني، فيكون 4 × 3 يساوي 12. يظهر الزوج (1,2) والزوج (2,1) معًا لأن الترتيب هنا مهم، تمامًا كالمركزين الأول والثاني في سباق. +يريد أربعة طلاب اختيار طالب يقدّم العرض وآخر يدوّن الملاحظات. يمكن لأي واحد منهم تقديم العرض، وبعد اختياره يبقى ثلاثة للدور الثاني. لكل خيار أول ثلاثة خيارات ثانية، فيكون المجموع 12 توزيعًا للدورين. وإذا تبادل طالبان دوريْهما، فهذا توزيع مختلف. -زد «k — الأماكن التي نملؤها» واحدًا فتتفرّع من كل ترتيب موجود n − k نهاية جديدة، لذلك يكبر العدد بسرعة كبيرة. اجعل «k — الأماكن التي نملؤها» مساويًا لـ«n — العناصر المتاحة» وأنت ترتّب كل العناصر، وهذا العدد يُكتب مضروب n. +نسمي هذا النوع من الاختيار «التباديل»: نختار عناصر دون تكرار، ويهمنا ترتيبها. يقل عدد الخيارات المتاحة بعد كل اختيار. لكن إضافة مكان لا تزيد العدد دائمًا؛ فعند الوصول إلى آخر عنصر لا يبقى مجال للاختيار. يعرض الرسم 60 ترتيبًا على الأكثر، وقد يخفي القائمة إذا كبر العدد كثيرًا، أما العدد المكتوب فيشمل جميع الترتيبات. ## Formal -$P(n,k) = n(n-1)\cdots(n-k+1) = \dfrac{n!}{(n-k)!}$، مع $0! = 1$ حتى يكون $P(n,n) = n!$. +إذا كان لدينا n عنصرًا مختلفًا، وكان k عددًا صحيحًا يحقق $0\le k\le n$، فإن عدد طرق اختيارها وترتيبها دون تكرار هو $P(n,k)=n(n-1)\cdots(n-k+1)=\frac{n!}{(n-k)!}$. نقرأ الرمز n! «مضروب n»، وهو حاصل ضرب الأعداد الصحيحة من 1 إلى n. -تعدّ التباديل التطبيقات المتباينة من مجموعة ذات $k$ عنصرًا إلى مجموعة ذات $n$ عنصرًا. +نعرّف $0!=1$. يوجد اختيار فارغ واحد عند عدم اختيار أي عنصر، ولذلك $P(n,0)=1$. وعند ترتيب العناصر كلها نحصل على $P(n,n)=n!$. أما إذا سمحنا بتكرار العنصر، فلكل مكان n خيارات، ويصبح العدد $n^k$. ## Advanced -يُظهر تقريب ستيرلنغ $n! \sim \sqrt{2\pi n}\,(n/e)^n$ كم ينمو المضروب بسرعة انفجارية. $\log n!$ من رتبة $n \log n$، ولهذا يصبح البحث الشامل بين كل الترتيبات ميؤوسًا منه بعد بضع عشرات من العناصر. +يمكن حساب العدد التالي من العلاقة P(n,k+1) = P(n,k)(n−k). وهي تفسّر زيادة العدد حين تبقى خيارات كثيرة، وتساويه عند k = n−1 وk = n. وإذا كانت بعض العناصر متطابقة، أو كانت بعض الترتيبات ممنوعة، فلا بد من تعديل طريقة العد. ## Derivation -1. اضرب عدد الخيارات المتاحة لكل مكان. يقلّ المخزون واحدًا بعد كل اختيار. -2. اكتب الجداء كنسبة بين مضروبين. تختصر العوامل من $n-k$ فما دون. -3. هذه الصيغة المختصرة. عند $k = n$ يكون المقام $0! = 1$. +1. نملأ الأماكن بالترتيب: n خيارات للأول، ثم n−1 للثاني، وهكذا حتى نملأ k أماكن. +2. نضرب البسط والمقام في العوامل الناقصة نفسها لكتابة حاصل الضرب باستخدام المضروب. +3. نختصر العوامل المضافة. وتعريف 0! = 1 يجعل الصيغة صالحة عند اختيار العناصر كلها أيضًا. ## Real world -### كلمات المرور وأرقام PIN -رقم PIN من 4 خانات بلا تكرار يعطي P(10,4) = 5040 احتمالًا. ومع السماح بالتكرار يصبح العدد 10⁴ أي 10000. +### توزيع الأدوار -### منصّات التتويج -وزّع الذهب والفضة والبرونز بين 8 متسابقين وستحصل على P(8,3) = 336 طريقة. +اختيار رئيس وأمين سر وأمين صندوق يختلف عن اختيار مجموعة من ثلاثة أشخاص. تبديل شخصين يغيّر توزيع المسؤوليات. -### الجدولة -رتّب 10 مهام وستحصل على 10! أي نحو 3.6 مليون جدول ممكن، ولهذا يلجأ المخطّطون إلى طرق تقريبية. +### الرموز السرية + +تحقق أولًا من السماح بالتكرار. رمز من أربع خانات، يُسمح بأن يبدأ بصفر، له 5040 احتمالًا دون تكرار الأرقام، و10000 مع التكرار. وعدد الرموز وحده لا يكفي للحكم على أمان النظام. diff --git a/content/lessons/statistics/permutations/en.md b/content/lessons/statistics/permutations/en.md index 1eba8dec..78539ef5 100644 --- a/content/lessons/statistics/permutations/en.md +++ b/content/lessons/statistics/permutations/en.md @@ -1,64 +1,61 @@ --- title: 'Permutations: when order matters' -summary: >- - Count how many different ordered lists — race results, PINs, or a lineup — - you can make by choosing and arranging items from a set. +summary: 'Count ordered selections without repeating an item, such as choosing first and second place in a race.' parameters: - 'n': n — items available - k: k — places to fill + n: 'n — different items available' + k: 'k — ordered places to fill' variables: - - how many different items you can choose from - - 'how many places you fill, in order' - - 'n factorial: n × (n−1) × … × 1, the ways to line up all n items' + - 'number of distinct available items' + - 'number of places, filled without repeating an item' + - 'n factorial: product of the integers from 1 to n' --- ## Try it -1. Watch the arrangements listed below the tokens as you drag «k — places to fill». -2. Notice (1,2) and (2,1) both appear: here order matters, like first and second place in a race. -3. Raise «n — items available» and watch the count of arrangements grow much faster than the tokens did. +1. Set n = 4 and k = 2. There are 12 arrangements: 4 choices for the first place, then 3 for the second. +2. Find the arrangements with tokens 1 and 2. Reversing them gives a different arrangement because the places have different meanings. +3. Keep n = 4 and set k = 3, then 4. Both counts are 24: after filling three places, only one item is left for the fourth. Keep k at or below n; the diagram caps it at n. ## Real-life examples -1. **Race podium.** Awarding gold, silver, and bronze among 8 runners can happen in 336 different orders. -2. **Books on a shelf.** Arranging all 5 books in a row can be done in 120 different orders. -3. **Locker code.** Picking an ordered 3-letter code from 6 available letters, no repeats, gives 120 possible codes. +1. **Three medals.** With 8 runners and no ties, there are 8 × 7 × 6 = 336 ways to award gold, silver and bronze. +2. **A row of books.** Five different books have 5 × 4 × 3 × 2 × 1 = 120 orders on a shelf. +3. **A code without repeats.** A three-letter code made from six different letters has 6 × 5 × 4 = 120 possibilities if each letter can be used only once. ## Test yourself -1. Find «n — items available» and «k — places to fill» that give exactly 60 possible arrangements. -2. Fill every place, k equal to n, and make the count of arrangements exceed 100. -3. Leave at least 3 items unused (n − k ≥ 3), yet keep the count of arrangements under 20. +1. Make the number of ordered selections exactly 60. +2. Set k equal to n and make the count greater than 100. +3. Leave at least three items unused, with fewer than 20 ordered selections. ## Intuition -Look at the arrangements listed below the tokens. With «n — items available» at 4 and «k — places to fill» at 2 you get 12: any of the 4 tokens can go first, then any of the 3 that are left can go second, and 4 × 3 = 12. The pair (1,2) and the pair (2,1) both appear, because here order matters — like first and second place in a race. +Suppose four students are choosing a speaker and a note-taker. Any student can speak. Once the speaker is chosen, three students remain for the other role. Each of the four first choices has three possible partners, giving 12 assignments. Swapping the two students changes who does each job. -Raise «k — places to fill» by one and every existing arrangement sprouts n − k new endings, so the count grows very fast. Set «k — places to fill» equal to «n — items available» and you are lining up every item — that count is written n factorial. +This is an ordered selection without repetition, called a permutation. The available choices decrease by one after each selection. The count does not always increase when you add a place: filling the very last place adds no choice. The screen lists at most 60 arrangements and omits the list for very large counts; the total still includes them all. ## Formal -$P(n,k) = n(n-1)\cdots(n-k+1) = \dfrac{n!}{(n-k)!}$, with $0! = 1$ so that $P(n,n) = n!$. +For n distinct items and an integer k with $0\le k\le n$, the number of ordered selections without repetition is $P(n,k)=n(n-1)\cdots(n-k+1)=\frac{n!}{(n-k)!}$. The symbol n! means the product of the integers from 1 to n. -Permutations count injective maps from a $k$-element set into an $n$-element set. +We define $0!=1$. Selecting nothing gives one empty selection, so $P(n,0)=1$; arranging everything gives $P(n,n)=n!$. If repetition is allowed instead, each place has n choices and the count is $n^k$. ## Advanced -Stirling’s approximation $n! \sim \sqrt{2\pi n}\,(n/e)^n$ shows how explosively factorials grow: $\log n!$ is of order $n \log n$, which is why brute-force search over orderings becomes hopeless beyond a few dozen items. +A useful check is P(n,k+1) = P(n,k)(n−k). This relation explains both the rapid growth while many items remain and the equal counts for k = n−1 and k = n. If items are indistinguishable or some orders are forbidden, the basic formula needs adjustment. ## Derivation -1. Multiply the choices for each place: the pool shrinks by one after every pick. -2. Write the product as a ratio of factorials: the factors from $n-k$ downward cancel. -3. The compact formula. For $k = n$ the denominator is $0! = 1$. +1. Fill the places in sequence. There are n choices, then n−1, continuing until k places are filled. +2. Multiply by the missing factors in both numerator and denominator to express the product using factorials. +3. Cancel those extra factors. The convention 0! = 1 also covers choosing all n items. ## Real world -### Passwords and PINs -A 4-digit PIN with no repeated digit has P(10,4) = 5040 possibilities; with repeats allowed it is 10⁴ = 10 000. +### Assigned roles -### Race podiums -Gold, silver and bronze among 8 runners can be awarded in P(8,3) = 336 ways. +Choosing a chair, a secretary and a treasurer differs from choosing a three-person group. Exchanging two people changes the assignment. -### Scheduling -Ordering 10 tasks gives 10! ≈ 3.6 million schedules — which is why planners rely on heuristics. +### Codes + +Check the repetition rule before counting. A four-digit code with leading zero allowed has 5040 possibilities without repeated digits, but 10000 with repeats. This count alone does not establish how secure a code system is. From 1e268bd980e5a4ab35e7979f1b5d9970fea01c9b Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:54:11 +0300 Subject: [PATCH 080/124] content: rewrite combinations for first-time learners in both languages --- content/lessons/statistics/combinations/ar.md | 59 +++++++++--------- content/lessons/statistics/combinations/en.md | 60 +++++++++---------- 2 files changed, 54 insertions(+), 65 deletions(-) diff --git a/content/lessons/statistics/combinations/ar.md b/content/lessons/statistics/combinations/ar.md index eb931b46..df19930b 100644 --- a/content/lessons/statistics/combinations/ar.md +++ b/content/lessons/statistics/combinations/ar.md @@ -1,66 +1,61 @@ --- title: 'التوافيق: حين لا يهمّ الترتيب' -summary: >- - كم فريقًا مختلفًا يمكن تكوينه من مجموعة، حين لا يهم الترتيب؟ +summary: 'احسب عدد المجموعات الممكنة عندما يهمنا من نختار، ولا يهم ترتيب اختيارهم.' parameters: - 'n': n — العناصر المتاحة - k: k — عدد ما نختاره + n: 'n — عدد العناصر المختلفة' + k: 'k — عدد عناصر المجموعة' variables: - - عدد العناصر المتاحة لتختار منها - - حجم المجموعة التي تختارها - - تُقرأ «n اختيار k»، وهي عدد المجموعات الممكنة + - 'عدد العناصر المختلفة المتاحة' + - 'عدد العناصر التي نختارها دون تكرار' + - 'عدد المجموعات التي تضم k عناصر من أصل n' --- ## Try it -1. راقب المجموعات المسرودة تحت القطع وأنت تسحب «k — عدد ما نختاره». -2. لاحظ أن (1,2) و(2,1) تظهران مرة واحدة فقط في القائمة. الترتيب لا يهم في المجموعة. -3. قارن اختيار عنصرين باختيار الثلاثة الباقين. عدد المجموعات نفسه في الحالتين. +1. اجعل n = 5 وk = 2. يعرض الرسم 10 مجموعات. القطعتان 1 و2 تكوّنان المجموعة نفسها، سواء ذكرنا 1 أولًا أم 2. +2. أبقِ n = 5 وغيّر k إلى 3. يبقى العدد 10؛ فكل اختيار لقطعتين نتركهما يحدد مجموعة من ثلاث قطع نأخذها. +3. جرّب k = 0 ثم k = 5. لكل منهما اختيار واحد: المجموعة الفارغة أو المجموعة الكاملة. استخدم k لا يتجاوز n؛ فالرسم يقصره على n عند تجاوزه. ## Real-life examples -1. **إضافات البيتزا.** اختيار 3 إضافات من قائمة 8 يعطي 56 بيتزا مختلفة، مهما كان ترتيب اختيارك للإضافات. -2. **مجموعة الدراسة.** تختار مجموعة دراسة من 4 أشخاص من بين 9 زملاء بـ126 طريقة مختلفة. -3. **مثلجات بنكهتين.** اختر نكهتين من 6 نكهات في محل مثلجات. الشوكولاتة ثم الفانيليا مثل الفانيليا ثم الشوكولاتة، وهذا يعطي 15 كأسًا ممكنة. +1. **إضافات البيتزا.** اختيار ثلاث إضافات مختلفة من ثمانٍ يعطي 56 مجموعة. كل إضافة إما نختارها أو نتركها. +2. **مجموعة دراسة.** يمكن اختيار أربعة طلاب من تسعة بـ126 طريقة، ما دامت المجموعة لا تتضمن أدوارًا مختلفة للأعضاء. +3. **نكهتان مختلفتان.** اختيار نكهتين مختلفتين من ست نكهات للمثلجات يعطي 15 زوجًا. لا يشمل هذا العدد اختيار النكهة نفسها مرتين. ## Test yourself -1. جِد «n — العناصر المتاحة» و«k — عدد ما نختاره» بحيث يكون عدد المجموعات الممكنة 10 بالضبط. -2. اختر k لا يتجاوز نصف n، واجعل عدد المجموعات يتخطّى 50. -3. اجعل «n — العناصر المتاحة» يساوي 10، وجِد «k — عدد ما نختاره» الذي يعطي أكبر عدد ممكن من المجموعات (250 على الأقل). +1. اختر قيمتين تعطيان 10 مجموعات بالضبط. +2. اختر عددًا لا يتجاوز نصف العناصر المتاحة، واجعل عدد المجموعات أكبر من 50. +3. اجعل n = 10، وابحث عن k يعطي 250 مجموعة على الأقل. ## Intuition -الآن مجموعة (1,2) ومجموعة (2,1) الشيء نفسه، فريق من اثنين لا ترتيب فيه. قارن هذا بدرس التباديل. عند «n — العناصر المتاحة» يساوي 5 و«k — عدد ما نختاره» يساوي 2 كان هناك 20 زوجًا مرتّبًا، لكن 10 مجموعات فقط، لأن كل مجموعة من اثنين عُدّت مرتين، مرة لكل ترتيب. +نريد اختيار طالبين من خمسة لتكوين فريق. إذا ميّزنا بين الاختيار الأول والثاني، فلدينا 5 × 4 = 20 اختيارًا. لكن كل فريق ظهر مرتين؛ مرة بدأنا فيها بالطالب الأول، ومرة بالآخر. نقسم 20 على 2، فنحصل على 10 فرق مختلفة. نسمي هذا النوع من الاختيار «التوافيق». -هذه هي الفكرة كاملة. عُدّ الترتيبات المرتّبة ثم اقسم على $k!$، أي عدد طرق خلط كل مجموعة. لاحظ التماثل أيضًا. اختيار 2 من 5 لتأخذهما يماثل اختيار 3 من 5 لتترك الباقي، لذلك $C(5,2) = C(5,3)$. +ولو اخترنا ثلاثة طلاب، لظهرت كل مجموعة بستة ترتيبات. وبصورة عامة، نقسم عدد الترتيبات على $k!$، وهو عدد طرق ترتيب أفراد المجموعة الواحدة. ويمكننا أيضًا تحديد المجموعة بذكر من تركناهم خارجها؛ لذلك $C(5,2)=C(5,3)$. يعرض الرسم 60 مجموعة على الأكثر، لكن العدد المكتوب يشمل المجموعات كلها. ## Formal -$\dbinom{n}{k} = \dfrac{P(n,k)}{k!} = \dfrac{n!}{k!\,(n-k)!}$، ويتبع منها التماثل $\dbinom{n}{k} = \dbinom{n}{n-k}$ مباشرة. +إذا كان لدينا n عنصرًا مختلفًا، وكان k عددًا صحيحًا يحقق $0\le k\le n$، فإن عدد المجموعات دون تكرار هو $\binom{n}{k}=\frac{n!}{k!(n-k)!}$. نقرأ الرمز «اختيار k من n». يظهر كل عنصر مختار مرة واحدة، ولا نعطي عناصر المجموعة ترتيبًا محددًا. -قاعدة باسكال $\dbinom{n}{k} = \dbinom{n-1}{k-1} + \dbinom{n-1}{k}$ تقول إن العنصر الأخير إما في المجموعة أو خارجها. +اختيار العناصر التي نأخذها يحدد أيضًا العناصر التي نتركها، ولهذا $\binom{n}{k}=\binom{n}{n-k}$. وباستخدام $0!=1$ نجد أن اختيار لا شيء واختيار كل شيء يعطيان مجموعة واحدة في كل حالة: $\binom{n}{0}=\binom{n}{n}=1$. ## Advanced -نظرية ذات الحدّين $(a+b)^n = \sum_k \binom{n}{k} a^k b^{n-k}$ تسمّي هذه الأعداد. فهي تعدّ كم حدًّا من حدود الفكّ الـ $2^n$ يحمل بالضبط $k$ عاملًا من $a$. واجمع الصف كلّه فتحصل على $\sum_k \binom{n}{k} = 2^n$، أي عدد المجموعات الجزئية لمجموعة ذات $n$ عنصرًا. +تعتمد قاعدة باسكال على تقسيم المجموعات بحسب عنصر معين. المجموعة التي تضم هذا العنصر تحتاج إلى اختيار k−1 عنصرًا آخر من n−1، والمجموعة التي لا تضمه تحتاج إلى اختيار k عناصر من n−1. مجموع العددين يساوي C(n,k). لهذا نجمع عددين متجاورين في مثلث باسكال لنحصل على العدد الواقع تحتهما. ## Derivation -1. ابدأ بالاختيارات المرتّبة. -2. كل مجموعة تُكتب بـ $k!$ ترتيبًا مختلفًا، وكل ترتيب عُدّ على حدة. -3. اقسم على ذلك فتعدّ كل مجموعة مرة واحدة بالضبط. +1. نبدأ بعدّ الاختيارات التي يهم فيها الترتيب، دون تكرار أي عنصر. +2. لكل مجموعة $k!$ ترتيبًا، ولذلك حسبنا المجموعة الواحدة بهذا العدد من المرات. +3. نقسم على عدد هذه الترتيبات، فتصبح كل مجموعة محسوبة مرة واحدة. ## Real world -### اليانصيب -اختر 6 أرقام من 49 فتحصل على C(49,6) = 13983816 بطاقة ممكنة. تفوز بطاقة واحدة بالجائزة الكبرى باحتمال 1 من نحو 14 مليونًا. +### اختيار لجنة -### أيدي البوكر -يوجد C(52,5) = 2598960 يدًا من خمس ورقات. عدّ أيدي كل نوع يعطي احتمال ظهوره. +اختيار لجنة من ثلاثة أشخاص من بين اثني عشر شخصًا يعطي 220 مجموعة. وإذا أردنا توزيع مناصب مختلفة داخل اللجنة، فنحتاج إلى خطوة أخرى في العد. -### الفرق واللجان -اختر لجنة من 3 أشخاص من بين 12 زميلًا فتحصل على C(12,3) = 220 لجنة ممكنة. +### سحب عينة -### الوراثة وأخذ العيّنات -عدد طرق سحب عيّنة من 10 من مجتمع قوامه 1000 يحدّد مدى دقة الاستطلاع. +اختيار خمس أوراق مختلفة من مجموعة تضم 52 ورقة يعطي 2598960 مجموعة. إذا كانت فرص المجموعات متساوية، نحسب احتمال حدث معين بقسمة عدد المجموعات التي تحقق شرطه على هذا العدد الكلي. diff --git a/content/lessons/statistics/combinations/en.md b/content/lessons/statistics/combinations/en.md index d565b853..430d31a1 100644 --- a/content/lessons/statistics/combinations/en.md +++ b/content/lessons/statistics/combinations/en.md @@ -1,67 +1,61 @@ --- title: 'Combinations: when order does not matter' -summary: >- - Count how many different teams, hands, or lottery picks you can form from a - set of items, when only who's in the group matters, not the order. +summary: 'Count groups whose members matter but whose order does not, such as choosing two students for a team.' parameters: - 'n': n — items available - k: k — how many to pick + n: 'n — different items available' + k: 'k — items in each group' variables: - - how many different items you can choose from - - the size of the group you pick - - 'read “n choose k”: the number of possible groups' + - 'number of distinct available items' + - 'number selected without repetition' + - 'n choose k: number of groups with k members' --- ## Try it -1. Watch the groups listed below the tokens as you drag «k — how many to pick». -2. Notice (1,2) and (2,1) appear only once in that list: order does not matter for a group. -3. Compare picking 2 items to picking the other 3: the number of groups is the same either way. +1. Set n = 5 and k = 2. The diagram counts 10 groups. Tokens 1 and 2 form the same group whichever token you name first. +2. Keep n = 5 and change k to 3. There are still 10 groups: every pair left out determines one group of three. +3. Try k = 0, then k = 5. Each gives one choice: the empty group or the whole set. Keep k at or below n; the diagram caps it at n. ## Real-life examples -1. **Pizza toppings.** Choosing 3 toppings from a menu of 8 gives 56 different pizzas, however you rank the toppings you chose. -2. **Study group.** Picking a 4-person study group from 9 classmates can be done 126 different ways. -3. **Double scoop.** Choosing 2 flavours from 6 at an ice cream shop — chocolate then vanilla is the same order as vanilla then chocolate — gives 15 possible scoops. +1. **Pizza toppings.** Choosing three different toppings from eight gives 56 selections. Each topping is either included or left out. +2. **Study group.** Choosing four students from nine gives 126 groups, provided there are no separate roles within the group. +3. **Two flavours.** Choosing two different ice-cream flavours from six gives 15 pairs. This count excludes choosing the same flavour twice. ## Test yourself -1. Find «n — items available» and «k — how many to pick» that give exactly 10 possible groups. -2. Pick a k no larger than half of n, and make the number of groups exceed 50. -3. Set «n — items available» to 10 and find the «k — how many to pick» that gives the largest possible number of groups (at least 250). +1. Make the number of groups exactly 10. +2. Choose no more than half the available items and make the number of groups exceed 50. +3. Set n = 10 and find k giving at least 250 groups. ## Intuition -Now a group of (1,2) and a group of (2,1) are the same thing — a team of two, not a ranking. Compare with the permutations lesson: with «n — items available» at 5 and «k — how many to pick» at 2 there were 20 ordered pairs, but only 10 groups, because every group of 2 had been counted twice, once per ordering. +Choose two students from five for a team. Counting a first and second choice gives 5 × 4 = 20 selections. But each team appears twice: once with each student chosen first. Divide by 2 to get 10 different teams. This kind of selection is called a combination. -That is the whole idea: count the ordered arrangements, then divide by the $k!$ ways each group can be shuffled. Notice the symmetry too — choosing 2 of 5 to take is the same as choosing 3 of 5 to leave behind, so $C(5,2) = C(5,3)$. +For a group of three, each group appears in six orders. More generally, divide the ordered count by $k!$, the number of orders of a group of k distinct items. Choosing whom to leave out also identifies the group: $C(5,2)=C(5,3)$. The screen shows at most 60 groups, while the total counts every group. ## Formal -$\dbinom{n}{k} = \dfrac{P(n,k)}{k!} = \dfrac{n!}{k!\,(n-k)!}$; the symmetry $\dbinom{n}{k} = \dbinom{n}{n-k}$ follows at once. +For n distinct items and an integer k satisfying $0\le k\le n$, the number of groups without repetition is $\binom{n}{k}=\frac{n!}{k!(n-k)!}$. Read the symbol as “n choose k.” A group contains each selected item once and has no assigned order. -Pascal’s rule $\dbinom{n}{k} = \dbinom{n-1}{k-1} + \dbinom{n-1}{k}$: either the last item is in the group or it is not. +Because choosing the included items also chooses the excluded ones, $\binom{n}{k}=\binom{n}{n-k}$. With $0!=1$, both choosing nothing and choosing everything give one group: $\binom{n}{0}=\binom{n}{n}=1$. ## Advanced -The binomial theorem $(a+b)^n = \sum_k \binom{n}{k} a^k b^{n-k}$ names these numbers: they count how many of the $2^n$ expansion terms have exactly $k$ factors of $a$. Summing the row gives $\sum_k \binom{n}{k} = 2^n$, the number of subsets of an $n$-set. +Pascal’s rule separates groups according to one particular item: groups that contain it choose their other k−1 members from n−1 items; groups that omit it choose all k members from those n−1. Adding these two counts gives C(n,k). This is why adjacent entries in Pascal’s triangle add to the entry below them. ## Derivation -1. Start with ordered selections. -2. Every group can be written in $k!$ orders, and each order was counted separately. -3. Divide to count each group exactly once. +1. First count selections in which order matters, with no repeated item. +2. Each group has $k!$ possible orders, so the ordered count includes every group that many times. +3. Divide by that repetition factor to count each group once. ## Real world -### Lotteries -Choosing 6 numbers from 49: C(49,6) = 13 983 816 tickets, so one ticket wins the jackpot with probability 1 in 14 million. +### A committee -### Poker hands -There are C(52,5) = 2 598 960 five-card hands; counting the hands of each type gives their probabilities. +A three-person committee chosen from twelve people has 220 possible memberships. Giving its members different offices would introduce another counting step. -### Teams and committees -Picking a 3-person committee from 12 colleagues: C(12,3) = 220 possible committees. +### Sampling -### Genetics and sampling -How many ways a sample of 10 can be drawn from a population of 1000 decides how precise a survey can be. +Selecting five different cards from a 52-card deck gives 2598960 possible hands. If every hand is equally likely, the probability of a specified event is the number of hands meeting it divided by this total. From e35d9af10b96a1a67f570167486b75a93e0028f9 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:54:11 +0300 Subject: [PATCH 081/124] content: rewrite probability-basics for first-time learners in both languages --- .../statistics/probability-basics/ar.md | 60 +++++++++--------- .../statistics/probability-basics/en.md | 61 +++++++++---------- 2 files changed, 58 insertions(+), 63 deletions(-) diff --git a/content/lessons/statistics/probability-basics/ar.md b/content/lessons/statistics/probability-basics/ar.md index e5e3be09..31663366 100644 --- a/content/lessons/statistics/probability-basics/ar.md +++ b/content/lessons/statistics/probability-basics/ar.md @@ -1,64 +1,62 @@ --- title: ما معنى الاحتمال؟ -summary: >- - ارمِ العملة مرات كثيرة فتستقر نسبة الصور عند رقم بين 0 و1. هذا هو الاحتمال. +summary: 'ميّز بين احتمال حدوث نتيجة، ونسبة ظهورها فعلًا في تجربة لها عدد محدود من المحاولات.' parameters: - p: p — فرصة النجاح في محاولة واحدة - 'N': N — عدد المحاولات - speed: محاولات في الثانية + p: 'p — احتمال النجاح في المحاولة' + N: 'N — عدد المحاولات الكلي' + speed: 'سرعة عرض المحاولات' variables: - - الاحتمال الحقيقي للنجاح، يساوي 0.5 لقطعة نقد عادلة - - عدد مرات تكرار التجربة - - نسبة النجاحات المرصودة حتى الآن (الخط البرتقالي) + - 'احتمال النجاح الذي نحدده في النموذج' + - 'عدد المحاولات المقرر إجراؤها' + - 'عدد النجاحات مقسومًا على المحاولات المكتملة' --- ## Try it -1. راقب الخط البرتقالي في أول الأمر. يقفز بعنف. ثلاث صور متتالية أمر طبيعي. -2. دعه يعمل. بعد بضع مئات من الرميات يستقر الخط قرب الخط المتقطع عند p. -3. اضغط «من جديد». مسار مختلف والوجهة نفسها. هذه الوجهة هي معنى الاحتمال. +1. اجعل p = 0.5 وN = 200. يمثل الخط المتقطع احتمال النجاح، ويمثل الخط المتغير عدد النجاحات مقسومًا على عدد المحاولات المكتملة. +2. قارن بداية التجربة بما يحدث لاحقًا. يقل تأثير النتيجة الجديدة كلما زاد عدد المحاولات السابقة، لكن الخط قد يبتعد عن p في بعض الأحيان. +3. أعد التجربة بالإعدادات نفسها. ستختلف النتائج غالبًا. تغيير السرعة يغيّر سرعة العرض، ولا يغيّر احتمال النجاح. ## Real-life examples -1. **رمي قطعة نقد عادلة.** ارمِ قطعة نقد عادلة 200 مرة، باحتمال حقيقي 50% في كل رمية. يستقر الخط البرتقالي قرب المنتصف. -2. **توقّع الأيام الممطرة.** احتمال المطر الحقيقي 30% كل يوم. تابع 360 يومًا وسترى الخط البرتقالي يستقر قرب 3 أيام ممطرة من كل 10. -3. **رمي نرد لوجه واحد.** ارمِ نردًا مرارًا وراقب وجهًا واحدًا محددًا، باحتمال نحو 15%. بعد 600 رمية يستقر الخط البرتقالي قرب ذلك المعدّل. +1. **نموذج لعملة عادلة.** عند p = 0.5 وN = 200، يكون العدد المتوقع للنجاحات 100. ليس من الضروري أن تنتهي كل تجربة بهذا العدد بالضبط. +2. **قطعة حمراء.** تخيّل كيسًا فيه 3 قطع حمراء و7 زرقاء. نسحب قطعة ثم نعيدها ونخلط القطع قبل السحب التالي. إذا اعتبرنا الأحمر نجاحًا، فإن p = 0.3، والعدد المتوقع خلال 360 سحبة هو 108. +3. **مولّد عشوائي.** إذا أعطى المولّد نجاحًا باحتمال 0.15، فالعدد المتوقع في 600 محاولة هو 90. هذا الاحتمال لا يساوي احتمال وجه محدد في حجر نرد عادل ذي ستة أوجه؛ فذلك يساوي 1/6. ## Test yourself -1. اجعل متوسط عدد النجاحات على كل المحاولات (p × N) يساوي 300 بالضبط. -2. اختر احتمالًا منخفضًا أقل من 20%، ومع ذلك اجعل عدد النجاحات الكلي المتوقع أكثر من 100. -3. شغّل 1500 محاولة على الأقل باحتمال قريب من العدل، ضمن 0.05 من 50%. +1. اجعل العدد المتوقع للنجاحات، p × N، مساويًا لـ300. +2. أبقِ p أقل من 0.2، واجعل العدد المتوقع للنجاحات أكبر من 100. +3. استخدم 1500 محاولة على الأقل، واختر p لا يبتعد عن 0.5 بأكثر من 0.05. ## Intuition -كل نقطة في الأعلى محاولة واحدة، برتقالية للنجاح ورمادية للفشل. الخط البرتقالي يمثّل نسبة النجاحات حتى الآن. في البداية يتذبذب بعنف، فثلاث صور متتالية أمر عادي تمامًا، لكنه يهدأ مع تراكم المحاولات ويقترب من الخط المتقطّع عند $p$. +للعملة العادلة نتيجتان متساويتان في الاحتمال. إذا سمّينا ظهور أحد الوجهين «نجاحًا»، فاحتماله 1/2. هذا لا يعني أن كل رميتين تعطيان نجاحًا واحدًا. قد نحصل على أربعة نجاحات في خمس رميات، فتكون النسبة التي شاهدناها 4/5. الاحتمال يصف النموذج، أما النسبة المشاهدة فتصف نتائج التجربة التي أجريناها. -الاحتمال هو تلك النسبة على المدى الطويل. لا يخبرك بنتيجة المحاولة القادمة، بل بالجزء الذي تتوقّعه عبر محاولات كثيرة. غيّر $p$ إلى 0.2 فيستقرّ الخط عند واحد من كل خمسة. اضغط «من جديد» وستسلك التجربة مسارًا مختلفًا لكنها تصل إلى الوجهة نفسها. +تحدد $p$ هنا احتمال النجاح في كل محاولة مستقلة داخل المحاكاة. يعدّ المحور الأفقي المحاولات، ويبين المحور الرأسي نسبة النجاحات. وتعرض النقاط آخر 40 نتيجة على الأكثر. تميل النسبة إلى الاقتراب من p مع زيادة المحاولات، لكن لا يلزم أن تنتهي تجربة محدودة عندها بالضبط. كذلك لا تغيّر سلسلة من النجاحات أو الإخفاقات احتمال المحاولة المستقلة التالية. ## Formal -حين تتساوى احتمالات النتائج يكون $P(A) = |A| / |\Omega|$. وعمومًا يتحقّق $0 \le P(A) \le 1$ و$P(\Omega) = 1$ و$P(A \cup B) = P(A) + P(B)$ للحادثتين المنفصلتين. +النتيجة هي أحد ما يمكن أن يحدث، والحدث A مجموعة من النتائج. إذا كان عدد النتائج محدودًا وكانت متساوية الاحتمال، فإن $P(A)=|A|/|\Omega|$، حيث تعني الخطوط الرأسية عدد عناصر المجموعة. إذا لم تتساوَ الاحتمالات، فلا تكفي قسمة عدد النتائج وحدها. -قاعدة المتمّم $P(A^c) = 1 - P(A)$ تحوّل أحيانًا عدًّا صعبًا إلى عدّ سهل. +يقع كل احتمال بين الصفر والواحد: $0\le P(A)\le1$. والحدث ومتممه يشملان جميع الاحتمالات، لذلك $P(A^c)=1-P(A)$. بعد N محاولة تكون النسبة المشاهدة $\hat p_N=\text{successes}/N$، أي عدد النجاحات مقسومًا على N، وقد تختلف عن احتمال النجاح نفسه. ## Advanced -تعرّف مسلّمات كولموغوروف فضاء احتمال $(\Omega, \mathcal{F}, P)$ حيث $P$ جمعي عدّيًا على جبر سيغما. عندها تصبح التكرارات بعيدة المدى مبرهنة تُثبَت، وهي قانون الأعداد الكبيرة، لا تعريفًا. وهذا ما يسمح بتطبيق الاحتمال على حدث فريد كما على حدث متكرّر. +يفسر قانون الأعداد الكبيرة اقتراب النسبة من p عند تكرار محاولات مستقلة لها الاحتمال نفسه. لكنه لا يعرّف كل استخدامات الاحتمال؛ فقد نستخدم الاحتمال لوصف عدم اليقين حول حدث يقع مرة واحدة. والمنطقة المظللة تقريب مبني على التوزيع الطبيعي عند كل عدد ثابت من المحاولات، وليست ضمانًا لبقاء المسار كله داخلها. وقد يكون التقريب ضعيفًا مع العينات الصغيرة. ## Derivation -1. اذكر كل نتيجة ممكنة. الحادثة مجموعة من النتائج. -2. حين تتساوى احتمالات النتائج يصبح الاحتمال نسبة بين عددين. وهنا تدخل التباديل والتوافيق. -3. تتقارب النسبة المرصودة إلى الاحتمال الحقيقي، وهذا هو قانون الأعداد الكبيرة. +1. نحدد النتائج الممكنة، ثم نحدد أيًّا منها يحقق الحدث الذي ندرسه. +2. إذا كانت النتائج متساوية الاحتمال، نقسم عدد النتائج التي تحقق الحدث على عدد النتائج كلها. +3. بتكرار محاولات مستقلة وثابتة الاحتمال، نستطيع تقدير الاحتمال من النسبة المشاهدة. الاقتراب نتيجة تخص التكرار الطويل، وليس وعدًا بنتيجة تجربة محدودة بعينها. ## Real world -### توقعات الطقس -«احتمال المطر 30%» تعني أن المطر يهطل في نحو 3 من كل 10 أيام مثل هذا اليوم. +### حجر النرد -### التأمين -تحدّد شركات التأمين الأقساط بناءً على تكرار المطالبات على المدى الطويل عبر عملاء كثيرين متشابهين. +في حجر نرد عادل ذي ستة أوجه، يشمل حدث «عدد زوجي» ثلاثة أوجه. احتماله إذن 3/6، أي 1/2. -### مراقبة الجودة -يجد مصنع عيبين في 1000 قطعة فيقدّر احتمال العيب بـ 0.002، ويعرف أن 3 عيوب متتالية قد تكون مجرد حظّ. +### فحص عينة + +إذا وجدنا قطعتين تحملان علامة في عينة من 100 قطعة، نقدّر نسبة القطع ذات العلامة بـ0.02. قد تعطي عينة أخرى تقديرًا مختلفًا، وقد تضللنا عينة لا تمثل المجموعة الأصلية مهما كبر حجمها. diff --git a/content/lessons/statistics/probability-basics/en.md b/content/lessons/statistics/probability-basics/en.md index 5e995787..37ce19e9 100644 --- a/content/lessons/statistics/probability-basics/en.md +++ b/content/lessons/statistics/probability-basics/en.md @@ -1,65 +1,62 @@ --- title: What probability means -summary: >- - Watch a real coin-flip experiment settle into a share between 0 and 1 — that - settled share is what "probability" means. +summary: 'Distinguish the chance of a result from the proportion you observe in a finite experiment.' parameters: - p: p — chance of success on one trial - 'N': N — number of trials - speed: trials per second + p: 'p — probability of success per trial' + N: 'N — total trials' + speed: 'animation speed' variables: - - 'the true probability of a success — for a fair coin, 0.5' - - how many times the experiment is repeated - - the proportion of successes observed so far (orange line) + - 'success probability specified by the model' + - 'planned number of trials' + - 'observed successes divided by completed trials' --- ## Try it -1. Watch the orange line at the start: it jumps around wildly. Three heads in a row is normal. -2. Let it run. After a few hundred flips the line settles near the dashed line at p. -3. Press «again». A different path, the same destination. That destination is what probability means. +1. Set p = 0.5 and N = 200. The dashed line marks the chance of success; the changing line shows successes divided by trials completed so far. +2. Compare the first few trials with later ones. Each new result has less influence as the total grows, but the line can still move away from p. +3. Restart the experiment with the same settings. Results will usually differ. Changing the speed affects playback, not the chance of success. ## Real-life examples -1. **Fair coin flips.** Flipping a coin 200 times, with a true 50% chance each flip, shows the orange line settle near the middle. -2. **Rainy days forecast.** With a 30% true daily chance of rain, tracking 360 days shows the orange line settle near 3 rainy days in 10. -3. **Rolling a chosen number.** Rolling a die repeatedly for one specific face, about a 15% chance, over 600 rolls shows the orange line settle near that rate. +1. **Fair coin model.** At p = 0.5 and N = 200, the expected number of successes is 100. An individual run need not have exactly 100. +2. **Coloured counter.** Imagine drawing from a bag containing 3 red and 7 blue counters, replacing and mixing after each draw. Counting red as success gives p = 0.3; over 360 draws the expected count is 108. +3. **Random generator.** A generator with success probability 0.15 has an expected 90 successes in 600 trials. This is not the probability of one face of a fair six-sided die, which is 1/6. ## Test yourself -1. Make the expected number of successes over all trials (p × N) equal exactly 300. -2. With a low probability (under 20%), still expect more than 100 successes in total. -3. Run at least 1500 trials with a probability close to fair, within 0.05 of 50%. +1. Make p × N, the expected total successes, equal 300. +2. Keep p below 0.2 while making the expected total greater than 100. +3. Use at least 1500 trials and choose p within 0.05 of 0.5. ## Intuition -Each dot along the top is one trial: orange for success, grey for failure. The orange line is the proportion of successes so far. At the start it jumps around wildly — three heads in a row is nothing unusual — but as trials pile up it calms down and hugs the dashed line at $p$. +A fair coin has two equally likely outcomes. Calling one side “success” gives it probability 1/2. That does not mean every pair of flips contains one success. Five flips could contain four successes, giving an observed proportion of 4/5. The probability belongs to the model; the observed proportion describes the results collected. -Probability is that long-run share. It does not say what the next trial will do; it says what fraction you should expect over many trials. Change $p$ to 0.2 and the line settles at one in five. Press “again”: a different path, the same destination. +Here $p$ sets the chance of success on each independent simulated trial. The horizontal axis counts trials, and the vertical axis shows the proportion of successes. The dots show up to the latest 40 outcomes. Larger samples tend to give proportions closer to p, but no finite run must end exactly there. A streak also does not change the chance on the next independent trial. ## Formal -For equally likely outcomes, $P(A) = |A| / |\Omega|$. In general $0 \le P(A) \le 1$, $P(\Omega) = 1$, and $P(A \cup B) = P(A) + P(B)$ for disjoint events. +An outcome is one possible result; an event A is a collection of outcomes. In a finite set of equally likely outcomes, $P(A)=|A|/|\Omega|$, where the vertical bars mean “number of outcomes.” Without equal likelihood, a ratio of counts is not sufficient. -The complement rule $P(A^c) = 1 - P(A)$ often turns a hard count into an easy one. +Probabilities satisfy $0\le P(A)\le1$. An event and its complement exhaust the possibilities, so $P(A^c)=1-P(A)$. After N trials, the observed proportion is $\hat p_N=\text{successes}/N$; its value can differ from the underlying probability. ## Advanced -Kolmogorov’s axioms define a probability space $(\Omega, \mathcal{F}, P)$ with $P$ countably additive on a σ-algebra. Long-run frequencies are then a *theorem* (the law of large numbers), not the definition — which is what lets probability apply to one-off events as well as repeatable ones. +For independent trials with the same success probability, the law of large numbers explains why the proportion tends toward p as the sample grows. It does not define all probability: probability can also describe uncertainty about a single event. The shaded band is a normal approximation at each fixed trial count, not a guarantee for the entire path; it can be inaccurate in small samples. ## Derivation -1. List every outcome; an event is a set of outcomes. -2. When outcomes are equally likely, probability is a ratio of counts — which is where permutations and combinations come in. -3. The observed proportion converges to the probability: the law of large numbers. +1. Identify all possible outcomes and the outcomes belonging to the event of interest. +2. If the outcomes are equally likely, divide the event's count by the total count. +3. Repeating independent trials with unchanged probability lets us estimate that probability from the observed proportion. Convergence is a long-run result, not a promise about a particular finite run. ## Real world -### Weather forecasts -“30% chance of rain” means: on days like this one, it rains about 3 times in 10. +### Games of chance -### Insurance -Premiums are set from the long-run frequency of claims across many similar customers. +For a fair six-sided die, the event “even number” contains three of the six outcomes, so its probability is 1/2. -### Quality control -A factory that finds 2 defects in 1000 items estimates a defect probability of 0.002 — and knows a run of 3 defects can still be luck. +### Checking a process + +Finding 2 marked items in a sample of 100 estimates a marked-item proportion of 0.02. Another sample may give a different estimate, and an unrepresentative sample can mislead even when it is large. From df28ff635aec55ee690595f08bd9cc08f8ada484 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:54:11 +0300 Subject: [PATCH 082/124] content: rewrite law-of-large-numbers for first-time learners in both languages --- .../statistics/law-of-large-numbers/ar.md | 60 +++++++++--------- .../statistics/law-of-large-numbers/en.md | 61 +++++++++---------- content/ui/ar.yaml | 2 +- content/ui/en.yaml | 2 +- 4 files changed, 60 insertions(+), 65 deletions(-) diff --git a/content/lessons/statistics/law-of-large-numbers/ar.md b/content/lessons/statistics/law-of-large-numbers/ar.md index ec1cb67c..7c5c3e96 100644 --- a/content/lessons/statistics/law-of-large-numbers/ar.md +++ b/content/lessons/statistics/law-of-large-numbers/ar.md @@ -1,16 +1,15 @@ --- title: 'قانون الأعداد الكبيرة' -summary: >- - كلما جمعت بيانات أكثر هدأ المتوسط واستقر. وهنا ترى بأي سرعة يستقر. +summary: 'افهم لماذا تصبح النسبة أكثر استقرارًا مع زيادة المشاهدات المستقلة، ولماذا نحتاج إلى أربعة أمثال العينة لخفض الخطأ المعياري إلى النصف.' parameters: - p: p — الاحتمال الحقيقي - 'N': N — عدد المحاولات - speed: محاولات في الثانية + p: 'p — احتمال النجاح الثابت' + N: 'N — عدد المحاولات الكلي' + speed: 'سرعة عرض المحاولات' variables: - - نسبة النجاحات بعد N محاولة - - المسافة النموذجية بين النسبة وp، أي الخطأ المعياري + - 'عدد النجاحات مقسومًا على N بعد اكتمال المحاولات' + - 'الانحراف المعياري للنسبة عند تكرار أخذ العينات' charts: - - title: يتناقص الخطأ النموذجي للنسبة مثل 1/√N + - title: الخطأ المعياري للنسبة بحسب عدد المحاولات xLabel: N (المحاولات) yLabel: σ لـ p̂ series: @@ -19,51 +18,50 @@ charts: ## Try it -1. راقب القمع المظلّل يضيق مع تراكم المحاولات، فهو يحدد أين تبقى 95% من التجارب. -2. اسحب «N — عدد المحاولات» إلى 20. القمع عريض هنا، وتبتعد النتيجة المفردة كثيرًا عن «p — الاحتمال الحقيقي». -3. اسحب «N — عدد المحاولات» نحو 2000. يضيق القمع ويلتفّ بإحكام حول «p — الاحتمال الحقيقي». +1. اجعل p = 0.5 وN = 50. تختلف النسبة المشاهدة بين تجربة وأخرى، وخطؤها المعياري نحو 0.071، أي 7.1 نقاط مئوية. +2. أبقِ p = 0.5 وزد N إلى 200. تبدأ تجربة جديدة، ويصبح الخطأ المعياري 0.035 تقريبًا، أي نصف قيمته السابقة. مع ذلك، قد لا تكون نتيجة هذه التجربة بالذات أقرب إلى p. +3. قارن N = 500 وN = 2000 في الرسم السفلي. زيادة حجم العينة إلى أربعة أمثاله تخفض الخطأ المعياري إلى النصف مرة أخرى. وفي الرسم الرئيسي تضيق المنطقة المظللة كلما زاد عدد المحاولات المكتملة. ## Real-life examples -1. **استطلاع تجريبي صغير.** سؤال 50 شخصًا فقط، بمعدّل حقيقي 50%، يعطي تقديرًا قد يخطئ بأكثر من 10 نقاط مئوية. -2. **استطلاع رأي وطني.** استطلاع لـ1000 ناخب، بتأييد حقيقي قرب 45%، دقيق إلى نحو ±3%، وهو «هامش الخطأ» المعتاد في الأخبار. -3. **تجربة سريرية كبيرة.** متابعة 2000 مريض بمعدّل حدث 20% تضيّق عدم اليقين بما يكفي لرصد تأثيرات حقيقية صغيرة. +1. **خمسون محاولة.** عند p = 0.5 وN = 50، يبلغ الخطأ المعياري نحو 0.071. لذلك لا نستغرب اختلاف النسبة المشاهدة عن 50% بعدة نقاط مئوية. +2. **ألف محاولة.** عند p = 0.45 وN = 1000، يكون الخطأ المعياري نحو 0.0157. وبالتقريب الطبيعي، تقع نحو 95% من النسب النهائية على مسافة لا تتجاوز 3.1 نقاط مئوية تقريبًا من 45%. +3. **ألفا محاولة.** عند p = 0.2 وN = 2000، يكون الخطأ المعياري نحو 0.00894، أي 0.89 نقطة مئوية. هذا يصف تفاوت النتائج في النموذج، ولا يكفي وحده للحكم على قدرة تجربة على اكتشاف أثر معين. ## Test yourself -1. صغّر الخطأ المعياري إلى نحو 3%، كاستطلاع وطني. -2. شغّل 1000 محاولة على الأقل مع إبقاء الخطأ المعياري دون 2%. -3. أبقِ عدد المحاولات عند 100 أو أقل، وادفع الخطأ المعياري فوق 10%. +1. اجعل الخطأ المعياري قريبًا من 0.03، أي 3 نقاط مئوية. +2. استخدم 1000 محاولة على الأقل، واجعل الخطأ المعياري أقل من 0.02. +3. استخدم 100 محاولة على الأكثر، واجعل الخطأ المعياري أكبر من 0.1. ## Intuition -القمع المظلّل يضمّ 95% من التجارب. يكون عريضًا في البداية. بعد 10 رميات لقطعة نقد عادلة، حين تكون «N — عدد المحاولات» = 10، تُظهر النتيجة غالبًا 30% أو 70% صورة. يضيق القمع مع نمو «N — عدد المحاولات». لكن انتبه كيف يضيق. تحتاج أربعة أضعاف عدد المحاولات لتنصّف عرضه. +إذا نجحنا مرة في محاولتين، فالنسبة 1/2. نجاح واحد إضافي يرفعها إلى 2/3، وهو تغير كبير. أما بعد 500 نجاح في 1000 محاولة، فإن نجاحًا إضافيًا يغيّر النسبة إلى 501/1001 فقط. يقل تأثير النتيجة الواحدة لأننا نقسم على عدد أكبر من المحاولات. -قانون الجذر التربيعي هذا يفسّر لماذا تكون استطلاعات 1000 شخص دقيقة إلى نحو ±3% بينما استطلاعات 100 شخص لا تتعدّى دقتها ±10%. ويفسّر أيضًا لماذا يضمن الكازينو ربحًا على مدى سنة كاملة رغم أن أي ليلة واحدة مجرّد مقامرة. +عندما تكون المحاولات مستقلة واحتمال النجاح ثابتًا، يقل تفاوت النسبة بين التجارب المتكررة مع زيادة حجم العينة. هذا لا يعني أن كل محاولة جديدة تقلل الخطأ، ولا أن الإخفاقات يجب أن تعوّض النجاحات السابقة. تقرّب المنطقة المظللة نطاقًا يضم 95% من النتائج عند عدد ثابت من المحاولات، ولا تعني أن 95% من المسارات الكاملة تبقى داخلها. ## Formal -ينصّ القانون الضعيف على أنه لكل $\varepsilon > 0$ يتحقّق $P(|\hat p_N - p| > \varepsilon) \to 0$ عندما $N \to \infty$. +في N محاولة مستقلة لها احتمال نجاح ثابت p، نكتب $\hat p_N=\frac{1}{N}\sum_{i=1}^N X_i$، حيث تساوي كل X واحدًا عند النجاح وصفرًا عند الإخفاق. متوسط هذه النسبة هو p، وخطؤها المعياري $\sigma_{\hat p}=\sqrt{p(1-p)/N}$. والخطأ المعياري هو الانحراف المعياري للنسبة عند تكرار أخذ العينات. -بما أن $\hat p_N$ متوسط $N$ متغيّر مستقل من نوع برنولي($p$)، فإن $\mathrm{Var}(\hat p_N) = p(1-p)/N$ ومنه $\sigma_{\hat p} = \sqrt{p(1-p)/N}$. +ينص قانون الأعداد الكبيرة الضعيف على أنه لكل مقدار ثابت $\varepsilon>0$، فإن $P(|\hat p_N-p|>\varepsilon)\to0$ عندما $N\to\infty$. أي إن احتمال تجاوز الخطأ لأي حد موجب نختاره يقترب من الصفر. لا يحدد القانون نتيجة بعينها لعينة محدودة. ## Advanced -ينصّ القانون القوي على أن $\hat p_N \to p$ شبه يقين. ومتباينة تشيبيشيف تعطي القانون الضعيف مباشرة عبر $P(|\hat p_N - p| > \varepsilon) \le p(1-p)/(N\varepsilon^2)$. وتحسّن مبرهنة النهاية المركزية هذا إلى الحزام الطبيعي $p \pm 1.96\sigma_{\hat p}$ الظاهر في الرسم. +تعطي متباينة تشيبيشيف الحد الأعلى p(1−p)/(Nε²) لاحتمال تجاوز الخطأ ε، وهذا الحد يقترب من الصفر. أما النطاق الشائع p ± 1.96 مضروبًا في الخطأ المعياري فيعتمد على تقريب طبيعي، ويكون أنسب عندما يكون العدد المتوقع لكل من النجاحات والإخفاقات كبيرًا بما يكفي. وقص النطاق عند 0 و1 لا يجعل تغطيته دقيقة للعينات الصغيرة. ## Derivation -1. محاولة واحدة، نجاح (1) باحتمال $p$. -2. نجمع تباينات المحاولات المستقلة، والقسمة على $N$ تقسم التباين على $N^2$. -3. ينكمش انتشار المتوسط مع الجذر التربيعي لحجم العيّنة. +1. نرمز للنجاح بواحد وللإخفاق بصفر. متوسط المشاهدة الواحدة p وتباينها p(1−p). +2. يسمح الاستقلال بجمع التباينات. وعند قسمة المجموع على N، نقسم تباينه على مربع N. +3. نأخذ الجذر التربيعي للتباين لنحصل على الخطأ المعياري. استبدال N بـ4N يقسم هذا الخطأ على اثنين. ## Real world -### استطلاعات الرأي -«هامش الخطأ ±3%» لاستطلاع من 1000 شخص يساوي بالضبط 1.96·√(0.25/1000). +### تكرار القياس -### الكازينوهات وشركات التأمين -كل رهان غير مؤكّد، لكن متوسط ملايين الرهانات مؤكّد. تتحوّل أفضلية الدار إلى دخل مضمون. +قد يقلل متوسط قياسات مستقلة أثر الخطأ العشوائي. لكنه لا يزيل انحرافًا ثابتًا في جهاز القياس. -### اختبارات A/B -يحتاج تقرير ما إذا كانت صفحة ويب جديدة أفضل إلى زوّار كافين، حتى يضيق القمع أكثر من الفرق الذي تأمل رصده. +### الاستطلاعات + +زيادة حجم عينة عشوائية تمثل المجتمع تقلل التفاوت الناتج عن أخذ العينة. لكنها لا تصلح تلقائيًا غياب فئات معينة، أو انحياز السؤال، أو عدم الاستجابة. وتتأثر دقة الاستطلاع الفعلي بطريقة اختيار العينة أيضًا. diff --git a/content/lessons/statistics/law-of-large-numbers/en.md b/content/lessons/statistics/law-of-large-numbers/en.md index 3e5ee763..7e4b0cf3 100644 --- a/content/lessons/statistics/law-of-large-numbers/en.md +++ b/content/lessons/statistics/law-of-large-numbers/en.md @@ -1,17 +1,15 @@ --- title: Law of large numbers -summary: >- - Averages settle down as you collect more data — and the formula tells you - exactly how fast. +summary: 'See why a proportion usually becomes more reliable with more independent observations, and why four times the sample halves its standard error.' parameters: - p: p — true probability - 'N': N — number of trials - speed: trials per second + p: 'p — constant success probability' + N: 'N — total trials' + speed: 'animation speed' variables: - - the proportion of successes after N trials - - the typical distance between the proportion and p — the standard error + - 'successes divided by N completed trials' + - 'standard deviation of the proportion across repeated samples' charts: - - title: Typical error of the proportion shrinks like 1/√N + - title: Standard error of the proportion against sample size xLabel: N (trials) yLabel: σ of p̂ series: @@ -20,51 +18,50 @@ charts: ## Try it -1. Watch the shaded funnel: it marks where 95% of experiments stay, and it narrows as trials pile up. -2. Drag «N — number of trials» down to 20. The funnel is wide: a single result can swing far from «p — true probability». -3. Drag «N — number of trials» up toward 2000. The funnel squeezes tight around «p — true probability». +1. Set p = 0.5 and N = 50. The observed proportion varies from run to run; its standard error is about 0.071, or 7.1 percentage points. +2. Keep p = 0.5 and increase N to 200. This starts a new run. The standard error is 0.035, about half as large, although this particular run need not be closer. +3. Compare N = 500 and N = 2000 in the lower chart. Multiplying the sample size by four again halves the standard error. The shaded region in the main plot narrows with the number of completed trials. ## Real-life examples -1. **Small pilot survey.** Asking just 50 people, with a true rate of 50%, gives an estimate that can easily be off by 10 percentage points or more. -2. **National opinion poll.** A poll of 1000 voters, true support near 45%, is accurate to roughly ±3% — the standard "margin of error" you see quoted in the news. -3. **Large clinical trial.** Following 2000 patients with a 20% event rate narrows the uncertainty enough to detect even small real effects. +1. **Fifty trials.** With p = 0.5 and N = 50, the standard error is about 0.071. A result several percentage points from 50% is unsurprising. +2. **A thousand trials.** With p = 0.45 and N = 1000, the standard error is about 0.0157. A normal approximation puts about 95% of final proportions within roughly 3.1 percentage points of 45%. +3. **Two thousand trials.** With p = 0.2 and N = 2000, the standard error is about 0.00894, or 0.89 percentage points. This measures variability under the model, not whether an experiment can detect a particular effect. ## Test yourself -1. Shrink the standard error to about 3%, like a national poll. -2. Run at least 1000 trials while keeping the standard error below 2%. -3. Keep the trial count at 100 or fewer, yet push the standard error above 10%. +1. Make the standard error approximately 0.03, or 3 percentage points. +2. Use at least 1000 trials and make the standard error less than 0.02. +3. Use no more than 100 trials and make the standard error greater than 0.1. ## Intuition -The shaded funnel is where 95% of experiments stay. It is wide at the start — after 10 flips of a fair coin, «N — number of trials» = 10, the result often shows 30% or 70% heads — and it narrows as «N — number of trials» grows. But look at how it narrows: to halve the width you need four times as many trials. +After one success in two trials, the proportion is 1/2. One more success changes it to 2/3, a large shift. After 500 successes in 1000 trials, one additional success changes it only to 501/1001. Each new observation has less influence when many observations are already included. -That square-root law is why polls of 1000 people are accurate to about ±3% while polls of 100 are only good to ±10%, and why a casino is sure to profit over a year even though any single night is a gamble. +Under independent trials with a constant probability, the proportion becomes less variable across repeated experiments as the sample size grows. This does not mean every new trial reduces the error, or that failures must compensate for earlier successes. The shaded band approximates 95% coverage at each fixed trial count; it is not a region that 95% of whole paths stay inside. ## Formal -Weak law: for every $\varepsilon > 0$, $P(|\hat p_N - p| > \varepsilon) \to 0$ as $N \to \infty$. +For N independent trials with the same success probability p, let $\hat p_N=\frac{1}{N}\sum_{i=1}^N X_i$, where each X is 1 for success and 0 otherwise. Its mean is p and its standard error is $\sigma_{\hat p}=\sqrt{p(1-p)/N}$. Standard error is the standard deviation of the proportion across repeated samples. -Since $\hat p_N$ is a mean of $N$ independent Bernoulli($p$) variables, $\mathrm{Var}(\hat p_N) = p(1-p)/N$, hence $\sigma_{\hat p} = \sqrt{p(1-p)/N}$. +The weak law of large numbers says that for every fixed $\varepsilon>0$, $P(|\hat p_N-p|>\varepsilon)\to0$ as $N\to\infty$. Thus the chance of an error larger than any chosen positive tolerance tends to zero. It does not specify an exact result for a finite sample. ## Advanced -The strong law says $\hat p_N \to p$ almost surely. Chebyshev’s inequality gives the weak law directly: $P(|\hat p_N - p| > \varepsilon) \le p(1-p)/(N\varepsilon^2)$. The central limit theorem sharpens this to the normal band $p \pm 1.96\sigma_{\hat p}$ shown in the picture. +Chebyshev's inequality bounds the probability of an error exceeding ε by p(1−p)/(Nε²), which tends to zero. The familiar band p ± 1.96 times the standard error uses a normal approximation; it is most useful when the expected counts of both successes and failures are sufficiently large. Clipping the band to [0,1] does not make small-sample coverage exact. ## Derivation -1. One trial: a success (1) with probability $p$. -2. Variances of independent trials add; dividing by $N$ divides the variance by $N^2$. -3. The spread of the average shrinks with the square root of the sample size. +1. Encode a success as 1 and a failure as 0. One such observation has mean p and variance p(1−p). +2. Independence lets the variances add. Dividing the sum by N divides its variance by N squared. +3. Take the square root of the variance to obtain the standard error. Replacing N with 4N divides it by two. ## Real world -### Opinion polls -The “margin of error ±3%” of a 1000-person poll is exactly 1.96·√(0.25/1000). +### Repeated measurements -### Casinos and insurers -Each bet is uncertain; the average over millions of bets is not. The house edge becomes a guaranteed income. +Averaging independent measurements can reduce random error. It does not remove a systematic offset in the instrument. -### A/B testing -Deciding whether a new web page converts better needs enough visitors for the funnel to be narrower than the difference you hope to detect. +### Surveys + +Larger representative random samples reduce sampling variability. They do not automatically repair missing groups, biased questions or nonresponse. An actual survey's uncertainty also depends on its sampling design. diff --git a/content/ui/ar.yaml b/content/ui/ar.yaml index 35c4eab0..c189c84c 100644 --- a/content/ui/ar.yaml +++ b/content/ui/ar.yaml @@ -220,7 +220,7 @@ coin.successes: النجاحات coin.proportion: النسبة حتى الآن coin.gap: البعد عن p coin.again: ↻ من جديد -coin.band: المنطقة المظللة هي حيث تبقى 95% من التجارب +coin.band: 'التظليل: نطاق تقريبي لـ95% من النتائج عند كل عدد ثابت من المحاولات' bayes.hint: كل فرد من 1000 شخص. اسحب لتغيير مدى شيوع الحالة. bayes.tp: مريض ونتيجته موجبة bayes.fp: سليم ونتيجته موجبة diff --git a/content/ui/en.yaml b/content/ui/en.yaml index 9d094976..1789597a 100644 --- a/content/ui/en.yaml +++ b/content/ui/en.yaml @@ -220,7 +220,7 @@ coin.successes: successes coin.proportion: proportion so far coin.gap: distance from p coin.again: ↻ again -coin.band: 'shaded: where 95% of runs stay' +coin.band: 'shaded: approximate 95% range at each fixed trial count' bayes.hint: Everyone in a population of 1000. Drag to change how common the condition is. bayes.tp: ill, test positive bayes.fp: healthy, test positive From 315cf1177c6018d0ab06ead7140ab11b10b2a4a7 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:54:47 +0300 Subject: [PATCH 083/124] content: rewrite binomial-distribution for first-time learners in both languages --- .../statistics/binomial-distribution/ar.md | 63 +++++++++--------- .../statistics/binomial-distribution/en.md | 64 +++++++++---------- 2 files changed, 58 insertions(+), 69 deletions(-) diff --git a/content/lessons/statistics/binomial-distribution/ar.md b/content/lessons/statistics/binomial-distribution/ar.md index ea61bff5..71962043 100644 --- a/content/lessons/statistics/binomial-distribution/ar.md +++ b/content/lessons/statistics/binomial-distribution/ar.md @@ -1,68 +1,63 @@ --- title: التوزيع ذو الحدّين -summary: >- - ارمِ عملة 10 مرات. ما احتمال كل عدد ممكن من الصور؟ +summary: 'احسب احتمال عدد معين من النجاحات في محاولات مستقلة، عندما يكون عدد المحاولات واحتمال النجاح ثابتين.' parameters: - 'n': n — عدد المحاولات - p: p — فرصة النجاح في كل مرة - k: k — عدد النجاحات + n: 'n — عدد المحاولات' + p: 'p — احتمال النجاح في المحاولة' + k: 'k — عدد النجاحات المختار' variables: - - عدد النجاحات في n محاولة - - عدد طرق توزيع k نجاحًا بين n محاولة - - المتوسط، أي ما تحصل عليه في المعدّل - - مقدار الانتشار حول المتوسط + - 'عدد النجاحات في n محاولة' + - 'عدد طرق تحديد مواضع النجاحات k' + - 'العدد المتوقع للنجاحات' + - 'الانحراف المعياري لعدد النجاحات' --- ## Try it -1. راقب الأعمدة. كل عمود يمثّل احتمال الحصول على هذا العدد بالضبط من النجاحات، من أصل «n — عدد المحاولات» محاولة. -2. حرّك منزلق «k — عدد النجاحات» بين الأعمدة واقرأ ارتفاع العمود الأوسط الطويل. هذه هي النتيجة الأرجح. -3. ارفع «n — عدد المحاولات» نحو 60. تتحوّل الأعمدة المسننة إلى جرس أملس متماثل. هذا هو التوزيع الطبيعي، ويظهر من تلقاء نفسه. +1. اجعل n = 10 وp = 0.5 وk = 5. يعطي العمود المميز احتمالًا يقارب 0.246؛ فحتى العدد الأكثر احتمالًا يظهر في أقل من ربع التجارب. +2. غيّر k وحده إلى 3. احتمال ثلاثة نجاحات بالضبط نحو 0.117، أما الاحتمال التراكمي فنحو 0.172 لأنه يجمع الأعداد 0 و1 و2 و3. +3. أبقِ n = 10 وغيّر p إلى 0.2. ينتقل المتوسط إلى 2، ولا يعود شكل الأعمدة متماثلًا. اجعل k بين 0 وn؛ فالعدد المميز في الرسم لا يتجاوز n. ## Real-life examples -1. **عدد صور قطعة النقد.** ارمِ قطعة نقد عادلة 10 مرات، فاحتمال ظهور 5 صور بالضبط لا يتجاوز ربع المرات، رغم أن 5 هي العدد الأرجح وحده. -2. **لاعبة الرميات الحرة.** لاعبة كرة سلة تسجّل 70% من رمياتها الحرة وترمي 20 مرة، ويعرض المخطط احتمال أن تصيب 15 رمية بالضبط. -3. **فحص عيوب المصنع.** دفعة من 50 قطعة لكل واحدة منها فرصة 2% لتكون معيبة، ويعرض المخطط احتمال ألا تحوي الدفعة كلها أي قطعة معيبة. +1. **عشر رميات عادلة.** احتمال خمسة نجاحات بالضبط هو 252/1024 ≈ 0.246. متوسط العدد خمسة، لكن بقية الأعداد مجتمعة أكثر احتمالًا بكثير. +2. **التدرب على التصويب.** نفترض أن 20 رمية مستقلة، واحتمال النجاح في كل منها 0.7. احتمال النجاح في 15 رمية بالضبط نحو 0.179. وقد لا تحقق الرميات الفعلية هذه الافتراضات. +3. **قطع تحمل علامة.** إذا كانت لدينا 50 قطعة مستقلة، واحتمال وجود علامة على كل منها 0.02، فإن احتمال عدم وجود أي علامة يساوي 0.98⁵⁰ ≈ 0.364. والعدد المتوقع للقطع ذات العلامة واحد. ## Test yourself -1. اضبط «n — عدد المحاولات» و«p — فرصة النجاح في كل مرة» حتى يصبح متوسط عدد النجاحات (n × p) يساوي 6 بالضبط. -2. جِد قيمًا لـ«k — عدد النجاحات» يتجاوز فيها احتمال هذه النتيجة بالذات 30%. -3. اجعل انتشار النتائج المحتملة، أي انحرافها المعياري، نحو 3 نجاحات. +1. اجعل العدد المتوقع للنجاحات، n × p، مساويًا لـ6. +2. اختر n وp وعددًا صالحًا k، بحيث يزيد احتمال k نجاحات بالضبط على 0.3. +3. اجعل الانحراف المعياري لعدد النجاحات قريبًا من 3. ## Intuition -ارمِ 10 قطع نقد عادلة. خمس صور بالضبط هي النتيجة الأرجح، لكنها تقع في نحو ربع المرات فقط، وتعرض الأعمدة على الشاشة كل الاحتمالات معًا. حرّك «k — عدد النجاحات» إلى 3 واقرأ ارتفاع العمود: احتمال ثلاث صور يساوي $\binom{10}{3}/2^{10} = 120/1024$، وهذا بالضبط ما تعرضه القراءة. +لنرمِ عملة عادلة ثلاث مرات مستقلة. يمكن أن نحصل على نجاحين بثلاثة ترتيبات: نجاح ثم نجاح ثم إخفاق، أو نجاح ثم إخفاق ثم نجاح، أو إخفاق ثم نجاح ثم نجاح. احتمال كل ترتيب 1/8، فيكون احتمال نجاحين 3/8. نضرب الاحتمالات لحساب ترتيب واحد، ثم نجمع احتمالات الترتيبات التي تعطي العدد المطلوب. -الآن حرّك «p — فرصة النجاح في كل مرة» إلى 0.2 فينزلق تلّ الأعمدة يسارًا ويميل. ارفع «n — عدد المحاولات» إلى 60 بدلًا من ذلك، فيتحوّل التلّ إلى جرس أملس ومتماثل. هذا الجرس هو التوزيع الطبيعي، ويظهر من تلقاء نفسه. +يطبق توزيع ذي الحدين هذه الفكرة على كل عدد ممكن من النجاحات. يمثل كل عمود عددًا، وليس ترتيبًا واحدًا للنتائج. تغيير k يختار عمودًا آخر دون تغيير التوزيع، أما تغيير n أو p فيغيّر التوزيع نفسه. يحدد الخط الرأسي المتقطع المتوسط، الذي قد لا يكون عددًا صحيحًا أو نتيجة ممكنة لتجربة واحدة. ## Formal -$X \sim \mathrm{Bin}(n,p)$ يعني أن $P(X=k) = \binom{n}{k}p^k(1-p)^{n-k}$ لـ $k = 0,\dots,n$، وأن $E[X] = np$ و$\mathrm{Var}(X) = np(1-p)$. +في n محاولة مستقلة، لكل منها احتمال نجاح ثابت p، يحقق عدد النجاحات X العلاقة $P(X=k)=\binom{n}{k}p^k(1-p)^{n-k}$ للأعداد الصحيحة $0\le k\le n$. تعدّ التوافيق ترتيبات النجاحات، وتعطي القوى احتمال كل ترتيب منها. -يبلغ مجموع الاحتمالات 1 بحسب نظرية ذات الحدّين: $\sum_k \binom{n}{k}p^k(1-p)^{n-k} = (p + 1 - p)^n = 1$. +المتوسط هو $E[X]=np$، والانحراف المعياري هو $\sigma=\sqrt{np(1-p)}$. المتوسط يصف معدل عدد النجاحات عبر تجارب كثيرة، والانحراف المعياري يصف تفاوت الأعداد. أما الاحتمال التراكمي $P(X\le k)$ فيجمع احتمالات الأعداد من 0 إلى k، بما فيها k نفسه. ## Advanced -دي موافر ولابلاس يبيّنان أنه عند $n$ كبير يقترب $\mathrm{Bin}(n,p) \approx \mathcal N(np, np(1-p))$، وهي أول مبرهنة نهاية مركزية (1733). وحين $n \to \infty$ مع ثبات $np = \lambda$ يتّجه التوزيع ذو الحدّين إلى توزيع بواسون. +يمكن تقريب توزيع ذي الحدين بتوزيع طبيعي عندما يكون كل من np وn(1−p) كبيرًا بما يكفي، وغالبًا نستخدم تصحيح الاستمرارية. كِبر n وحده لا يضمن تماثل الشكل إذا كان p قريبًا من الصفر أو الواحد. وإذا زاد n وبقي np ثابتًا، فقد يكون تقريب بواسون أنسب. لا يحوّل أي من التقريبين عدد النجاحات إلى كمية متصلة. ## Derivation -1. المحاولات مستقلة، فاضرب الاحتمالات بطول المتتالية. -2. اختر أيّ $k$ من المواضع الـ $n$ يحمل النجاح، وهذا توفيق. -3. اجمع كل المتتاليات متساوية الاحتمال. +1. يتيح الاستقلال ضرب احتمالات النتائج لحساب احتمال ترتيب محدد من النجاحات والإخفاقات. +2. نختار مواضع النجاحات k بين المحاولات n، ولدينا C(n,k) اختيارًا. +3. لا تجتمع هذه الترتيبات في التجربة نفسها، ولها الاحتمال نفسه. نضرب احتمال الترتيب الواحد في عدد الترتيبات. ## Real world -### مراقبة الجودة -إذا كان 2% من القطع معيبًا، فاحتمال ألا يحوي صندوق من 50 قطعة أي عيب هو 0.98⁵⁰ أي نحو 36%. +### إجراء عشوائي متكرر -### الطب -دواء ينجح مع 70% من المرضى يشفي 8 مرضى من 10 على الأقل باحتمال نحو 38%. +سحب قطعة ثم إعادتها وخلط القطع قبل السحب التالي يمكن أن يمثل محاولات ذات احتمال ثابت. أما السحب دون إعادة فيغيّر الاحتمال عادة، ويحتاج إلى نموذج آخر. -### الانتخابات والاستطلاعات -عدد إجابات «نعم» في عيّنة من n مصوّتًا يتبع التوزيع ذا الحدّين، وهو أساس كل هامش خطأ. +### فحص دفعة من القطع -### الوراثة -عدد أطفال العائلة الذين يرثون صفة متنحّية يتبع Bin(n, ¼). +يساعد توزيع ذي الحدين في تقدير عدد القطع التي تحقق شرطًا معينًا عندما يكون افتراضا الاستقلال وثبات الاحتمال مناسبين. وقد تؤدي ظروف تصنيع مشتركة إلى تجمع العيوب، فلا تكون القطع مستقلة. diff --git a/content/lessons/statistics/binomial-distribution/en.md b/content/lessons/statistics/binomial-distribution/en.md index 49026c04..83b9ecb6 100644 --- a/content/lessons/statistics/binomial-distribution/en.md +++ b/content/lessons/statistics/binomial-distribution/en.md @@ -1,69 +1,63 @@ --- title: Binomial distribution -summary: >- - See how likely each possible number of successes is when you repeat a - yes-or-no trial many times — like flipping coins or testing a batch of parts. +summary: 'Find the probability of exactly k successes in a fixed number of independent trials with the same success chance.' parameters: - 'n': n — number of trials - p: p — chance of success each time - k: k — number of successes + n: 'n — total trials' + p: 'p — success probability per trial' + k: 'k — selected success count' variables: - - the number of successes in n trials - - the number of ways to place k successes among n trials - - 'the mean: what you get on average' - - the spread around the mean + - 'number of successes in the n trials' + - 'number of choices for the k success positions' + - 'expected success count' + - 'standard deviation of the success count' --- ## Try it -1. Watch the bars: each one is the chance of getting exactly that many successes out of «n — number of trials» trials. -2. Drag «k — number of successes» along the bars and read the tall central bar's height: that is the most likely outcome. -3. Raise «n — number of trials» toward 60. The jagged bars smooth into a symmetric bell — that shape is the normal distribution appearing on its own. +1. Set n = 10, p = 0.5 and k = 5. The highlighted bar gives a probability of about 0.246: even the most likely count occurs less than a quarter of the time. +2. Change only k to 3. The exact probability is about 0.117; the cumulative readout is about 0.172 because it includes counts 0, 1, 2 and 3. +3. Keep n = 10 and change p to 0.2. The mean moves to 2 and the bars become asymmetric. Keep k between 0 and n; the highlighted count is capped at n. ## Real-life examples -1. **Coin-toss count.** Flip a fair coin 10 times; the chance of landing exactly 5 heads is only about 1 in 4, even though 5 is the single most likely count. -2. **Free-throw shooter.** A basketball player who makes 70% of her free throws takes 20 shots; the chart shows how likely she is to sink exactly 15 of them. -3. **Factory defect check.** A batch of 50 parts each has a 2% chance of being faulty; the chart shows the chance the whole batch comes out with zero faulty parts. +1. **Ten fair flips.** Exactly five successes has probability 252/1024 ≈ 0.246. The average count is five, but other counts together are much more likely. +2. **Practice shots.** Model 20 shots as independent, each with a 0.7 success chance. The chance of exactly 15 successes is about 0.179. Actual shots need not satisfy these assumptions. +3. **Marked parts.** For 50 independent items each marked with probability 0.02, the probability that none is marked is 0.98⁵⁰ ≈ 0.364. The expected count is one. ## Test yourself -1. Set «n — number of trials» and «p — chance of success each time» so the average number of successes (n × p) is exactly 6. -2. Find values of «k — number of successes» where that exact outcome has more than a 30% chance of happening. -3. Make the spread of likely outcomes — its standard deviation — about 3 successes wide. +1. Make the expected number of successes, n × p, equal 6. +2. Choose n, p and a valid count k so the chance of exactly k successes exceeds 0.3. +3. Make the standard deviation of the success count approximately 3. ## Intuition -Toss 10 fair coins. Exactly 5 heads is the most likely single result, yet it happens only about a quarter of the time — the bars on screen show every possible count at once. Drag «k — number of successes» to 3 and read the bar's height: three heads has probability $\binom{10}{3}/2^{10} = 120/1024$, exactly what the readout shows. +Consider three independent fair coin flips. Exactly two successes can occur in three orders: SSF, SFS or FSS. Each order has probability 1/8, so the total probability is 3/8. We multiply along one order, then add over all orders that produce the required count. -Now drag «p — chance of success each time» down to 0.2: the hill of bars slides left and leans. Raise «n — number of trials» to 60 instead, and the hill turns into a smooth, symmetric bell — that bell is the normal distribution appearing on its own. +The binomial distribution does this for every possible success count. Each bar represents a count, not a single order of results. Moving k selects a bar without changing the distribution. Changing n or p changes the distribution itself. The dashed vertical line marks the mean, which need not be an integer or a possible result of one experiment. ## Formal -$X \sim \mathrm{Bin}(n,p)$: $P(X=k) = \binom{n}{k}p^k(1-p)^{n-k}$ for $k = 0,\dots,n$; $E[X] = np$, $\mathrm{Var}(X) = np(1-p)$. +For n independent trials with constant success probability p, the count X has $P(X=k)=\binom{n}{k}p^k(1-p)^{n-k}$ for integers $0\le k\le n$. The combination counts orders of successes, and the powers give the probability of each such order. -The probabilities sum to 1 by the binomial theorem: $\sum_k \binom{n}{k}p^k(1-p)^{n-k} = (p + 1 - p)^n = 1$. +The mean is $E[X]=np$ and the standard deviation is $\sigma=\sqrt{np(1-p)}$. The mean is a long-run average count; the standard deviation measures variation in counts. The cumulative probability $P(X\le k)$ adds the probabilities from 0 through k, including k. ## Advanced -De Moivre–Laplace: for large $n$, $\mathrm{Bin}(n,p) \approx \mathcal N(np, np(1-p))$, the first central limit theorem (1733). When $n \to \infty$ with $np = \lambda$ fixed, the binomial tends instead to the Poisson distribution. +A normal distribution can approximate binomial counts when both np and n(1−p) are sufficiently large, often with a continuity correction. A large n alone does not ensure a symmetric shape when p is near zero or one. When n grows while np stays fixed, a Poisson approximation may be more suitable. Neither approximation makes the counts continuous. ## Derivation -1. Independent trials: multiply the probabilities along the sequence. -2. Choose which $k$ of the $n$ positions hold the successes — a combination. -3. Add up the equally likely sequences. +1. Independence lets us multiply the probabilities for one particular sequence of successes and failures. +2. Choose the k success positions among the n trials; there are C(n,k) choices. +3. The sequences are disjoint and have the same probability, so multiply one sequence's probability by their count. ## Real world -### Quality control -If 2% of parts are faulty, the chance a box of 50 has no faulty part is 0.98⁵⁰ ≈ 36%. +### A repeated random procedure -### Medicine -A drug that works for 70% of patients cures at least 8 of 10 with probability about 38%. +Drawing a counter, replacing it and mixing before the next draw can model repeated trials with an unchanged probability. Drawing without replacement generally changes the chance and requires a different model. -### Elections and surveys -The number of “yes” answers in a sample of n voters is binomial — the basis of every margin of error. +### Batch checks -### Genetics -The number of children in a family who inherit a recessive trait follows Bin(n, ¼). +A binomial model can estimate how many items meet a criterion when the independence and equal-probability assumptions are reasonable. Shared production conditions can make faults cluster, violating independence. From 7ca8455a26db4a86246862bad288fdfcf612c5f2 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:54:47 +0300 Subject: [PATCH 084/124] content: rewrite poisson-distribution for first-time learners in both languages --- .../statistics/poisson-distribution/ar.md | 59 +++++++++--------- .../statistics/poisson-distribution/en.md | 60 +++++++++---------- 2 files changed, 54 insertions(+), 65 deletions(-) diff --git a/content/lessons/statistics/poisson-distribution/ar.md b/content/lessons/statistics/poisson-distribution/ar.md index 6f3f3b97..cead9c1a 100644 --- a/content/lessons/statistics/poisson-distribution/ar.md +++ b/content/lessons/statistics/poisson-distribution/ar.md @@ -1,66 +1,61 @@ --- title: توزيع بواسون -summary: >- - أحداث نادرة بمعدل ثابت. كم حدثًا في الساعة القادمة؟ +summary: 'احسب احتمالات عدد الأحداث في فترة محددة، عندما تقع الأحداث باستقلال ويكون معدلها ثابتًا.' parameters: - lambda: λ — العدد المتوسط في الفترة - k: k — عدد الأحداث + lambda: 'λ — العدد المتوقع في الفترة' + k: 'k — عدد الأحداث المختار' variables: - - عدد الأحداث في فترة واحدة - - العدد المتوسط في الفترة، وهو التباين أيضًا - - عدد أويلر، يساوي 2.718… + - 'عدد الأحداث في الفترة المحددة' + - 'متوسط العدد في الفترة، وهو التباين أيضًا' + - 'e: ثابت رياضي قيمته نحو 2.71828' --- ## Try it -1. راقب الأعمدة. كل عمود يعرض احتمال وقوع هذا العدد بالضبط من الأحداث في فترة واحدة. -2. اسحب «λ — العدد المتوسط في الفترة» نحو 0.5. تتكدّس معظم الفترات الآن عند صفر أحداث. -3. اسحب «λ — العدد المتوسط في الفترة» نحو 20. تتحوّل الأعمدة إلى جرس متماثل حول λ. +1. اجعل λ = 3 وk = 2. يعطي العمود المميز P(X = 2) ≈ 0.224، بينما تعطي قراءة الاحتمال التراكمي P(X ≤ 2) ≈ 0.423. +2. غيّر λ إلى 0.5 وk إلى 0. يصبح احتمال عدم وقوع أي حدث نحو 0.607، أي إن أكثر من نصف الفترات تكون خالية وفق هذا النموذج. +3. اجعل λ = 20 واختر أعدادًا قريبة منه. يصبح التوزيع أقرب إلى التماثل، بمتوسط 20 وانحراف معياري نحو 4.47. يعرض الرسم جزءًا محدودًا فقط من الأعداد الممكنة. ## Real-life examples -1. **مركز الاتصالات.** يتلقّى مركز اتصالات 3 مكالمات في الدقيقة في المتوسط، ويعرض المخطط احتمال أن تجلب دقيقة معيّنة مكالمتين بالضبط. -2. **التحلّل الإشعاعي.** ينقر عدّاد غايغر 8 نقرات في الثانية في المتوسط، ويعرض المخطط احتمال حدوث 5 نقرات بالضبط في ثانية واحدة. -3. **الأخطاء المطبعية في الصفحة.** مخطوطة متوسط أخطائها 0.8 خطأ في الصفحة، ويعرض المخطط احتمال أن تخلو صفحة معيّنة من أي خطأ. +1. **رسائل في دقيقة.** إذا اتبع وصول الرسائل نموذج بواسون بمتوسط 3 رسائل في الدقيقة، فاحتمال وصول رسالتين بالضبط في دقيقة نحو 0.224. +2. **قراءة عدّاد.** في نموذج يسجل متوسط 8 أحداث كشف مستقلة في الثانية، يكون احتمال تسجيل 5 أحداث بالضبط في ثانية نحو 0.0916. +3. **علامات على صفحات.** إذا وصف نموذج بواسون العلامات على صفحات متساوية المساحة بمتوسط 0.8، فاحتمال خلو الصفحة من العلامات نحو 0.449. انخفاض المتوسط لا يعني دائمًا أن الصفحة الخالية أرجح من غير الخالية. ## Test yourself -1. جِد «λ — العدد المتوسط في الفترة» و«k — عدد الأحداث» بحيث يكون احتمال هذا العدد بالذات نحو 20%. -2. بمعدّل منخفض، أقل من 1، جِد عددًا يتجاوز احتمال وقوعه 50%. -3. بمعدّل مرتفع، أعلى من 15، جِد عددًا يبعد عن المتوسط بمقدار 1 على الأكثر ويظلّ احتمال وقوعه فوق 5%. +1. اختر λ وk بحيث يكون احتمال k أحداث بالضبط قريبًا من 0.2. +2. أبقِ λ أقل من 1، وابحث عن عدد أحداث يزيد احتماله على 0.5. +3. اجعل λ أكبر من 15، واختر k لا يبتعد عنه بأكثر من 1، بحيث يزيد احتمال هذا العدد بالضبط على 0.05. ## Intuition -يتلقّى مركز اتصالات 3 مكالمات في الدقيقة في المتوسط، أي «λ — العدد المتوسط في الفترة» يساوي 3. بعض الدقائق لا تجلب شيئًا وبعضها يجلب ستًّا. تعرض الأعمدة على الشاشة كيف تتوزّع الأعداد: اسحب «k — عدد الأحداث» إلى 2 واقرأ أن احتمال مكالمتين بالضبط يساوي $9e^{-3}/2 \approx 0.224$. ولا تزال دقيقة بلا مكالمات تقع 5% من الوقت. +متوسط ثلاث رسائل في الدقيقة لا يعني وصول رسالة كل 20 ثانية. قد تمر دقيقة دون رسائل، وقد تأتي رسائل كثيرة في دقيقة أخرى. يحدد نموذج بواسون احتمالات هذه الأعداد عندما تصل الأحداث باستقلال وبمعدل ثابت. عند متوسط ثلاثة، يكون احتمال رسالتين بالضبط $9e^{-3}/2\approx0.224$، واحتمال عدم وصول أي رسالة نحو 0.050. -أنزل «λ — العدد المتوسط في الفترة» إلى 0.5 فتتكدّس الأعمدة عند الصفر، وتصبح أكثر الفترات فارغة. ارفعه إلى 20 فتتشكّل الأعمدة في جرس متماثل انتشاره نحو 4.5. في متغيّر بواسون يتساوى التباين مع المتوسط، لذلك الأعداد قرب λ زائد أو ناقص جذره التربيعي هي المعتادة. +يمثل λ العدد المتوقع في الفترة المختارة، ولا يشترط أن يكون عددًا صحيحًا. تغيير k يميّز عمودًا آخر دون تغيير احتماله أو احتمالات بقية الأعمدة. أما زيادة λ فتنقل التوزيع نحو أعداد أكبر وتزيد مقدار تشتته. وعند القيم الكبيرة يقترب الشكل من الجرس، لكنه يبقى توزيعًا لأعداد صحيحة مع بعض عدم التماثل. ## Formal -$X \sim \mathrm{Poi}(\lambda)$ يعني $P(X=k) = \lambda^k e^{-\lambda}/k!$ لـ $k = 0, 1, 2, \dots$، وأن $E[X] = \mathrm{Var}(X) = \lambda$. +عندما $\lambda>0$، يحقق عدد أحداث بواسون العلاقة $P(X=k)=\lambda^k e^{-\lambda}/k!$ للأعداد الصحيحة $k=0,1,2,\ldots$. يمثل λ العدد المتوقع في الفترة المحددة، وe ثابت يساوي تقريبًا 2.71828. لا يضع النموذج حدًا أعلى نهائيًا لعدد الأحداث. -هو نهاية $\mathrm{Bin}(n, \lambda/n)$ عندما $n \to \infty$، أي فرص كثيرة لكل منها احتمال ضئيل. +يتساوى المتوسط والتباين: $E[X]=\mathrm{Var}(X)=\lambda$، ولذلك $\sigma=\sqrt{\lambda}$. إذا كانت الأحداث تتبع عملية بواسون متجانسة بمعدل r لكل وحدة زمن، فإن فترة طولها T لها $\lambda=rT$. يجب أن تتوافق وحدتا r وT. ## Advanced -لعملية بواسون زيادات مستقلة، و$P(\text{one event in } dt) = \lambda\,dt$. زمن الانتظار بين الأحداث أُسّي بمتوسط $1/\lambda$، وعدد الأحداث في أي فترة طولها $T$ هو $\mathrm{Poi}(\lambda T)$. وتراكب عمليات بواسون أو تخفيفها يعطي بواسون من جديد. +ينشأ التوزيع حدًّا لتوزيع ذي الحدين عندما يزيد عدد الفرص ويقل احتمال النجاح في الفرصة الواحدة، مع ثبات حاصل ضربهما عند λ. في عملية بواسون المتجانسة تكون أعداد الأحداث في الفترات المنفصلة مستقلة، وتتبع أزمنة الانتظار توزيعًا أسيًا بمتوسط 1/r. ثبات المتوسط وحده لا يكفي؛ فالأحداث المتجمعة أو المتباعدة بانتظام قد تعطي توزيعًا مختلفًا جدًا. ## Derivation -1. قسّم الفترة إلى $n$ خانة صغيرة، لكل خانة فرصة نجاح $\lambda/n$. -2. دع الخانات تصبح أدقّ بلا حدود. -3. صار التوزيع ذو الحدّين توزيع بواسون. +1. نقسم الفترة الثابتة إلى n أجزاء صغيرة، ونمثل كل جزء بمحاولة مستقلة احتمال نجاحها λ/n. +2. نثبت λ وk ونزيد n. بعد التحجيم يقترب عامل التوافيق من 1/k!، ويقترب عامل الإخفاق من e مرفوعًا إلى −λ. +3. بجمع هذه النهايات نحصل على احتمال بواسون لكل عدد صحيح غير سالب k. ## Real world -### مراكز الاتصالات وخوادم الويب -تتبع الوصول في الدقيقة توزيع بواسون، وهو النموذج المستخدم لتقدير عدد الموظفين أو الخوادم اللازمين. +### وصول الرسائل -### التحلّل الإشعاعي -تتبع نقرات عدّاد غايغر في الثانية توزيع بواسون بمعدّل λ يحدّده نشاط العيّنة. +قد يقارب نموذج بواسون وصول الرسائل خلال فترة ذات نشاط ثابت. أما الرسائل التي تصل دفعة واحدة أو بمعدل متغير، فقد تحتاج إلى نموذج مختلف أو فترات أقصر. -### الأخطاء المطبعية والعيوب والحفر -أخطاء الصفحة، وعيوب الكابل، وحفر الطريق، كلها نادرة ومستقلة وتقع بمعدّل ثابت. +### علامات على سطح -### بيانات تاريخية -أظهر بورتكيفيتش عام 1898 أن وفيات رفسات الخيول في فرق الفرسان البروسية اتّبعت بواسون بدقة شبه تامة. +يمكن أن نعدّ الأحداث في مساحة أو طول بدلًا من الزمن. إذا توزعت علامات مستقلة بكثافة ثابتة، فقد نمثل عددها بنموذج يكون فيه λ حاصل ضرب الكثافة في المساحة المفحوصة. diff --git a/content/lessons/statistics/poisson-distribution/en.md b/content/lessons/statistics/poisson-distribution/en.md index c5fea23a..cceb28e1 100644 --- a/content/lessons/statistics/poisson-distribution/en.md +++ b/content/lessons/statistics/poisson-distribution/en.md @@ -1,67 +1,61 @@ --- title: Poisson distribution -summary: >- - Rare events at a steady average rate: how many will happen in the next hour, - page, or square kilometre? +summary: 'Model how many events occur in a fixed interval when arrivals are independent and the average rate is steady.' parameters: - lambda: λ — average number per interval - k: k — number of events + lambda: 'λ — expected events per interval' + k: 'k — selected event count' variables: - - the number of events in one interval - - the average count per interval — also the variance - - 'Euler’s number, 2.718…' + - 'number of events in the chosen interval' + - 'mean count per interval; also the variance' + - 'e: mathematical constant approximately 2.71828' --- ## Try it -1. Watch the bars: each shows the chance of exactly that many events happening in one interval. -2. Drag «λ — average number per interval» down toward 0.5. Most intervals now show zero events. -3. Drag «λ — average number per interval» up toward 20. The bars smooth into a symmetric bell around λ. +1. Set λ = 3 and k = 2. The highlighted bar gives P(X = 2) ≈ 0.224; the cumulative readout gives P(X ≤ 2) ≈ 0.423. +2. Change λ to 0.5 and k to 0. Zero events now has probability about 0.607, so more than half of intervals are empty under this model. +3. Set λ = 20 and select nearby counts. The distribution is less skewed, with mean 20 and standard deviation about 4.47. The plot shows only a finite part of the possible counts. ## Real-life examples -1. **Call centre.** A call centre gets 3 calls a minute on average; the chart shows the chance a given minute brings exactly 2 calls. -2. **Radioactive decay.** A Geiger counter clicks 8 times a second on average; the chart shows the chance of exactly 5 clicks in one second. -3. **Typos per page.** A manuscript averages 0.8 typos per page; the chart shows the chance a given page has zero typos at all. +1. **Messages per minute.** If arrivals follow a Poisson model with a mean of 3 per minute, the chance of exactly 2 in a minute is about 0.224. +2. **Counter readings.** In a model averaging 8 independent detection events per second, exactly 5 in a second has probability about 0.0916. +3. **Marks per page.** If a Poisson model with mean 0.8 describes marks on equal-sized pages, the chance of no marks on a page is about 0.449. A low average does not always make an empty page more likely than not. ## Test yourself -1. Find «λ — average number per interval» and «k — number of events» where that exact count has about a 20% chance. -2. With a low average rate (under 1), find a count with more than a 50% chance of happening. -3. With a high average rate (above 15), find a count within 1 of the average that still has more than a 5% chance. +1. Find λ and k giving a probability near 0.2 for exactly k events. +2. Keep λ below 1 and find a count with probability greater than 0.5. +3. Use λ greater than 15 and choose k within 1 of λ, with an exact-count probability greater than 0.05. ## Intuition -A call centre gets 3 calls a minute on average, «λ — average number per interval» = 3. Some minutes bring none, some bring six. The bars on screen show how the counts spread: drag «k — number of events» to 2 and read that exactly 2 calls has probability $9e^{-3}/2 \approx 0.224$. Zero calls still happens 5% of the time. +An average of three messages a minute does not mean one arrives every 20 seconds. Some minutes can be empty and others busy. A Poisson model assigns probabilities to these counts when arrivals occur independently at a steady rate. For a mean of three, the probability of exactly two is $9e^{-3}/2\approx0.224$, while zero has probability about 0.050. -Slide «λ — average number per interval» down to 0.5 and the bars pile up at zero — most intervals are empty. Slide it to 20 and the bars form a symmetric bell with spread about 4.5: for a Poisson count the variance equals the mean, so counts near λ plus or minus its square root are typical. +The parameter λ is the expected count in the chosen interval, not necessarily a whole number. Moving k highlights one count without changing its probability or the other bars. Increasing λ moves the distribution toward larger counts and increases its absolute spread. At large λ the shape approaches a bell, but it is still a discrete distribution with some skewness. ## Formal -$X \sim \mathrm{Poi}(\lambda)$: $P(X=k) = \lambda^k e^{-\lambda}/k!$ for $k = 0, 1, 2, \dots$; $E[X] = \mathrm{Var}(X) = \lambda$. +For $\lambda>0$, a Poisson count satisfies $P(X=k)=\lambda^k e^{-\lambda}/k!$ for integers $k=0,1,2,\ldots$. Here λ is the expected count in the specified interval and e is approximately 2.71828. There is no finite maximum count in this model. -It is the limit of $\mathrm{Bin}(n, \lambda/n)$ as $n \to \infty$: many opportunities, each with a tiny chance. +The mean and variance are equal: $E[X]=\mathrm{Var}(X)=\lambda$, so $\sigma=\sqrt{\lambda}$. If events form a homogeneous Poisson process with rate r per unit time, an interval of length T has $\lambda=rT$. Keep the units of r and T consistent. ## Advanced -A Poisson process has independent increments and $P(\text{one event in } dt) = \lambda\,dt$; the waiting time between events is then exponential with mean $1/\lambda$, and the count in any interval of length $T$ is $\mathrm{Poi}(\lambda T)$. Superposition and thinning of Poisson processes are again Poisson. +The distribution arises as the limit of a binomial count when the number of opportunities grows and each success chance shrinks, while their product stays λ. For a homogeneous Poisson process, disjoint intervals have independent counts and waiting times are exponential with mean 1/r. A constant average alone is insufficient: clustered or regularly spaced arrivals can have very different count distributions. ## Derivation -1. Split the interval into $n$ tiny slots, each with success chance $\lambda/n$. -2. Let the slots become infinitely fine. -3. The binomial has become the Poisson. +1. Divide a fixed interval into n small slots and model each as an independent trial with success chance λ/n. +2. Keep λ and k fixed while n grows. The combinatorial factor approaches 1/k! after scaling, and the failure factor approaches e to the power −λ. +3. Combining the limits gives the Poisson probability for each fixed nonnegative count k. ## Real world -### Call centres and web servers -Arrivals per minute are Poisson — the model used to decide how many staff or servers are needed. +### Arrivals -### Radioactive decay -Clicks of a Geiger counter per second follow a Poisson distribution with λ set by the sample’s activity. +A Poisson model may approximate messages arriving during a period with steady activity. A coordinated burst or a changing rate calls for a different model or shorter intervals. -### Typos, defects, potholes -Errors per page, flaws per metre of cable, potholes per kilometre: rare, independent, at a steady rate. +### Marks on a surface -### Historical data -Bortkiewicz (1898) showed that deaths by horse-kick in Prussian cavalry corps followed Poisson almost perfectly. +The interval can be an area or length rather than time. Independent marks spread at a constant density may be modeled with λ equal to density multiplied by inspected area. From 30517d8c3fad8640b527bd8f721dc9c593d2abc5 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:54:47 +0300 Subject: [PATCH 085/124] content: rewrite mean-and-spread for first-time learners in both languages --- .../lessons/statistics/mean-and-spread/ar.md | 66 +++++++++---------- .../lessons/statistics/mean-and-spread/en.md | 62 ++++++++--------- 2 files changed, 61 insertions(+), 67 deletions(-) diff --git a/content/lessons/statistics/mean-and-spread/ar.md b/content/lessons/statistics/mean-and-spread/ar.md index 8a510771..1d916cbd 100644 --- a/content/lessons/statistics/mean-and-spread/ar.md +++ b/content/lessons/statistics/mean-and-spread/ar.md @@ -1,70 +1,68 @@ --- title: المتوسط والتباين والانحراف المعياري -summary: >- - رقم للمركز ورقم للتشتت يلخصان أي قائمة أرقام، من الدرجات إلى أوقات التوصيل. +summary: 'احسب متوسط مجموعة من القيم، ثم قِس تشتتها باستخدام مربعات المسافات عن هذا المتوسط.' parameters: - m: المركز المُخمَّن c - a: البيانات من - b: البيانات إلى + m: 'c — المركز الذي نجرّبه' + a: 'a — بداية التكامل المظلل' + b: 'b — نهاية التكامل المظلل' variables: - - المتوسط، نقطة توازن البيانات - - التباين، متوسط المسافة المربّعة عن المتوسط - - الانحراف المعياري، بالوحدات الأصلية من جديد + - 'متوسط قيم البيانات' + - 'متوسط مربعات المسافات عن المتوسط' + - 'الجذر التربيعي للتباين، بوحدة البيانات نفسها' charts: - - title: يبلغ مجموع المسافات المربّعة عن مركز مُخمَّن c أصغر قيمة له عند المتوسط - xLabel: المركز المُخمَّن c + - title: مجموع مربعات المسافات إلى المركز المختار + xLabel: المركز المختار c yLabel: Σ (xᵢ − c)² series: - - 'مجموع المسافات على البيانات 2, 4, 4, 4, 5, 5, 7, 9' + - 'مجموع مربعات المسافات للقيم 2، 4، 4، 4، 5، 5، 7، 9' --- ## Try it -1. راقب المنحنى. يرسم مجموع المسافات المربّعة من «المركز المُخمَّن c» إلى كل نقطة من نقاط البيانات الثماني. -2. اسحب «المركز المُخمَّن c» يمينًا ويسارًا وراقب ارتفاع المنحنى يتغيّر. -3. جِد أدنى نقطة على المنحنى. هذا التخمين هو متوسط البيانات. +1. نستخدم القيم الثابتة 2، 4، 4، 4، 5، 5، 7، 9. اجعل m = 5. يعطي الرسم السفلي مجموع مربعات المسافات، وتبلغ قيمته الدنيا 32. +2. غيّر m إلى 8، فيرتفع المجموع إلى 104. يمثل الرسم الرئيسي مربع المسافة لقيمة واحدة، (x−m)²، بينما يجمع الرسم السفلي هذه المربعات للقيم الثماني. +3. أعد m إلى 5 وغيّر a أو b. هذان المتغيران يحددان المساحة المظللة تحت المنحنى الرئيسي، ولا يغيّران البيانات الثابتة أو تباينها. يبقى الرسم السفلي كما هو. ## Real-life examples -1. **تخمين متوسط الصف.** درجات الاختبار هي 2، 4، 4، 4، 5، 5، 7، 9 من 10. تخمين المركز عند 5 يصيب المتوسط الحقيقي بالضبط. عندئذ تكون العقوبة أصغر ما يمكن. -2. **تخمين أعلى من اللازم.** تخمين 8 لدرجات الصف نفسها يتجاوز المتوسط الحقيقي، فيقفز مجموع الخطأ المربّع بعيدًا فوق أدنى قيمة له. -3. **تخمين أقل من اللازم.** تخمين 1 فقط يبتعد عن المتوسط أكثر، لأن معظم درجات الصف أعلى من ذلك بكثير. +1. **عند المتوسط.** مجموع الدرجات الثماني 40، فمتوسطها 5. عند m = 5 يكون مجموع مربعات المسافات 32. نقسمه على 8 لنحصل على التباين 4، ثم نأخذ الجذر لنحصل على الانحراف المعياري 2. +2. **مركز أعلى من المتوسط.** عند m = 8 يصبح مجموع مربعات المسافات للبيانات نفسها 104. المركز الذي اخترناه أعلى من المتوسط بثلاث درجات. +3. **مركز أدنى من المتوسط.** عند m = 1 يصبح المجموع 160. الابتعاد أربع درجات عن المتوسط يضيف 8 × 4² = 128 إلى القيمة الدنيا 32. ## Test yourself -1. جِد المركز المُخمَّن الذي يجعل مجموع المسافات المربّعة أصغر ما يمكن، أي نحو 32. -2. خمّن مركزًا أقل من 3 وراقب العقوبة ترتفع فوق 80. -3. خمّن مركزًا أعلى من 7 وأبقِ العقوبة مع ذلك دون 100. +1. ابحث عن m يجعل مجموع مربعات المسافات قريبًا من قيمته الدنيا، 32. +2. اختر m أقل من 3، بحيث يزيد مجموع مربعات المسافات على 80. +3. اختر m أكبر من 7، مع إبقاء مجموع مربعات المسافات أقل من 100. ## Intuition -خذ درجات الاختبار 2، 4، 4، 4، 5، 5، 7، 9. متوسطها 5. يجمع المنحنى على الشاشة المسافات المربّعة من كل درجة إلى أي مركز تخمّنه. اسحب «المركز المُخمَّن c» وسترى المجموع يصغر إلى أدنى قيمة له عند 5 بالضبط. المتوسط هو المركز الذي تكون عنده هذه العقوبة أصغر ما يمكن. +متوسط القيم 2، 4، 4، 4، 5، 5، 7، 9 هو 5؛ نجمع القيم الثماني ثم نقسم على ثمانية. لقياس تشتتها نطرح 5 من كل قيمة. لو جمعنا الفروق مباشرة لحصلنا على صفر، لأن الفروق الموجبة والسالبة تلغي بعضها. تربيع الفروق قبل جمعها يمنع هذا الإلغاء، ويعطي المسافات الكبيرة وزنًا أكبر. -اقسم ذلك المجموع الأصغر، 32، على الدرجات الثماني فتحصل على التباين، 4. خذ جذره التربيعي لتعود إلى الوحدة الأصلية، فيكون الانحراف المعياري 2، أي تبعد الدرجة النموذجية نحو 2 عن المتوسط. يعرض شكل المنحنى عقوبة التخمين الخاطئ: صغيرة قرب المركز وقاسية بعيدًا عنه. +مربعات المسافات هي 9، 1، 1، 1، 0، 0، 4، 16. متوسطها 4، ونسميه «التباين». جذره التربيعي 2، ونسميه «الانحراف المعياري». إذا كانت القيم درجات، فوحدة التباين درجات مربعة، بينما يعود الانحراف المعياري إلى وحدة الدرجات. هو مقياس للتشتت العام، ولا يعني أن كل قيمة تبعد درجتين عن المتوسط. ## Formal -يجعل $\mu = \frac1n\sum x_i$ مجموع $\sum (x_i - c)^2$ أصغر ما يمكن، مهما كانت قيمة $c$. والقيمة الأصغر مقسومة على $n$ هي $\sigma^2$، و$\sigma = \sqrt{\sigma^2}$. +لقائمة كاملة تضم n قيمة، نعرّف $\mu=\frac{1}{n}\sum_{i=1}^n x_i$ و$\sigma^2=\frac{1}{n}\sum_{i=1}^n(x_i-\mu)^2$ و$\sigma=\sqrt{\sigma^2}$. تصف هذه الصيغ القائمة نفسها بالقسمة على n، ويجب أن يكون n موجبًا. -يستخدم تباين العيّنة $n - 1$ بدل $n$ ليقدّر تباين المجتمع من دون تحيّز، وهذا تصحيح بيسل. +يحقق المتوسط أصغر مجموع لمربعات المسافات $S(c)=\sum_i(x_i-c)^2$. ولبياناتنا $S(c)=32+8(c-5)^2$. أما عند تقدير تباين مجتمع من عينة عشوائية مستقلة، فتستخدم الصيغة المعتادة غير المتحيزة لتباين العينة $n-1$ بدلًا من n، وتتطلب أكثر من مشاهدة واحدة. ## Advanced -$\mathrm{Var}(X) = E[X^2] - (E[X])^2$. تتجمّع تباينات المتغيّرات المستقلة، وهذا أصل قانون $1/\sqrt N$. يصغّر المتوسط الخطأ المربّع بينما يصغّر الوسيط الخطأ المطلق، وهذا مفهوم آخر لـ"المركز" بحساسية مختلفة للقيم الشاذّة. +تفسّر العلاقة S(c) = S(μ) + n(c−μ)² لماذا يحقق المتوسط القيمة الدنيا الوحيدة لقائمة غير فارغة. أما الوسيط فيحقق أصغر مجموع للمسافات المطلقة. وقد يختلف المركزان كثيرًا عند وجود قيم كبيرة أو صغيرة جدًا؛ لذلك لا يكفي المتوسط والانحراف المعياري لوصف كل تفاصيل التوزيع. ## Derivation -1. مجموع المسافات المربّعة عن مركز مرشّح $c$. -2. يقع الحدّ الأدنى حيث تصبح المشتقة صفرًا، أي عند المتوسط. -3. التباين هو أصغر متوسط للمسافات المربّعة، والانحراف المعياري يلغي أثر التربيع. +1. نعرّف مجموع مربعات المسافات عن مركز مرشح c. +2. نشتق بالنسبة إلى c، ثم نساوي المشتقة بالصفر، فنحصل على المتوسط. وتؤكد المشتقة الثانية الموجبة 2n أن القيمة صغرى. +3. نقسم أصغر مجموع على n للحصول على تباين القائمة الكاملة، ثم نأخذ جذره التربيعي للحصول على الانحراف المعياري. ## Real world -### نتائج الامتحانات -قد يتشارك صفّان متوسطًا قدره 65، بينما σ تساوي 5 في أحدهما فيتشابه الجميع، وتساوي 20 في الآخر فيتفاوتون كثيرًا. +### مقارنة مجموعتين -### المال -يسمّي المستثمرون الانحراف المعياري للعوائد تقلّبًا، أو مخاطرة. +قد يتساوى متوسط درجات فصلين، مع اختلاف تشتت الدرجات فيهما. النظر إلى المتوسط والانحراف المعياري معًا يساعدنا على التمييز بين نتائج متقاربة ونتائج متفاوتة. -### التصنيع -تعني جودة ستة سيغما سماحات عرضها ستة انحرافات معيارية، أي نحو 3 عيوب في كل مليون. +### قياسات متكررة + +يلخص الانحراف المعياري مقدار اختلاف القراءات المتكررة. لكنه لا يكشف خطأ معايرة ثابتًا؛ فقد تتقارب القراءات كلها وتبتعد مع ذلك عن القيمة الصحيحة. diff --git a/content/lessons/statistics/mean-and-spread/en.md b/content/lessons/statistics/mean-and-spread/en.md index 9a9a52bb..398f9315 100644 --- a/content/lessons/statistics/mean-and-spread/en.md +++ b/content/lessons/statistics/mean-and-spread/en.md @@ -1,17 +1,14 @@ --- title: 'Mean, variance and standard deviation' -summary: >- - One number for where a set of scores sits, another for how far they wander — - together they summarize any list of numbers, from test results to delivery - times. +summary: 'Calculate a list’s average and measure how spread out its values are using squared distances from that average.' parameters: - m: guessed centre c - a: data from - b: data to + m: 'c — candidate centre' + a: 'a — start of shaded integral' + b: 'b — end of shaded integral' variables: - - the mean — the balance point of the data - - the variance — the average squared distance from the mean - - the standard deviation — back in the original units + - 'mean of the data' + - 'average squared distance from the mean' + - 'square root of variance, in the data’s units' charts: - title: Total squared distance from a guessed centre c is smallest at the mean xLabel: guessed centre c @@ -22,51 +19,50 @@ charts: ## Try it -1. Watch the curve: it plots the total squared distance from your guessed centre «guessed centre c» to each of the 8 data points. -2. Drag «guessed centre c» left and right and watch the curve's height change. -3. Find the lowest point of the curve: that guess is the data's mean. +1. Use the fixed data 2, 4, 4, 4, 5, 5, 7, 9. Set m = 5. The lower chart gives their total squared distance, 32, at its minimum. +2. Change m to 8. The total rises to 104. The main plot shows the single-value penalty (x−m)², while the lower chart adds that penalty over the eight data values. +3. Return m to 5 and change a or b. These controls change the shaded continuous area in the main plot, not the fixed data or their variance. The lower chart stays unchanged. ## Real-life examples -1. **Guessing the class average.** A quiz scored 2, 4, 4, 4, 5, 5, 7, 9 out of 10; guessing the centre as 5 lands exactly on the true average, where the penalty is smallest. -2. **Overshooting the guess.** Guessing 8 for the same quiz scores overshoots the true average, and the total squared error jumps far above its minimum. -3. **Undershooting the guess.** Guessing just 1 undershoots by even more, since most of the class scored higher than that. +1. **The mean.** The eight scores sum to 40, so their mean is 5. At m = 5, the squared distances sum to 32; dividing by 8 gives variance 4 and standard deviation 2. +2. **A centre too high.** At m = 8, the same data have total squared distance 104. The guessed centre is 3 above the mean. +3. **A centre too low.** At m = 1, the total is 160. Moving 4 away from the mean adds 8 × 4² = 128 to the minimum total of 32. ## Test yourself -1. Find the guessed centre that makes the total squared distance as small as possible — about 32. -2. Guess a centre below 3 and see the penalty climb above 80. -3. Guess a centre above 7 and still keep the penalty under 100. +1. Find m giving a total squared distance near its minimum, 32. +2. Choose m below 3 and make the total squared distance greater than 80. +3. Choose m above 7 while keeping the total squared distance below 100. ## Intuition -Take the quiz scores 2, 4, 4, 4, 5, 5, 7, 9. Their mean is 5. The curve on screen adds up the squared distance from each score to whatever centre you guess: drag «guessed centre c» and watch the total shrink to its smallest exactly at 5. The mean is the centre the data "pulls" against the least. +The mean of 2, 4, 4, 4, 5, 5, 7, 9 is 5: add the eight values and divide by eight. To describe their spread, subtract 5 from each value. Adding these signed differences would give zero because the positive and negative differences cancel. Squaring first prevents that cancellation and gives more weight to larger distances. -Divide that smallest total, 32, by the 8 scores and you get the variance, 4. Take its square root to return to the original units: the standard deviation is 2, so a typical score sits about 2 points from the mean. The curve's shape shows the penalty for guessing wrong: small near the centre, harsh far away. +The squared distances are 9, 1, 1, 1, 0, 0, 4 and 16. Their average is 4, called the variance. Its square root is 2, called the standard deviation. If the scores are measured in points, variance has squared-point units and standard deviation returns to points. It describes overall spread; it does not mean every score is two points from the mean. ## Formal -$\mu = \frac1n\sum x_i$ minimises $\sum (x_i - c)^2$ over $c$; the minimum value divided by $n$ is $\sigma^2$, and $\sigma = \sqrt{\sigma^2}$. +For a complete list of n values, $\mu=\frac{1}{n}\sum_{i=1}^n x_i$, $\sigma^2=\frac{1}{n}\sum_{i=1}^n(x_i-\mu)^2$, and $\sigma=\sqrt{\sigma^2}$. These formulas describe the list with divisor n; n must be positive. -Sample variance uses $n - 1$ instead of $n$ (Bessel’s correction) so that it estimates the population variance without bias. +The mean minimizes the total squared distance $S(c)=\sum_i(x_i-c)^2$. For these data, $S(c)=32+8(c-5)^2$. When estimating a population variance from an independent random sample, the usual unbiased sample-variance formula uses $n-1$ in place of n and requires more than one observation. ## Advanced -$\mathrm{Var}(X) = E[X^2] - (E[X])^2$; for independent variables variances add, which is the root of the $1/\sqrt N$ law. The mean minimises squared error while the median minimises absolute error — a different notion of “centre” with a different sensitivity to outliers. +The identity S(c) = S(μ) + n(c−μ)² explains why the mean is the unique minimum for a nonempty list. The median instead minimizes total absolute distance. These centres can differ substantially when a few values are very large or small, so mean and standard deviation do not fully describe every distribution. ## Derivation -1. Total squared distance from a candidate centre $c$. -2. The minimum is where the derivative vanishes — at the mean. -3. Variance is the minimal average squared distance; the standard deviation undoes the squaring. +1. Define the total squared distance from an arbitrary candidate centre c. +2. Differentiate with respect to c and set the derivative to zero. This gives the mean; the positive second derivative 2n confirms a minimum. +3. Divide the minimum total by n to describe the complete list's variance, then take its square root for the standard deviation. ## Real world -### Exam results -Two classes can share a mean of 65 while one has σ = 5 (everyone similar) and the other σ = 20 (a wide range). +### Comparing groups -### Finance -The standard deviation of returns is what investors call volatility, or risk. +Two classes can have the same average score but different spreads. Looking at both mean and standard deviation helps distinguish tightly grouped results from widely varying ones. -### Manufacturing -Six-sigma quality means tolerances six standard deviations wide — about 3 defects per million. +### Repeated measurements + +Standard deviation summarizes how much repeated readings vary. It does not reveal a constant calibration error: all readings could be close together and still be far from the correct value. From d122d6d5dcaf4342906fe493e644e1b89ba8b250 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:54:47 +0300 Subject: [PATCH 086/124] content: rewrite normal-distribution for first-time learners in both languages --- .../statistics/normal-distribution/ar.md | 65 ++++++++---------- .../statistics/normal-distribution/en.md | 66 ++++++++----------- 2 files changed, 58 insertions(+), 73 deletions(-) diff --git a/content/lessons/statistics/normal-distribution/ar.md b/content/lessons/statistics/normal-distribution/ar.md index 8ca43210..ef411202 100644 --- a/content/lessons/statistics/normal-distribution/ar.md +++ b/content/lessons/statistics/normal-distribution/ar.md @@ -1,70 +1,63 @@ --- title: التوزيع الطبيعي -summary: >- - منحنى الجرس وراء الأطوال ودرجات الاختبارات، والمساحة تحته تعطيك الاحتمال. +summary: 'اقرأ الاحتمال بوصفه مساحة تحت المنحنى الطبيعي، وشاهد أثر المتوسط والانحراف المعياري في شكله.' parameters: - mu: μ — المتوسط - s: σ — الانحراف المعياري - a: من a - b: إلى b + mu: 'μ — المتوسط' + s: 'σ — الانحراف المعياري' + a: 'a — الحد الأدنى' + b: 'b — الحد الأعلى' variables: - - مركز الجرس - - >- - عرضه، أي المسافة من المركز إلى النقطة التي يتحوّل فيها المنحنى من محدّب إلى - مقعّر - - المساحة المظللة، أي احتمال الوقوع بين a وb + - 'المتوسط: مركز المنحنى المتماثل' + - 'الانحراف المعياري: مقياس التشتت' + - 'احتمال الوقوع بين a وb عندما a ≤ b' --- ## Try it -1. راقب المنطقة المظلّلة بين «من a» و«إلى b». مساحتها هي احتمال الوقوع في هذا المدى. -2. صغّر «σ — الانحراف المعياري». يضيق الجرس ويطول، ويتركّز حول المتوسط. -3. اضبط «من a» و«إلى b» على انحراف معياري واحد «σ — الانحراف المعياري» من كل جهة لـ«μ — المتوسط». تستقر المساحة المظللة عند نحو 68%. +1. اجعل μ = 6 وσ = 1.5 وa = 4.5 وb = 7.5. يمتد المجال انحرافًا معياريًا واحدًا على كل جانب من المتوسط، ومساحته نحو 0.683. +2. ثبّت μ وحدّي المجال، وقلّل σ إلى 0.5. يصبح المنحنى أضيق وأعلى، ويغطي المجال نفسه احتمالًا يقارب 0.9973. +3. غيّر الحدين إلى a = 5.5 وb = 6.5. يبعد كل منهما الآن انحرافًا معياريًا واحدًا عن المتوسط، فتعود المساحة إلى نحو 0.683. استخدم a ≤ b لتفسير المساحة بوصفها احتمالًا. ## Real-life examples -1. **درجات اختبار الصف.** تتمركز الدرجات حول 6 من 12 بانتشار معتاد قدره 1.5 درجة، وتعرض المساحة المظللة احتمال الحصول على درجة بين 4.5 و7.5. -2. **تصنيع دقيق.** تقصّ آلة قطعًا بحجم مستهدف قدره 8 مع خطأ ضئيل جدًا انتشاره 0.5، فتقع كل قطعة تقريبًا بين 7.5 و8.5. -3. **تفاوت زمن التوصيل.** تستغرق الطرود بالمتوسط 5 أيام لتصل بانتشار واسع قدره 3.5 يومًا، وتعرض المساحة المظللة احتمال أن يستغرق التوصيل بين 1.5 و8.5 يومًا. +1. **نموذج مركزه 6.** عند انحراف معياري 1.5، يحتوي المجال [4.5, 7.5] على نحو 68.3% من الاحتمال. +2. **نموذج قياس أقل تشتتًا.** عند متوسط 8 وانحراف معياري 0.5، يحتوي [7.5, 8.5] أيضًا على نحو 68.3%، وليس على الاحتمال كله تقريبًا. +3. **نموذج أكثر تشتتًا.** عند متوسط 5 وانحراف معياري 3.5، يحتوي [1.5, 8.5] مرة أخرى على نحو 68.3%. يسمح هذا النموذج بقيم سالبة أيضًا، فلا نفترض ملاءمته تلقائيًا لكمية مثل مدة التوصيل. ## Test yourself -1. اجعل النافذة المظللة تتمركز على المتوسط، بانحراف معياري واحد من كل جهة، حتى تغطي نحو 68% من الاحتمال. -2. اصنع توزيعًا ضيقًا، انتشاره أقل من 1، تظل فيه نافذتك تلتقط أكثر من 95% من الاحتمال. -3. التقط أكثر من 30% من الاحتمال باستخدام نافذة مظللة أضيق من وحدة واحدة. +1. اختر مجالًا احتماله نحو 0.683. أحد الحلول أن تجعل طرفيه على بُعد انحراف معياري واحد من المتوسط. +2. اجعل σ أقل من 1، واختر مجالًا يحتوي على أكثر من 95% من الاحتمال. +3. اختر مجالًا عرضه أقل من وحدة واحدة، ويحتوي على أكثر من 30% من الاحتمال. ## Intuition -اجمع ما يكفي من التأثيرات المستقلة الصغيرة، على الأطوال أو درجات الامتحانات أو أخطاء القياس، وسيظهر هذا المنحنى. تساوي المساحة الكلية تحته 1 بالضبط، ويمثّل الجزء المظلّل بين «من a» و«إلى b» احتمال الوقوع في هذا المدى. اضبط «من a» و«إلى b» على انحراف معياري واحد «σ — الانحراف المعياري» من كل جهة لـ«μ — المتوسط» فتكون المساحة المظللة 0.683. +يمكن للمتغير المتصل أن يأخذ أي قيمة داخل مجال. لذلك لا نعطي كل نقطة احتمالًا منفصلًا، بل نحسب الاحتمال من المساحة تحت منحنى الكثافة. في التوزيع الطبيعي يتماثل المنحنى حول المتوسط. المساحة الكلية على خط الأعداد كله تساوي واحدًا، والمساحة بين a وb هي احتمال وقوع القيمة بينهما. -وسّع «σ — الانحراف المعياري» فينبسط الجرس وينتشر، لكن المساحة ضمن انحراف معياري واحد من المتوسط تبقى 68%، وضمن اثنين تبلغ 95%، وضمن ثلاثة تبلغ 99.7%. تتيح لك هذه الأرقام الثلاثة تقدير أي بيانات جرسية بمجرّد معرفة المتوسط والانحراف المعياري. +تغيير المتوسط ينقل المنحنى دون تغيير شكله. وزيادة الانحراف المعياري توسّعه، فتقل قمته حتى تبقى المساحة الكلية ثابتة. النسب الواقعة ضمن انحراف معياري واحد واثنين وثلاثة من المتوسط هي نحو 68.3% و95.4% و99.7% في التوزيع الطبيعي. لا تنطبق هذه النسب على كل بيانات يشبه شكلها الجرس تقريبًا. ## Formal -$X \sim \mathcal N(\mu, \sigma^2)$ له الكثافة $f(x) = \frac{1}{\sigma\sqrt{2\pi}} e^{-(x-\mu)^2/2\sigma^2}$، ويحقّق $P(a \le X \le b) = \int_a^b f$. ويحوّله التقييس $Z = (X-\mu)/\sigma$ إلى $\mathcal N(0,1)$. +عندما $\sigma>0$، تكون الكثافة الطبيعية $f(x)=\frac{1}{\sigma\sqrt{2\pi}}\exp\!\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)$. يمثل μ المتوسط، وσ الانحراف المعياري. وإذا كان $a\le b$، فإن احتمال المجال هو $P(a\le X\le b)=\int_a^b f(x)\,dx$. -لا مشتقة عكسية أولية لهذا التكامل، فنستخرج الاحتمالات من دالة الخطأ $\Phi(z) = \tfrac12\left[1 + \mathrm{erf}(z/\sqrt2)\right]$ أو من الجداول. +باستخدام التحويل $Z=(X-\mu)/\sigma$ نحصل على متغير متوسطه 0 وانحرافه المعياري 1. إذا رمزنا للدالة التراكمية الطبيعية المعيارية بـΦ، فإن $P(a\le X\le b)=\Phi((b-\mu)/\sigma)-\Phi((a-\mu)/\sigma)$. ارتفاع المنحنى كثافة، وليس احتمال القيمة نفسها؛ فاحتمال نقطة واحدة في هذا النموذج المتصل يساوي صفرًا. ## Advanced -مبرهنة النهاية المركزية تقول إنه إذا كانت $X_i$ مستقلة ومتماثلة التوزيع بمتوسط $\mu$ وتباين منتهٍ $\sigma^2$، فإن $\sqrt n\,(\bar X_n - \mu)/\sigma \to \mathcal N(0,1)$ في التوزيع أيًّا كان شكل $X_i$. والتوزيع الطبيعي هو أيضًا توزيع الإنتروبيا الأعظمية لمتوسط وتباين معطيين، والقانون المستقرّ الوحيد ذو التباين المنتهي. +تخص مبرهنة النهاية المركزية مجاميع أو متوسطات مشاهدات مستقلة ومتطابقة التوزيع، ذات تباين موجب ومحدود، بعد توحيد مقياسها. لا تعني أن المشاهدات الأصلية تصبح طبيعية التوزيع. أما العرض الثلاثي الأبعاد فيوضح سطحًا غاوسيًا لمتغيرين حول المركز، وليس كثافة المتغير الواحد هنا. تغيّر σ انتشاره، لكن μ وحدود التظليل في العرض الثنائي لا تتحكم فيه. ## Derivation -1. يثبّت تكامل غاوس، الذي نحسبه بتربيعه والانتقال إلى الإحداثيات القطبية، ثابت التقييس. -2. أزِح بـ $\mu$ ومدّد بـ $\sigma$ واقسم على الثابت حتى تصبح المساحة الكلية 1. -3. تتبع قاعدة 68-95-99.7 من جدول التوزيع الطبيعي المعياري. +1. تكامل التعبير الغاوسي المعياري على خط الأعداد كله يساوي √(2π). ومنه نحدد العامل الذي يجعل المساحة الكلية واحدًا. +2. ننقل المركز بمقدار μ، ونضرب المسافات الأفقية في σ. ثم نقسم الارتفاع على σ للمحافظة على المساحة. +3. التكامل من انحراف معياري واحد أسفل المتوسط إلى انحراف واحد أعلاه يعطي نحو 0.683. وتنتج النسب الأخرى من مجالات معيارية أوسع. ## Real world -### مقاييس الجسم -تقترب أطوال البالغين في المجتمع الواحد من التوزيع الطبيعي، وعلى هذا الأساس تصمّم شركات الملابس مقاساتها. +### نماذج أخطاء القياس -### خطأ القياس -تتناثر القراءات المتكرّرة للكمية نفسها طبيعيًا حول القيمة الحقيقية، ويكون متوسط قراءات كثيرة أدقّ بمقدار 1/√n. +قد يقارب النموذج الطبيعي أخطاء قياس صغيرة ناتجة عن مؤثرات مستقلة كثيرة. نتحقق من شكل البيانات ومن الأخطاء المنتظمة المحتملة قبل الاعتماد عليه. -### الدرجات ومعدّل الذكاء -تُبنى الاختبارات المعيارية على توزيع طبيعي بمتوسط وانحراف معياري مختارين، فمعدّل الذكاء مثلًا متوسطه 100 وانحرافه 15. +### المتوسطات -### المال والهندسة -نعامل ضوضاء الإشارات وسماحات القطع وتغيّرات الأسعار اليومية كلها بوصفها طبيعية التوزيع، مع الحذر عند الأطراف. +حتى لو كانت القياسات الفردية غير متماثلة التوزيع، قد تقترب متوسطات عينات مستقلة وكبيرة بما يكفي من التوزيع الطبيعي. يعتمد حجم العينة المطلوب على التوزيع الأصلي. diff --git a/content/lessons/statistics/normal-distribution/en.md b/content/lessons/statistics/normal-distribution/en.md index c723ad76..d2a4435f 100644 --- a/content/lessons/statistics/normal-distribution/en.md +++ b/content/lessons/statistics/normal-distribution/en.md @@ -1,71 +1,63 @@ --- title: The normal distribution -summary: >- - The bell curve behind heights, test scores, and measurement error — the area - under it between two values tells you a probability. +summary: 'Read probabilities as areas under a normal curve, and see how its mean and standard deviation change its shape.' parameters: - mu: μ — mean - s: σ — standard deviation - a: from a - b: to b + mu: 'μ — mean' + s: 'σ — standard deviation' + a: 'a — lower bound' + b: 'b — upper bound' variables: - - the centre of the bell - - >- - its width: the distance from the centre to the point where the curve changes - from convex to concave - - the shaded area — the probability of landing between a and b + - 'mean: centre of the symmetric curve' + - 'standard deviation: scale of the spread' + - 'probability between a and b when a ≤ b' --- ## Try it -1. Watch the shaded region between «from a» and «to b»: its area is the probability of landing in that range. -2. Shrink «σ — standard deviation». The bell narrows and grows taller, concentrating around the mean. -3. Set «from a» and «to b» to one «σ — standard deviation» either side of «μ — mean». The shaded area settles at about 68%. +1. Set μ = 6, σ = 1.5, a = 4.5 and b = 7.5. The interval extends one standard deviation either side of the mean; its area is about 0.683. +2. Keep μ and the bounds fixed and reduce σ to 0.5. The curve becomes taller and narrower, and the same interval now covers about 0.9973. +3. Change the bounds to a = 5.5 and b = 6.5. They again lie one standard deviation either side of the mean, so the area returns to about 0.683. Use a ≤ b to interpret area as probability. ## Real-life examples -1. **Class test scores.** Scores cluster around 6 out of 12 with a typical spread of 1.5 points; the shaded area shows the chance of scoring between 4.5 and 7.5. -2. **Precision manufacturing.** A machine cuts parts to a target size of 8 with very little error, a spread of just 0.5; nearly every part lands between 7.5 and 8.5. -3. **Delivery time variability.** Packages average 5 days to arrive with a wide spread of 3.5 days; the shaded area shows the chance a delivery takes between 1.5 and 8.5 days. +1. **A model centred at 6.** With standard deviation 1.5, the interval [4.5, 7.5] contains about 68.3% of the probability. +2. **A narrower measurement model.** With mean 8 and standard deviation 0.5, [7.5, 8.5] also contains about 68.3%, not nearly all the probability. +3. **A wider model.** With mean 5 and standard deviation 3.5, [1.5, 8.5] again contains about 68.3%. This normal model allows negative values too, so it is not automatically suitable for quantities such as delivery times. ## Test yourself -1. Centre the shaded window on the mean, one standard deviation either side, so it covers about 68% probability. -2. Make a narrow distribution — spread under 1 — where your window still captures more than 95% of the probability. -3. Capture more than 30% probability using a shaded window narrower than 1 unit. +1. Choose a window with probability about 0.683. One standard deviation either side of the mean is one solution. +2. Use σ below 1 and choose a window containing more than 95% probability. +3. Choose a window less than one unit wide containing more than 30% probability. ## Intuition -Heights, test scores, measurement errors: pile up enough small independent influences and this curve appears. The total area under it is exactly 1, and the shaded part between «from a» and «to b» is the probability of landing in that range. Set «from a» and «to b» one «σ — standard deviation» either side of «μ — mean» and the shaded area is 0.683. +A continuous variable can take any value in an interval. Instead of giving a probability to each point, a density curve assigns probability through area. For a normal distribution, the curve is symmetric about its mean. The total area over the entire real line is one; the area between a and b is the chance of a value in that interval. -Widen «σ — standard deviation» and the bell flattens and spreads, but the area within one standard deviation of the mean stays 68%, within two 95%, and within three 99.7%. Those three numbers let you judge any bell-shaped data using just a mean and a standard deviation. +Changing the mean shifts the curve without changing its shape. Increasing the standard deviation spreads it out, so its peak must fall to preserve total area. The familiar percentages within one, two and three standard deviations are about 68.3%, 95.4% and 99.7% for a normal distribution. They do not hold for every roughly bell-shaped dataset. ## Formal -$X \sim \mathcal N(\mu, \sigma^2)$ has density $f(x) = \frac{1}{\sigma\sqrt{2\pi}} e^{-(x-\mu)^2/2\sigma^2}$; $P(a \le X \le b) = \int_a^b f$. Standardising $Z = (X-\mu)/\sigma$ gives $\mathcal N(0,1)$. +For $\sigma>0$, the normal density is $f(x)=\frac{1}{\sigma\sqrt{2\pi}}\exp\!\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)$. Here μ is the mean and σ is the standard deviation. For $a\le b$, the interval probability is $P(a\le X\le b)=\int_a^b f(x)\,dx$. -There is no elementary antiderivative; probabilities come from the error function $\Phi(z) = \tfrac12\left[1 + \mathrm{erf}(z/\sqrt2)\right]$ or from tables. +Standardizing with $Z=(X-\mu)/\sigma$ gives mean 0 and standard deviation 1. If Φ is the standard normal cumulative distribution, then $P(a\le X\le b)=\Phi((b-\mu)/\sigma)-\Phi((a-\mu)/\sigma)$. A curve's height is a density, not the probability of that exact value; a single point has probability zero in this continuous model. ## Advanced -Central limit theorem: if $X_i$ are i.i.d. with mean $\mu$ and finite variance $\sigma^2$, then $\sqrt n\,(\bar X_n - \mu)/\sigma \to \mathcal N(0,1)$ in distribution — whatever the shape of the $X_i$. The normal is also the maximum-entropy distribution for a given mean and variance, and the only stable law with finite variance. +The central limit theorem concerns suitably standardized sums or averages of independent, identically distributed observations with finite positive variance. It does not say the original observations become normal. The optional 3D view illustrates a centred two-variable Gaussian surface, not this one-variable density: σ changes its spread, but μ and the shaded bounds from the 2D view do not control it. ## Derivation -1. The Gaussian integral (evaluated by squaring it and switching to polar coordinates) fixes the normalising constant. -2. Shift by $\mu$, scale by $\sigma$, divide by the constant so the total area is 1. -3. The 68–95–99.7 rule follows from the standard normal table. +1. The integral of the standard Gaussian expression over the real line is √(2π). This determines the factor needed for total area one. +2. Shift the centre by μ and scale horizontal distances by σ. Divide the height by σ to preserve the area. +3. Integrating from one standard deviation below the mean to one above it gives about 0.683. Wider standardized intervals give the other familiar percentages. ## Real world -### Body measurements -Adult heights within one population are close to normal — which is how clothing sizes are planned. +### Measurement models -### Measurement error -Repeated readings of the same quantity scatter normally around the true value; the mean of many readings is more precise by 1/√n. +A normal model may approximate small measurement errors when many independent influences combine. Check the observed distribution and possible systematic errors before using it. -### Grading and IQ scores -Standardised tests are scaled to a normal with a chosen mean and standard deviation (IQ: 100 and 15). +### Averages -### Finance and engineering -Noise in signals, tolerances of parts and daily price changes are all modelled — with care about the tails — as normal. +Even when individual measurements are skewed, averages of sufficiently large independent samples may be approximately normal. The needed sample size depends on the original distribution. From 1b540e4ae3c24098adcc8d4c8390359f507b43fb Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:54:47 +0300 Subject: [PATCH 087/124] content: rewrite confidence-intervals for first-time learners in both languages --- .../statistics/confidence-intervals/ar.md | 62 +++++++++--------- .../statistics/confidence-intervals/en.md | 63 +++++++++---------- content/ui/ar/forest-of-intervals.yaml | 12 ++-- content/ui/en/forest-of-intervals.yaml | 12 ++-- 4 files changed, 68 insertions(+), 81 deletions(-) diff --git a/content/lessons/statistics/confidence-intervals/ar.md b/content/lessons/statistics/confidence-intervals/ar.md index 90dae40b..77dde659 100644 --- a/content/lessons/statistics/confidence-intervals/ar.md +++ b/content/lessons/statistics/confidence-intervals/ar.md @@ -1,67 +1,61 @@ --- -title: 'فترات الثقة: ثلاثون مختبرًا وحقيقة واحدة' -summary: >- - لا تكشف أي عيّنة الحقيقة كاملة، فينشر العلماء مدًى بدل رقم. ومعنى «ثقة 95%»: من كل - مئة مختبر يعمل بهذه الطريقة، نحو 95 يمسكون الحقيقة فعلًا. +title: 'فترات الثقة' +summary: 'افهم فترة الثقة من خلال تكرار أخذ العينات: ما نسبة الفترات التي تحتوي على المتوسط الحقيقي؟' parameters: - n: n — عدد القياسات التي يأخذها كل مختبر - z: z — كم خطأً معياريًا تمتد الفترة في كل جهة + n: 'n — عدد المشاهدات في العينة' + z: 'z — الهامش بوحدات الخطأ المعياري' variables: - - متوسط العيّنة الذي قاسه المختبر فعلًا - - العرض المختار للفترة، بالأخطاء المعيارية - - تشتت المجتمع (مثبّت هنا عند 10) + - 'متوسط العينة في مركز الفترة' + - 'عدد الأخطاء المعيارية على كل جانب' + - 'الانحراف المعياري المعلوم للمجتمع، وقيمته هنا 10' --- ## Try it -1. أبقِ z = 1.96 وانظر إلى الغابة: ثلاثون مختبرًا، لكل واحد فترته، ونحو 28 أو 29 منها تمسك بالخط المتقطع. أما الحمراء فأخطأت من غير ذنب. -2. أنزل z إلى 1: تضيق كل الفترات ويحمرّ عدد أكبر بكثير. الادعاء الضيق يبدو دقيقًا، ويخطئ كثيرًا. -3. ارفع n بدل ذلك: تضيق الفترات حول الحقيقة من دون أن تفقد الإمساك بها، لأن مزيد القياسات يقلل التشتت نفسه. +1. اجعل n = 24 وz = 1.96. تمثل كل نقطة متوسط عينة، وتمتد فترتها الأفقية نحو 4 وحدات على كل جانب. يحدد الخط المتقطع المتوسط الحقيقي، 50. +2. ثبّت n وقلّل z إلى 1. تضيق الفترات حول المتوسطات نفسها، فيقل عدد الفترات التي تحتوي على 50. وتنخفض التغطية النظرية من نحو 95% إلى 68%. +3. أعد z إلى 1.96 وزد n إلى 96. ينخفض الهامش إلى النصف. يعيد هذا الرسم استخدام الانحرافات المعيارية نفسها للعينات، لذلك تبقى الصفوف التي لا تشمل الحقيقة هي نفسها. أما أخذ عينات جديدة فعلًا فلا يحافظ على هذا النمط بالضرورة. ## Real-life examples -- **دراسة معتادة.** ‏24 قياسًا مع z = 1.96: فترة عرضها نحو ±4، ونحو 95% من المختبرات التي تتبع هذه الطريقة ستمسك بالحقيقة. -- **الدراسة الأكبر.** ‏100 قياس وz نفسها: تضيق الفترة إلى ±2. أربعة أضعاف العمل مقابل نصف العرض. -- **المختبر المغرور.** z = 1 تعطي فترة ضيقة تبهر القارئ، والغابة تكشف الثمن: نحو ثلث هذه الفترات يخطئ الحقيقة ببساطة. +1. **24 قياسًا.** عندما يكون الانحراف المعياري للمجتمع معلومًا ويساوي 10، وz = 1.96، يكون الهامش نحو 4.00. إذا كان متوسط العينة 52، فالفترة نحو [48, 56]. +2. **100 قياس.** مع z نفسه يصبح الهامش 1.96. حجم العينة أكبر قليلًا من أربعة أمثال 24، ولذلك يقل الهامش قليلًا عن نصف هامش المثال الأول. +3. **مستوى ثقة أقل.** عند n = 24 وz = 1، يكون الهامش نحو 2.04 والتغطية النظرية نحو 68.3%. هذا مستوى ثقة مختلف، ولا يجعل الفترة مضللة ما دمنا نذكر مستواها بدقة. ## Test yourself -1. اضبط z على 1.96 الشهيرة، إعداد الـ95% المستعمل في معظم ما يُنشر من علم. -2. اجعل عرض الفترة كلها لا يتجاوز وحدتين. ستحتاج n كبيرة وz متواضعة معًا. -3. شغّل فترة على طريقة 99% ‏(z = 2.58) بعينة صغيرة لا تتجاوز 50. فترة عريضة، لكنها صادقة. +1. اجعل z قريبًا من 1.96 للحصول على تغطية نظرية تقارب 95%. +2. اجعل عرض الفترة الكامل، 2z × 10/√n، لا يتجاوز وحدتين. +3. اجعل z قريبًا من 2.58، وأبقِ n عند 50 أو أقل، للحصول على تغطية نظرية تقارب 99%. ## Intuition -ثلاثون مختبرًا تقيس الشيء نفسه: الخط المتقطع الذي لا يراه أحد منها. متوسط كل عينة يقع قريبًا من الحقيقة لا عليها، فينشر كل مختبر مدى حول ما قاس ويقول: الحقيقة غالبًا هنا. الغابة التي أمامك هي الادعاءات الثلاثون معًا، والحمراء منها مختبرات أخطأت، لا لأنها غشت، بل لأن عينتها صادفت الوقوع بعيدًا. +لنفترض أن مجموعات كثيرة تقيس الكمية نفسها. تختلف متوسطات عيناتها حتى لو استخدمت الطريقة نفسها وحجم العينة نفسه. نضع هامشًا حول كل متوسط للتعبير عن عدم اليقين الناتج عن أخذ العينة. نعرف المتوسط الحقيقي في هذا الرسم، فنستطيع التحقق من الفترات التي تحتوي عليه. أما في مسألة تقدير فعلية، فهذه هي القيمة التي نجهلها. -وهذا هو المعنى الحقيقي لعبارة «واثقون بنسبة 95%». هي لا تقول شيئًا عن فترة بعينها، فالفترة المطبوعة إما تحوي الحقيقة وإما لا. هي وعد عن الطريقة: كرر هذا الإجراء مئة مرة، تمسك نحو 95 فترة من المئة بالحقيقة. أنزل z تشترِ مظهر الدقة بثمن الصدق، وارفع n تشترِ دقة حقيقية، لأن تشتت متوسطات العينات نفسه ينكمش مثل $\dfrac{\sigma}{\sqrt{n}}$. +طريقة ذات ثقة 95% تعطي فترات تحتوي على المتوسط الحقيقي الثابت في نحو 95% من العينات المتكررة، ضمن افتراضاتها. لا تضمن احتواء 95 فترة بالضبط من كل 100 على هذا المتوسط. زيادة z توسّع الفترات وترفع تغطيتها، وزيادة n تضيّقها مع بقاء التغطية النظرية نفسها لأن متوسطات العينات تصبح أقل تفاوتًا. يستخدم العرض 30 صفًا توضيحيًا ثابتًا، ولا يسحب تجارب جديدة عند كل تغيير. ## Formal -عينة من $n$ قياسًا من مجتمع تشتته $\sigma$ يكون لمتوسطها تشتت خاص به اسمه الخطأ المعياري: $\dfrac{\sigma}{\sqrt{n}}$. والفترة $m \pm z\dfrac{\sigma}{\sqrt{n}}$ تمسك بالمتوسط الحقيقي $\mu$ تمامًا متى وقع $m$ ضمن $z$ خطأً معياريًا منه. +إذا أخذنا n مشاهدة مستقلة من مجتمع طبيعي التوزيع، بانحراف معياري معلوم σ، فإن الخطأ المعياري لمتوسط العينة m هو $\sigma/\sqrt{n}$. نكتب فترة الثقة $m\pm z\sigma/\sqrt{n}$، حيث تحدد z عدد الأخطاء المعيارية في الهامش على كل جانب. -ولأن متوسطات العينات تتوزع توزيعًا قريبًا من الطبيعي، فإن نسبة الإمساك هي احتمال الوقوع ضمن $z$ خطأً معياريًا: نحو 68% عند $z = 1$، و95% عند $z = 1.96$، و99% عند $z = 2.58$. وقراءة التغطية على الشاشة تتابع هذه النسبة مباشرة. +تغطية الفترة هي $P(|m-\mu|\le z\sigma/\sqrt{n})=\Phi(z)-\Phi(-z)$، حيث μ متوسط المجتمع الثابت، وΦ الدالة التراكمية الطبيعية المعيارية. اختيار $z=1.96$ يعطي تغطية تقارب 95%. هذه النسبة تخص طريقة أخذ العينات، ولا تعني إسناد توزيع احتمالي إلى μ بعد مشاهدة فترة واحدة. ## Advanced -في الدراسات الحقيقية يُقدَّر $\sigma$ نفسه من العينة، فتتسع الفترة الصادقة قليلًا، ويحل توزيع ستيودنت t محل $z$ في العينات الصغيرة ثم يلتقي بالطبيعي كلما كبرت $n$. والفخ الأدق فخ تفسير: بعد أن تُطبع فترة بعينها، تكون الحقيقة فيها أو خارجها، انتهى، فجملة «احتمال 95% أن الحقيقة في هذه الفترة» خاطئة بدقة في هذا الإطار. الـ95% صفة المصنع لا صفة المنتج الواحد. وفترات بايز «ذات المصداقية» هي البناء الذي يجعل الجملة المغرية صحيحة، بثمن إعلان معتقداتك المسبقة. +في النموذج الطبيعي ذي الانحراف المعياري المعلوم، يكون حساب التغطية دقيقًا باستثناء تقريب القيمة الحرجة. وقد يفيد التقريب الطبيعي لمجتمعات أخرى عند كبر العينة بما يكفي. وإذا كان σ مجهولًا وقدّرناه من مشاهدات طبيعية مستقلة، نستخدم فترة تعتمد على توزيع t بدرجات حرية n−1. فترة الثقة للمتوسط ليست فترة تنبؤ بقيمة مشاهدة فردية مستقبلية. ## Derivation -1. المتوسطات أهدأ من الأفراد: متوسطات عينات من $n$ قياسًا تتبعثر حول الحقيقة $\mu$ بتشتت قدره $\dfrac{\sigma}{\sqrt{n}}$، وهو الخطأ المعياري. -2. فترة تمتد $z$ خطأً معياريًا في كل جهة من $m$ تمسك بـ$\mu$ تمامًا متى وقع متوسط العينة ضمن $z$ خطأً معياريًا من الحقيقة. -3. والمنحنى الطبيعي يضع نحو 95% من متوسطات العينات ضمن $1.96$ خطأً معياريًا، فهذا الاختيار لـ$z$ يمسك بالحقيقة في نحو 95 من كل مئة تجربة. +1. الانحراف المعياري لمتوسط المشاهدات المستقلة يساوي σ/√n. وفي النموذج الطبيعي يتبع المتوسط نفسه توزيعًا طبيعيًا. +2. تحتوي الفترة على μ بالضبط عندما يبعد مركزها m عنه بما لا يزيد على z من الأخطاء المعيارية. +3. الاحتمال الطبيعي المعياري بين −1.96 و1.96 نحو 0.95؛ ومن هنا تأتي تغطية الطريقة التي تقارب 95%. ## Real world -### الاستطلاعات وتوقعات الانتخابات -كل عنوان «52% ± 3» هو شجرة واحدة من هذه الغابة، ونحو استطلاع من كل عشرين يخطئ بشرف من غير خطأ من أحد. +### تقدير متوسط -### تجارب الأدوية -الجهات المنظمة تقرأ الفترة لا الرقم الواحد: علاج أثره «+4 بفترة من −1 إلى +9» لم يثبت بعد أنه يعمل أصلًا. +تصف فترة لمتوسط وزن العبوات عدم اليقين حول متوسط العملية. لا تعني أن أوزان 95% من العبوات الفردية تقع داخلها. -### ضبط الجودة -المصانع تتابع فترات تقدير للأوزان والجرعات، وفترة تنحرف عن الهدف تستدعي معايرة قبل أن يلاحظ الزبائن شيئًا. +### مقارنة التقديرات -### الثوابت الفيزيائية -قياسات الثوابت الأساسية تُنشر قيمةً مع ارتياب، وتُحاكم التجارب الجديدة بمدى تراكب غاباتها مع القديمة. +اذكر حجم العينة والطريقة ومستوى الثقة مع الفترة. لا تشمل الفترة الضيقة خطأ القياس المنتظم أو انحياز أخذ العينة، إلا إذا كانت الطريقة تعالجهما صراحة. diff --git a/content/lessons/statistics/confidence-intervals/en.md b/content/lessons/statistics/confidence-intervals/en.md index 662c08eb..7dea3bb9 100644 --- a/content/lessons/statistics/confidence-intervals/en.md +++ b/content/lessons/statistics/confidence-intervals/en.md @@ -1,68 +1,61 @@ --- -title: 'Confidence intervals: thirty labs, one truth' -summary: >- - No sample tells you the truth exactly, so honest science publishes a range — - and "95% confidence" is a promise about how often the method catches the - truth, not a feeling about any single range. +title: 'Confidence intervals' +summary: 'Understand a confidence interval as a method whose repeated intervals contain the true mean at a stated rate.' parameters: - n: n — how many measurements each lab takes - z: z — how many standard errors wide the interval reaches on each side + n: 'n — observations per sample' + z: 'z — margin in standard errors' variables: - - the sample mean a lab actually measured - - the chosen width of the interval, in standard errors - - the population's spread (fixed at 10 here) + - 'sample mean at the centre of an interval' + - 'number of standard errors on each side' + - 'known population standard deviation, fixed at 10' --- ## Try it -1. Keep z = 1.96 and look at the forest: thirty labs, each with its own interval, and about 28 or 29 of the 30 catch the dashed truth — the red ones missed honestly. -2. Drop z to 1: every interval narrows and far more labs go red — narrow claims sound precise and fail often. -3. Now raise n instead: every interval tightens around the truth without losing catches, because more data shrinks the scatter itself. +1. Set n = 24 and z = 1.96. Each dot is one sample mean; its horizontal interval extends about 4 units either side. The dashed line marks the true mean, 50. +2. Keep n fixed and reduce z to 1. The same sample means now have narrower intervals, so fewer intervals contain 50. The theoretical coverage falls from about 95% to 68%. +3. Restore z = 1.96 and increase n to 96. The margin halves. This illustration reuses the same standardized sample offsets, so the same rows miss; newly collected samples would not preserve that exact pattern. ## Real-life examples -- **A typical study.** 24 measurements with z = 1.96: the interval spans about ±4, and roughly 95% of labs running this exact method would catch the truth. -- **The bigger study.** 100 measurements, same z: the interval tightens to ±2 — quadruple the work for half the width. -- **The overconfident lab.** z = 1 looks impressively tight, but the forest shows the price: about a third of such intervals simply miss. +1. **24 measurements.** With known population standard deviation 10 and z = 1.96, the margin is about 4.00. A sample mean of 52 would give roughly [48, 56]. +2. **100 measurements.** With the same z, the margin is 1.96. The sample size is slightly more than four times 24, so the margin is slightly less than half the first example's. +3. **A lower confidence level.** With n = 24 and z = 1, the margin is about 2.04 and the theoretical coverage about 68.3%. This is a different confidence level, not a dishonest interval if reported accurately. ## Test yourself -1. Dial z to the famous 1.96 — the 95% setting used in most published science. -2. Make the whole interval no wider than 2 units — you will need both a big n and a modest z. -3. Run a 99%-style interval (z = 2.58) with a small sample, n at most 50 — wide, but honest. +1. Set z close to 1.96, giving approximately 95% theoretical coverage. +2. Make the full interval width, 2z × 10/√n, at most 2 units. +3. Set z close to 2.58 and keep n at most 50, giving approximately 99% theoretical coverage. ## Intuition -Thirty labs measure the same thing — the dashed line, which none of them can see. Each lab's sample mean lands a little off, so each publishes a range around what it measured: "the truth is probably in here". The forest on screen is all thirty claims at once, and the red ones are the labs that missed — not because they cheated, but because their sample happened to land far from the truth. +Suppose many groups measure the same quantity. Even with the same method and sample size, their sample means differ. An interval puts a margin around each mean to express sampling uncertainty. In this illustration the true mean is known to us, so we can check which intervals contain it. In an actual estimation problem, that value is unknown. -That is what "95% confident" really means: nothing about any single interval, which either contains the truth or does not, but a promise about the method — run this procedure a hundred times, and about 95 of the hundred intervals will catch the truth. Slide z down and you trade honesty for the appearance of precision; slide n up and you buy genuine precision, because the scatter of sample means itself shrinks as $\dfrac{\sigma}{\sqrt{n}}$. +A 95% confidence method contains the fixed true mean in about 95% of repeated samples under its assumptions. It does not promise exactly 95 successes in every 100 samples. Increasing z widens the intervals and raises coverage; increasing n narrows them at the same theoretical coverage because sample means also become less variable. The display uses 30 fixed illustrative rows, not newly sampled experiments on every slider change. ## Formal -A sample of $n$ measurements from a population with spread $\sigma$ has a sample mean whose own scatter — the standard error — is $\dfrac{\sigma}{\sqrt{n}}$. The interval $m \pm z\dfrac{\sigma}{\sqrt{n}}$ therefore catches the true mean $\mu$ exactly when $m$ happens to land within $z$ standard errors of it. +For n independent observations from a normal population with known standard deviation σ, the sample mean m has standard error $\sigma/\sqrt{n}$. A confidence interval is $m\pm z\sigma/\sqrt{n}$, where z sets how many standard errors the margin spans on each side. -Because sample means are approximately normally distributed, the catch rate is the normal probability of landing within $z$ standard errors: about 68% for $z = 1$, 95% for $z = 1.96$, and 99% for $z = 2.58$ — the coverage readout tracks it live. +Its coverage is $P(|m-\mu|\le z\sigma/\sqrt{n})=\Phi(z)-\Phi(-z)$, where μ is the fixed population mean and Φ is the standard normal cumulative distribution. Choosing $z=1.96$ gives about 95% coverage; this refers to the sampling procedure, not a probability distribution assigned to μ after observing one interval. ## Advanced -In real studies $\sigma$ is itself estimated from the sample, which widens the honest interval slightly — Student's t distribution replaces $z$ for small $n$, converging to the normal as $n$ grows. The sharper trap is interpretational: once a specific interval is printed, the truth is either in it or not, so "there is a 95% chance the truth is in this interval" is strictly wrong under this framework — the 95% belongs to the factory, not to the single product. Bayesian credible intervals are the construction that makes the tempting sentence true, at the price of stating prior beliefs. +The known-σ normal model makes this coverage calculation exact apart from the rounded critical value. For nonnormal populations, a normal approximation may be useful with sufficiently large samples. If σ is unknown and estimated from independent normal observations, use a t interval with n−1 degrees of freedom. Confidence intervals for a mean are not prediction intervals for individual future observations. ## Derivation -1. Averages are steadier than individuals: means of $n$ measurements scatter around the truth $\mu$ with spread $\dfrac{\sigma}{\sqrt{n}}$, the standard error. -2. An interval reaching $z$ standard errors each side of $m$ catches $\mu$ precisely when the sample mean landed within $z$ standard errors of it. -3. The normal curve puts about 95% of sample means within $1.96$ standard errors — so that choice of $z$ catches the truth in about 95 of every 100 runs. +1. Independent observations have a sample mean with standard deviation σ/√n. Under the normal model, that mean is normally distributed. +2. The interval contains μ exactly when its centre m lies within z standard errors of μ. +3. The standard normal probability between −1.96 and 1.96 is about 0.95, giving the method its approximate 95% coverage. ## Real world -### Polls and election forecasts -Every "52% ± 3" headline is one tree from this forest — and about one poll in twenty misses honestly, with nobody at fault. +### Estimating an average -### Drug trials -Regulators read the interval, not the point estimate: a treatment effect of "+4, interval −1 to +9" has not yet shown it works at all. +An interval for mean package weight describes uncertainty about the process average. It does not say that 95% of individual packages have weights inside that interval. -### Quality control -Factories track interval estimates of weights and doses; an interval drifting off target triggers recalibration before customers notice. +### Comparing estimates -### Physics constants -Measurements of fundamental constants are published as value ± uncertainty, and new experiments are judged by whether forests of them overlap. +Report the sample size, method and confidence level with an interval. A narrow interval does not account for systematic measurement error or biased sampling unless the method explicitly addresses them. diff --git a/content/ui/ar/forest-of-intervals.yaml b/content/ui/ar/forest-of-intervals.yaml index 062f1271..8dbcbab3 100644 --- a/content/ui/ar/forest-of-intervals.yaml +++ b/content/ui/ar/forest-of-intervals.yaml @@ -1,6 +1,6 @@ -ci.hint: ثلاثون مختبرًا وحقيقة واحدة — وسّع z أو كبّر n وراقب من ما يزال يخطئ -ci.forest: أصابت الحقيقة هنا -ci.theory: نسبة الإصابة النظرية -ci.labs: ثلاثون مختبرًا، التجربة نفسها -ci.missed: 'أخطأت {n} {n|one=فترة|two=فترتان|few=فترات|many=فترة|other=فترة}' -ci.caption: مستوى الثقة وعدٌ بشأن الطريقة، لا بشأن أي فترة واحدة بعينها +ci.hint: 'ثلاثون متوسط عينة وفتراتها؛ المتوسط الحقيقي 50' +ci.forest: 'الفترات التي تشمل المتوسط الحقيقي' +ci.theory: 'التغطية النظرية' +ci.labs: '30 عينة توضيحية' +ci.missed: 'فترات لا تشمل المتوسط الحقيقي: {n}' +ci.caption: 'تصف الثقة التغطية عند تكرار أخذ العينات ضمن افتراضات النموذج' diff --git a/content/ui/en/forest-of-intervals.yaml b/content/ui/en/forest-of-intervals.yaml index fe8509da..d12eb7cf 100644 --- a/content/ui/en/forest-of-intervals.yaml +++ b/content/ui/en/forest-of-intervals.yaml @@ -1,6 +1,6 @@ -ci.hint: thirty labs, one truth — widen z or grow n and watch who still misses -ci.forest: caught the truth here -ci.theory: theoretical catch rate -ci.labs: 30 labs, same experiment -ci.missed: '{n} {n|one=interval|other=intervals} missed' -ci.caption: a confidence level is a promise about the method, not about any single interval +ci.hint: 'Thirty sample means and intervals; the true mean is 50' +ci.forest: 'intervals containing the true mean' +ci.theory: 'theoretical coverage' +ci.labs: '30 illustrative samples' +ci.missed: '{n} {n|one=interval|other=intervals} exclude the true mean' +ci.caption: 'Confidence describes repeated-sampling coverage under the model’s assumptions' From 76ef4c06cf6425f89908294d6b77875ee3547b63 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:54:47 +0300 Subject: [PATCH 088/124] content: rewrite hypothesis-testing for first-time learners in both languages --- .../statistics/hypothesis-testing/ar.md | 60 ++++++++---------- .../statistics/hypothesis-testing/en.md | 61 ++++++++----------- .../statistics/hypothesis-testing/lesson.yaml | 46 +++++++------- content/ui/ar/coin-court.yaml | 26 ++++---- content/ui/en/coin-court.yaml | 26 ++++---- 5 files changed, 103 insertions(+), 116 deletions(-) diff --git a/content/lessons/statistics/hypothesis-testing/ar.md b/content/lessons/statistics/hypothesis-testing/ar.md index 25578bf0..c179d44f 100644 --- a/content/lessons/statistics/hypothesis-testing/ar.md +++ b/content/lessons/statistics/hypothesis-testing/ar.md @@ -1,66 +1,60 @@ --- -title: 'اختبار الفرضيات: هل العملة مغشوشة؟' -summary: >- - عملة تهبط صورةً في 55% من الرميات: غش أم حظ؟ الجواب ينقلب كليًّا مع عدد الرميات التي - شاهدتها، والمحكمة هنا أمامك. +title: 'اختبار فرضية العملة العادلة' +summary: 'قارن نسبة ظهور الوجه بما يتوقعه نموذج عملة عادلة، وافهم الفرق بين دليل إحصائي وإثبات قاطع.' parameters: - obs: obs — نسبة الصور المرصودة - n: n — عدد الرميات المشاهدة + obs: 'نسبة ظهور الوجه المشاهدة' + n: 'n — عدد الرميات' variables: - - كم تمايلًا طبيعيًا لعملة عادلة يبعد الدليل عن 50% - - نسبة الصور المرصودة، كسرًا + - 'الفرق عن 50% بوحدات الخطأ المعياري لنموذج العدم' + - 'نسبة ظهور الوجه مكتوبة ككسر' --- ## Try it -1. ابدأ عند 55% على 100 رمية: المؤشر يجلس مرتاحًا داخل الجرس. العملات العادلة تصل إلى هذا الحد كثيرًا، فلا إدانة. -2. أبقِ 55% وارفع n إلى 2000: ينضغط الجرس إلى إبرة، وتقف الـ55% نفسها خارجه بعيدًا. الدليل نفسه صار إدانة. -3. جرب 70% على 10 رميات فقط: فرق ضخم، لكن الجرس من الاتساع بحيث تهز المحكمة كتفيها. المفاجأة وحدها لا تدين، الدليل الكافي يدين. +1. اجعل النسبة المشاهدة 55% وn = 100. الخطأ المعياري تحت نموذج العملة العادلة 5 نقاط مئوية، ولذلك يعطي الفرق المشاهد z = 1. +2. أبقِ النسبة 55% وزد n إلى 2000. ينخفض الخطأ المعياري إلى نحو 1.12 نقطة مئوية، ويرتفع z إلى نحو 4.47. أصبح الفرق نفسه دليلًا أقوى ضد نموذج العملة العادلة. +3. جرّب 70% وn = 10. هذا يمثل ظهور الوجه 7 مرات من 10، ويعطي z ≈ 1.26، فلا يتجاوز الحد المعروض. التقريب الطبيعي غير دقيق كثيرًا مع هذا الحجم الصغير. ## Real-life examples -- **عملة كازينو مشبوهة.** ‏55% صورًا في 100 رمية تعطي z = 1. العملات العادلة تفعل هذا طوال الوقت، واتهام أحد بهذا الدليل فضيحة. -- **العملة نفسها تحت مراقبة أطول.** ‏55% في 2000 رمية تعطي z ≈ 4.5. الحظ وحده يفعل هذا أقل من مرة في مئة ألف تجربة. -- **العرض المحظوظ.** ‏7 صور من 10 رميات تبدو خبرًا، لكن z ≈ 1.3 فقط. عشر رميات لا تكفي لإدانة أحد، مهما بدت النتيجة. +1. **55 مرة من 100.** النسبة 55%، وz = 1. لا يرفض الاختبار نموذج العملة العادلة، لكنه لا يثبت صحته. +2. **1100 مرة من 2000.** النسبة نفسها، 55%، تعطي z ≈ 4.47، فتتجاوز الحد المعروض. هذه النتيجة غير معتادة تحت فرض الرميات المستقلة العادلة، لكنها لا تثبت التلاعب المتعمد. +3. **7 مرات من 10.** تبلغ النسبة 70%، لكن صغر العينة يعطي z ≈ 1.26. يفضّل استخدام اختبار دقيق مبني على توزيع ذي الحدين لهذا العدد الصغير. ## Test yourself -1. أوقف الدليل على العتبة بالضبط: حرّك obs وn حتى تقف z عند 1.96. -2. أبقِ النسبة عند 55% واجعلها دالة إحصائيًا بحجم العينة وحده. -3. جِد حالة فيها 65% صورًا أو أكثر وما تزال ترسب في الاختبار. صغر n هو الثغرة. +1. عدّل النسبة وn حتى لا يبتعد z عن 1.96 بأكثر من 0.05. +2. أبقِ النسبة المشاهدة قريبة من 55%، وزد n حتى يبلغ z قيمة 1.96 على الأقل. +3. اختر نسبة مشاهدة لا تقل عن 65%، مع z أقل من 1.96. ## Intuition -ضع العملة في قفص الاتهام. رواية الدفاع مملة: هذه عملة عادلة، والعملات العادلة تتمايل. هذه الرواية هي الجرس الذي على الشاشة: المنطقة التي تقع فيها نسب الصور لعملة عادلة عادة، متمركزة على 50% وتضيق كلما زادت الرميات، لأن الحظ يذوب في المتوسط مع الكثرة. وليس بيد الادعاء إلا ورقة واحدة: المؤشر البرتقالي، النسبة التي رُصدت فعلًا. +لفحص عدالة عملة، نبدأ بافتراض أن الرميات مستقلة وأن احتمال ظهور الوجه 0.5. نسمي هذا «فرضية العدم». يتوقع النموذج اختلاف نسب ظهور الوجه بين العينات، مع تفاوت أقل في العينات الأكبر. يوضح الجرس الشكل التقريبي لهذه النسب تحت النموذج، ويحدد الخط الرأسي النسبة التي نختبرها. -وقاعدة المحكمة بسيطة: لا إدانة إلا إذا وقعت الورقة حيث لا يكاد الحظ يصل. حرّك n وشاهد القضية تنقلب والدليل ثابت: 55% داخل جرس عريض لا تساوي شيئًا، و55% خارج جرس كالإبرة إدانة قاطعة. هذا هو منطق «الدلالة الإحصائية» كله، وهذه أيضًا أشهر قراءة خاطئة له: «دالّ إحصائيًا» لا تعني أبدًا أن الأثر كبير، تعني فقط أنه أوضح من أن يكون حظًا. +نقارن فرق النسبة المشاهدة عن 50% بالتفاوت الذي يتوقعه النموذج. فرق خمس نقاط مئوية يساوي خطأ معياريًا واحدًا عند n = 100، لكنه يزيد على أربعة عند n = 2000. تجاوز حد اخترناه يقدم دليلًا ضد النموذج، ولا يثبت سبب الاختلاف. وعدم تجاوزه لا يثبت عدالة العملة. كذلك لا تقيس الدلالة الإحصائية الأهمية العملية للفرق. ## Formal -تحت الفرضية المملة، أي عملة عادلة، تتبعثر نسبة الصور المرصودة $h$ حول $0.5$ بانحراف معياري قدره $\dfrac{0.5}{\sqrt{n}}$. وإحصائية الاختبار $z = \dfrac{h - 0.5}{0.5/\sqrt{n}}$ تعدّ كم تمايلًا طبيعيًا يبعد الدليل عن المركز. +في رميات مستقلة لعملة عادلة، يكون الخطأ المعياري لنسبة ظهور الوجه h هو $0.5/\sqrt{n}$. يقيس الإحصاء $z=(h-0.5)/(0.5/\sqrt{n})$ الفرق المشاهد بوحدات الخطأ المعياري. نكتب h ككسر؛ فالنسبة 55% تعني 0.55. -والعرف التقليدي يرفض الفرضية المملة حين تتجاوز $z$ نحو $1.96$، وهو حد لا تتجاوزه عملة عادلة إلا بضع مرات في كل مئة تجربة. والاحتمال المقابل في ذيل المنحنى هو «قيمة p»: فرصة ظهور دليل بهذا التطرف أو أكثر من دون أي غش. +يرفض اختبار ثنائي الطرف بتقريب طبيعي ومستوى 5% الفرضية عندما $|z|\ge1.96$. تسمح أدوات التحكم بنسب تبدأ من 50% فقط، لذلك يعرض الرسم الطرف العلوي. القيمة الاحتمالية التقريبية ثنائية الطرف هي $2[1-\Phi(|z|)]$؛ أي احتمال نتيجة تبعد عن 50% بهذا المقدار على الأقل في أي اتجاه، بافتراض صحة نموذج العدم. ## Advanced -عرف الـ5% يعني أن واحدًا من كل عشرين «اكتشافًا» إنذار كاذب حتى لو كان الجميع شرفاء. فإذا اختبر باحث عشرين فكرة ونشر الوحيدة التي عبرت الخط، امتلأت المجلات بعملات محظوظة. هذا هو «التلاعب بقيم p»، ولهذا تسجل الحقول الجادة تحليلاتها قبل جمع البيانات، أو تطلب تكرار النتيجة، أو تنزل بالعتبة تحت 5% بكثير. والدرس الأعمق يعمل بالاتجاهين: الرسوب في الاختبار لا يثبت أن العملة عادلة، فغياب الدليل ليس دليل غياب؛ والنجاح فيه عند n = 2000 قد يلتقط انحيازًا قدره نصف بالمئة: حقيقي، وتافه تمامًا. +القيمة الاحتمالية ليست احتمال صحة فرضية العدم، وليست احتمال أن تكون النتيجة إنذارًا كاذبًا. اختبار بمستوى 5% يرفض في نحو 5% من التجارب المتكررة عندما يصح نموذج العدم ويصلح التقريب. للعينات الصغيرة نستخدم احتمالات ذي الحدين الدقيقة. ولا تمثل كل قيم المنزلقات عددًا فعليًا من الرميات؛ إذ يجب أن يكون حاصل ضرب n في h عددًا صحيحًا. كما أن تكرار الفحص حتى نتجاوز الحد يغيّر معدل الخطأ، ما لم تراعِ الطريقة ذلك. ## Derivation -1. إن كانت العملة عادلة فكل رمية سحب متساوي الاحتمالين، فتتمايل نسبة الصور $h$ في $n$ رمية حول $0.5$ بتشتت قدره $\dfrac{0.5}{\sqrt{n}}$. -2. اقسم الفجوة المرصودة على هذا التمايل الطبيعي تحصل على $z = \dfrac{h - 0.5}{0.5/\sqrt{n}}$: رقم صافٍ يقارن أي تجربة بأي تجربة. -3. والمنحنى الطبيعي يقول إن $z > 1.96$ لا تنشأ من الحظ وحده إلا مرتين أو ثلاثًا في المئة. ندرة تكفي لهجر التفسير الممل. +1. تباين الرمية العادلة 0.25. في n رمية مستقلة يكون تباين نسبة ظهور الوجه 0.25/n، وخطؤها المعياري 0.5/√n. +2. نطرح متوسط فرضية العدم، 0.5، ثم نقسم على الخطأ المعياري لقياس الفرق بمقياس موحد. +3. يقع المتغير الطبيعي المعياري خارج المجال من −1.96 إلى 1.96 في نحو 5% من الحالات، منها نحو 2.5% في كل طرف. ومن ذلك نأخذ الحد التقريبي للاختبار ثنائي الطرف. ## Real world -### اعتماد الأدوية -«تفوق العلاج على الدواء الوهمي، p < 0.05» هو قاعة المحكمة هذه بمرضى بدل رميات، والجهات المنظمة اليوم تطلب غالبًا إدانتين مستقلتين. +### فحص مولّد عشوائي -### اختبارات A/B -شركات التقنية تدير آلاف هذه المحاكمات يوميًا: هل الزر الجديد يبيع أكثر فعلًا، أم صادف أسبوعًا محظوظًا؟ +نقارن تكرارات النتائج بنموذج محدد. قد يعود الاختلاف إلى المولّد، أو ترابط المشاهدات، أو طريقة جمع البيانات. الاختبار وحده لا يحدد السبب. -### إنذارات الجودة -المصانع تراقب نسبة العيوب لحظيًا وتوقف الآلة حين تخرج عن نطاق التمايل العادل. هي z نفسها تعمل على الخط. +### مقارنة تصميمين -### كشف الغشاشين -الألعاب والاختبارات الإلكترونية تعلّم الحسابات التي تقف نسب فوزها تمايلات كثيرة خارج جرس البشر، فالحظ دفاع يترقق بسرعة. +يمكن لتجربة مضبوطة اختبار فرق محدد مسبقًا بين تصميمين. نحتاج حينها إلى اختبار لمجموعتين، لا إلى صيغة العملة الواحدة هنا، ونذكر حجم الفرق وعدم اليقين إلى جانب القيمة الاحتمالية. diff --git a/content/lessons/statistics/hypothesis-testing/en.md b/content/lessons/statistics/hypothesis-testing/en.md index 71aa282a..c081ec4f 100644 --- a/content/lessons/statistics/hypothesis-testing/en.md +++ b/content/lessons/statistics/hypothesis-testing/en.md @@ -1,67 +1,60 @@ --- -title: 'Hypothesis testing: is the coin rigged?' -summary: >- - A coin lands heads 55% of the time — cheating, or luck? The court's only - question is how far outside a fair coin's natural wobble the evidence falls, - and the answer flips entirely with how many flips you watched. +title: 'Testing a fair-coin hypothesis' +summary: 'Compare an observed heads proportion with what a fair-coin model predicts, while separating evidence from proof.' parameters: - obs: obs — the observed share of heads - n: n — how many flips were watched + obs: 'observed heads proportion' + n: 'n — number of flips' variables: - - how many of the fair coin's natural wobbles the evidence sits from 50% - - the observed share of heads, as a fraction + - 'observed difference from 50%, in null-model standard errors' + - 'observed heads proportion written as a fraction' --- ## Try it -1. Start at 55% over 100 flips: the marker sits comfortably inside the bell — a fair coin wanders this far all the time, case dismissed. -2. Keep 55% but raise n to 2000: the bell squeezes to a needle, the same 55% now stands far outside it, and the verdict flips to "beyond luck". -3. Now try 70% over just 10 flips: a huge effect, yet the bell is so wide the court still shrugs — surprise needs evidence, not just a big number. +1. Set the observed proportion to 55% and n = 100. The fair-coin standard error is 5 percentage points, so the observed difference gives z = 1. +2. Keep 55% and raise n to 2000. The standard error falls to about 1.12 percentage points and z rises to about 4.47. The same difference now provides stronger evidence against the fair-coin model. +3. Try 70% and n = 10. This represents 7 heads in 10 flips and gives z ≈ 1.26. It does not cross the displayed threshold. The normal approximation is rough at this sample size. ## Real-life examples -- **The suspicious casino coin.** 55% heads over 100 flips gives z = 1 — fair coins do this constantly, and accusing anyone would be embarrassing. -- **The same coin, properly surveilled.** 55% over 2000 flips gives z ≈ 4.5 — pure luck does that less than once in a hundred thousand runs. -- **The lucky demo.** 7 heads out of 10 looks damning in a headline, but z ≈ 1.3 — ten flips simply cannot convict anyone. +1. **55 heads in 100 flips.** The observed share is 55%, giving z = 1. This test does not reject the fair-coin model; it does not prove that model true. +2. **1100 heads in 2000 flips.** The same 55% gives z ≈ 4.47, beyond the displayed threshold. The result is unusual under independent fair flips, but does not establish intentional manipulation. +3. **7 heads in 10 flips.** The share is 70%, yet the small sample gives z ≈ 1.26. An exact binomial test is preferable for such a small count. ## Test yourself -1. Land the evidence exactly on the threshold: tune obs and n until z sits at 1.96. -2. Keep the share at 55% and make it significant using sample size alone. -3. Find a case with at least 65% heads that still fails the test — small n is the loophole. +1. Adjust the share and n to put z within 0.05 of 1.96. +2. Keep the observed share close to 55% and increase n until z reaches at least 1.96. +3. Choose an observed share of at least 65% with z below 1.96. ## Intuition -Put the coin on trial. The defence's story is boring: "it is a fair coin, and fair coins wobble". That story is the bell on screen — the territory where a fair coin's share of heads naturally lands, centred on 50% and getting narrower as more flips are watched, because luck averages out. The prosecution has one exhibit: the orange marker, the share actually observed. +To test whether a coin is fair, start by assuming independent flips with a heads probability of 0.5. This assumption is the null hypothesis. It predicts that different samples will give different heads proportions, with smaller variation in larger samples. The bell illustrates the approximate shape of those proportions under that model; the vertical observation marker shows the proportion being tested. -The court's rule is humble: convict only when the exhibit lands where luck almost never goes. Slide n and watch the whole case turn without the evidence changing — 55% inside a wide bell is nothing, 55% outside a needle-thin bell is damning. That is the entire logic of statistical significance, and also its most common misreading: "significant" never means the effect is big, only that it is too consistent to be luck. +We compare the observed difference from 50% with the variation predicted by the model. A difference of five percentage points is one standard error at n = 100, but more than four at n = 2000. Crossing a chosen threshold is evidence against the model, not proof of a cause. Failing to cross it does not establish fairness, and statistical significance does not measure the practical importance of a difference. ## Formal -Under the boring hypothesis — a fair coin — the observed share of heads $h$ scatters around $0.5$ with standard deviation $\dfrac{0.5}{\sqrt{n}}$. The test statistic $z = \dfrac{h - 0.5}{0.5/\sqrt{n}}$ counts how many of those natural wobbles the evidence sits from the centre. +Under independent fair flips, the observed heads share h has standard error $0.5/\sqrt{n}$. The statistic $z=(h-0.5)/(0.5/\sqrt{n})$ measures the observed difference in standard-error units. Here h is a fraction, so 55% means 0.55. -The conventional threshold rejects the boring hypothesis when $z$ exceeds about $1.96$, which a fair coin does by luck only a few times in a hundred runs. The corresponding tail probability is the p-value: the chance of evidence at least this extreme arising with no cheating at all. +A two-sided normal-approximation test at the 5% level rejects when $|z|\ge1.96$. The controls only allow shares at or above 50%, so this view shows the upper side. The approximate two-sided p-value is $2[1-\Phi(|z|)]$: the probability, under the null model, of a result at least as far from 50% in either direction. ## Advanced -The 5% convention means one "discovery" in twenty is a false alarm even when everyone is honest — and if researchers test twenty things and publish the one that crossed the line, the published record fills with lucky coins. That is p-hacking, and it is why serious fields preregister their analyses, demand replication, or move the threshold far below 5%. The deeper lesson runs both ways: failing the test never proves the coin fair (absence of evidence is not evidence of absence), and passing it with n = 2000 may flag a bias of half a percent — real, and utterly unimportant. +A p-value is not the probability that the null hypothesis is true, nor the probability that a finding is a false alarm. A 5% test has an approximately 5% rejection rate over repeated experiments when its null model and approximation apply. For small samples, use exact binomial probabilities. Also, not every slider combination represents an actual count: n times h must be an integer for observed coin flips. Testing repeatedly until a threshold is crossed changes the error rate unless the procedure accounts for it. ## Derivation -1. If the coin is fair, each flip is a 50–50 draw, so over $n$ flips the share of heads $h$ wobbles around $0.5$ with spread $\dfrac{0.5}{\sqrt{n}}$. -2. Dividing the observed gap by that natural wobble gives $z = \dfrac{h - 0.5}{0.5/\sqrt{n}}$, a pure number comparable across any experiment. -3. The normal curve says $z > 1.96$ arises from luck alone only a couple of times in a hundred — rare enough that the boring explanation is abandoned. +1. A fair flip has variance 0.25. For n independent flips, the heads proportion has variance 0.25/n and standard error 0.5/√n. +2. Subtract the null mean 0.5 and divide by the standard error to express the difference on a common scale. +3. A standard normal variable falls outside −1.96 to 1.96 about 5% of the time, with about 2.5% in each tail. This supplies the approximate two-sided threshold. ## Real world -### Drug approvals -"The treatment beat placebo, p < 0.05" is this exact courtroom with patients instead of flips — and regulators now often demand two independent convictions. +### Checking a random generator -### A/B testing -Every tech company runs thousands of these trials daily, asking whether the new button genuinely converts better or just got lucky traffic. +Compare observed output frequencies with a specified model. A discrepancy could reflect the generator, dependent observations or the way the data were collected; the test alone does not identify which. -### Quality alarms -Factories flag a machine when its defect share drifts outside the fair-wobble band — the same z, watching in real time. +### Comparing designs -### Spotting cheats -Online games and exams flag accounts whose win rates sit many wobbles beyond the population's bell — luck is a defence that thins exponentially. +A controlled comparison can test a predefined difference between two designs. That requires a test for two groups, not this single fair-coin formula, and should report the effect size and uncertainty as well as a p-value. diff --git a/content/lessons/statistics/hypothesis-testing/lesson.yaml b/content/lessons/statistics/hypothesis-testing/lesson.yaml index 6bf3769c..7ca841cf 100644 --- a/content/lessons/statistics/hypothesis-testing/lesson.yaml +++ b/content/lessons/statistics/hypothesis-testing/lesson.yaml @@ -3,16 +3,16 @@ subject: statistics difficulty: high-school equation: z = \dfrac{h - 0.5}{0.5/\sqrt{n}} concepts: -- hypothesis-test -- significance -- null-hypothesis -- p-value + - hypothesis-test + - significance + - null-hypothesis + - p-value prerequisites: -- normal-distribution -- probability-basics + - normal-distribution + - probability-basics related: -- confidence-intervals -- law-of-large-numbers + - confidence-intervals + - law-of-large-numbers visualization: type: coin-court parameters: @@ -21,29 +21,29 @@ parameters: max: 70 step: 0.5 value: 55 - unit: "%" + unit: '%' n: min: 10 max: 2000 step: 10 value: 100 variables: -- z -- h + - z + - h derivation: -- \text{a fair coin's share of heads scatters with spread } \dfrac{0.5}{\sqrt{n}} -- z = \dfrac{h - 0.5}{0.5/\sqrt{n}} -- z > 1.96 \text{ happens by pure luck about 2 or 3 times in 100} + - \text{a fair coin's share of heads scatters with spread } \dfrac{0.5}{\sqrt{n}} + - z = \dfrac{h - 0.5}{0.5/\sqrt{n}} + - P(|Z| \ge 1.96) \approx 0.05 \quad (Z\sim\mathcal N(0,1)) charts: [] primary: n presets: -- obs: 55 - n: 100 -- obs: 55 - n: 2000 -- obs: 70 - n: 10 + - obs: 55 + n: 100 + - obs: 55 + n: 2000 + - obs: 70 + n: 10 challenges: -- check: abs((obs/100 - 0.5)*sqrt(n)/0.5 - 1.96) < 0.05 -- check: abs(obs - 55) < 0.3 and (obs/100 - 0.5)*sqrt(n)/0.5 >= 1.96 -- check: obs >= 65 and (obs/100 - 0.5)*sqrt(n)/0.5 < 1.96 + - check: abs((obs/100 - 0.5)*sqrt(n)/0.5 - 1.96) < 0.05 + - check: abs(obs - 55) < 0.3 and (obs/100 - 0.5)*sqrt(n)/0.5 >= 1.96 + - check: obs >= 65 and (obs/100 - 0.5)*sqrt(n)/0.5 < 1.96 diff --git a/content/ui/ar/coin-court.yaml b/content/ui/ar/coin-court.yaml index dedf7939..b80d9b37 100644 --- a/content/ui/ar/coin-court.yaml +++ b/content/ui/ar/coin-court.yaml @@ -1,13 +1,13 @@ -hyp.hint: النسبة المرصودة نفسها مع n مختلف — الدلالة شأن الدليل، لا شأن العنوان -hyp.obs: نسبة الصور المرصودة -hyp.fair: أرض العملة العادلة · 50% -hyp.edge: z = 1.96 -hyp.flips: رمية -hyp.verdictL: الحكم -hyp.luck: قد يكون حظًا -hyp.rigged: فوق الحظ -hyp.verdictOk: قد يكون حظًا بسهولة — تُرفض الدعوى -hyp.verdictBad: فوق الحظ المعقول — على العملة أن تجيب عن أسئلة -hyp.okNote: العملة العادلة تشرد إلى هذا الحد كثيرًا؛ اجمع رميات أكثر قبل اتهام أحد -hyp.badNote: العملة العادلة تهبط بعيدًا هكذا أقل من 5 مرات في 100 — لم يعد الحظ قصة مقنعة -hyp.caption: يضيق الجرس بنسبة 1/√n — الـ55% نفسها لا تعني شيئًا عند 100 رمية وتدين عند 2000 +hyp.hint: 'قارن النسبة المشاهدة بنموذج عملة عادلة؛ يؤثر حجم العينة في قوة الدليل' +hyp.obs: 'نسبة ظهور الوجه المشاهدة' +hyp.fair: 'متوسط نموذج العدم · 50%' +hyp.edge: 'z = 1.96' +hyp.flips: 'رمية' +hyp.verdictL: 'قرار الاختبار' +hyp.luck: 'لا نرفض الفرضية' +hyp.rigged: 'نرفض فرضية العدم' +hyp.verdictOk: 'لا تتجاوز النتيجة حد الاختبار' +hyp.verdictBad: 'تتجاوز النتيجة حد الاختبار' +hyp.okNote: 'هذه النتيجة لا تثبت أن العملة عادلة.' +hyp.badNote: 'الدليل ضد نموذج العملة العادلة لا يثبت التلاعب.' +hyp.caption: 'تقريب طبيعي لاختبار ثنائي الطرف بمستوى 5%؛ التحكم يعرض نسبًا ≥ 50% فقط' diff --git a/content/ui/en/coin-court.yaml b/content/ui/en/coin-court.yaml index ba572db5..2bcea306 100644 --- a/content/ui/en/coin-court.yaml +++ b/content/ui/en/coin-court.yaml @@ -1,13 +1,13 @@ -hyp.hint: same observed share, different n — significance is about the evidence, not the headline -hyp.obs: observed heads -hyp.fair: a fair coin's territory · 50% -hyp.edge: z = 1.96 -hyp.flips: flips -hyp.verdictL: verdict -hyp.luck: could be luck -hyp.rigged: beyond luck -hyp.verdictOk: could easily be luck — case dismissed -hyp.verdictBad: beyond reasonable luck — the coin has questions to answer -hyp.okNote: a fair coin wanders this far quite often; collect more flips before accusing anyone -hyp.badNote: a fair coin lands this far out less than 5 times in 100 — luck is no longer a good story -hyp.caption: the bell narrows as 1/√n — the same 55% is nothing at 100 flips and damning at 2000 +hyp.hint: 'Compare the observed share with a fair-coin model; sample size affects the evidence' +hyp.obs: 'observed heads' +hyp.fair: 'null-model mean · 50%' +hyp.edge: 'z = 1.96' +hyp.flips: 'flips' +hyp.verdictL: 'test decision' +hyp.luck: 'do not reject' +hyp.rigged: 'reject null model' +hyp.verdictOk: 'Does not cross the test threshold' +hyp.verdictBad: 'Crosses the test threshold' +hyp.okNote: 'This result does not establish that the coin is fair.' +hyp.badNote: 'Evidence against the fair-coin model is not proof of manipulation.' +hyp.caption: 'Normal approximation, two-sided 5% test; controls show only shares ≥ 50%' From d99aeaad8108fbc17dc5bda299da223e104ca593 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:54:48 +0300 Subject: [PATCH 089/124] content: rewrite sampling-and-polls for first-time learners in both languages --- .../statistics/sampling-and-polls/ar.md | 62 +++++++++--------- .../statistics/sampling-and-polls/en.md | 63 +++++++++---------- content/ui/ar/poll-sample.yaml | 24 +++---- content/ui/en/poll-sample.yaml | 24 +++---- 4 files changed, 80 insertions(+), 93 deletions(-) diff --git a/content/lessons/statistics/sampling-and-polls/ar.md b/content/lessons/statistics/sampling-and-polls/ar.md index bc934a6e..5551cc9a 100644 --- a/content/lessons/statistics/sampling-and-polls/ar.md +++ b/content/lessons/statistics/sampling-and-polls/ar.md @@ -1,67 +1,61 @@ --- -title: 'الاستطلاعات: تسأل ألفًا لتعرف الملايين' -summary: >- - استطلاع نزيه لألف شخص يعرف رأي بلد بملايينه بخطأ نحو ثلاث نقاط، واستطلاع منحاز - لمليون شخص يبقى مخطئًا للأبد. طريقة السؤال أهم من عدد المسؤولين. +title: 'العينات وهامش الخطأ والانحياز' +summary: 'ميّز بين تفاوت العينات الذي يقل بزيادة حجمها، والانحياز المنتظم الذي لا تزيله زيادة الإجابات وحدها.' parameters: - p: p — التأييد الحقيقي في البلد - n: n — المستطلَعون فعلًا - bias: bias — كم تميل طريقة الاستطلاع + p: 'نسبة التأييد الحقيقية في المجتمع' + n: 'n — حجم العينة' + bias: 'الانحياز الموجب بالنقاط المئوية' variables: - - هامش الخطأ، نصف العرض الصادق لفترة الاستطلاع - - النسبة الحقيقية المراد تقديرها + - 'الهامش التقريبي الناتج عن تفاوت العينات، قبل إضافة الانحياز' + - 'نسبة التأييد الحقيقية؛ نحول النسبة المئوية إلى كسر في الصيغة' --- ## Try it -1. أبقِ الإعدادات وانظر إلى الساحة: النقاط هي البلد، والمحوَّطون هم العينة التي سُئلت فعلًا، والفترة المنشورة في الأسفل تجلس حول الحقيقة. -2. قلّص n إلى 200: تتسع الفترة إلى نحو ±7 نقاط، أعرض من أن تحسم أي سباق متقارب. -3. اضبط bias على 5 مع n عند 5000: فترة ضيقة جميلة ومخطئة بثقة. الحقيقة خارجها، ومزيد من الناس لن يصلحها. +1. اجعل التأييد الحقيقي 52% وn = 1000 والانحياز 0. الهامش نحو 3.10 نقاط مئوية. قارن التقدير المعروض وفترته بالعلامة التي تحدد التأييد الحقيقي. +2. ثبّت التأييد والانحياز، وقلّل n إلى 200. يرتفع الهامش إلى نحو 6.92 نقاط. النقاط تمثيل توضيحي للمجتمع، وليست عرضًا حرفيًا لعدد المشاركين n. +3. اجعل n = 5000 والانحياز 5. ينخفض الهامش إلى نحو 1.38 نقطة، لكن التقدير ينزاح إلى أعلى بمقدار 5 نقاط، إضافة إلى تغير توضيحي صغير. لا تشمل الفترة الضيقة القيمة الحقيقية. ## Real-life examples -- **استطلاع وطني معتاد.** ألف مستجيب عند تأييد 52%: هامش نحو ±3.1. يكفي ليقول «متقدم»، ولا يكفي لحسم سباق 51 مقابل 49. -- **الاستطلاع السريع الرخيص.** مئتا مستجيب: ±6.9 نقطة من الضباب الصادق. لهذا تتناقض الاستطلاعات الصغيرة بصوت عال. -- **كارثة 1936.** مجلة ليتراري دايجست سألت أكثر من مليوني شخص عبر سجلات السيارات والهواتف، أي بيوت الأغنياء في ذلك الزمن، وأعلنت فوز الرئيس الخطأ رغم ضخامة العينة. +1. **1000 مشارك.** عند تأييد حقيقي 52% وانحياز صفري، يكون هامش النموذج نحو 3.10 نقاط. ظهور تقدير قريب من 52% لا يكفي بالضرورة لإثبات أن التأييد يتجاوز 50%. +2. **200 مشارك.** مع التأييد نفسه والانحياز الصفري، يصبح الهامش نحو 6.92 نقاط. البيانات الأقل تعني عدم يقين أكبر ناتجًا عن العينة، ضمن الافتراضات نفسها. +3. **عينة كبيرة منحازة.** عند n = 5000 وانحياز ثابت يرفع التقدير 5 نقاط، يبلغ الهامش نحو 1.38 نقطة فقط. زيادة n تقلل التفاوت العشوائي، لكنها تترك الانحياز الثابت كما هو. ## Test yourself -1. حقق هامشًا صادقًا قدره 1.5 نقطة أو أفضل. ستحتاج قرابة الخمسة آلاف كلهم. -2. اضبط n على 200 بالضبط وشاهد الهامش يبلغ نحو 7 نقاط. -3. أعد تمثيل ليتراري دايجست: انحياز لا يقل عن 4.5 مع عينة لا تقل عن 4500. ضيّق وواثق ومخطئ. +1. اجعل الهامش لا يتجاوز 1.5 نقطة مئوية، وأبقِ الانحياز أقل من 0.25 نقطة. +2. اجعل n = 200، واختر نسبة تأييد تعطي هامشًا لا يقل عن 6.9 نقاط مئوية. +3. اجعل الانحياز 4.5 نقاط مئوية على الأقل، وn لا يقل عن 4500. ## Intuition -ملعقة واحدة تكفي لتذوق قدر حساء كامل، بشرط أن يكون القدر ممزوجًا جيدًا. هذه معجزة الاستطلاع كلها: ألف شخص اختيروا عشوائيًا حقًا يكفون لمعرفة رأي بلد بملايينه، لأن عشوائية الاختيار تضمن أن الملعقة تشبه القدر. الساحة على الشاشة هي القدر، والنقاط المحوَّطة هي الملعقة، والفترة المنشورة تحتها هي أقصى ما يستطيع الاستطلاع قوله بصدق. +تعطي العينات العشوائية المختلفة من المجتمع نفسه تقديرات مختلفة للتأييد عادة. ينشأ هذا التفاوت من الأشخاص الذين صادف أن شملتهم العينة، وتقلله العينات المستقلة الأكبر. أما الانحياز المنتظم فشيء آخر؛ فقد تميل طريقة الاختيار أو القياس باستمرار نحو نتيجة معينة. تكرار الطريقة المنحازة نفسها أكثر لا يضمن اقتراب متوسطها من الحقيقة. -ولهذا الادعاء عدوان مختلفان. الأول الضجيج الصادق: حظ من صادف وقوعه في الملعقة، وهذا ينكمش مع $\sqrt{n}$، أي أن مضاعفة الدقة تحتاج أربعة أضعاف الناس، وبعد الألف تقريبًا لا يشتري المستجيبون الجدد شيئًا يذكر. والثاني الانحياز: القدر غير الممزوج. إذا كانت طريقة السؤال نفسها مائلة، كالاتصال بالهواتف الأرضية وحدها، انزاحت الفترة كلها جانبًا بمقدار الميل، ولا حجم عينة على وجه الأرض يصلح ذلك. والفترة الضيقة حول المكان الخطأ هي أخطر كائن في الإحصاء. +يفصل العرض بين الأثرين بإضافة انحياز موجب قابل للتعديل إلى تغير صغير وثابت حول النسبة الحقيقية. إنه توضيح للفكرة، وليس محاكاة كاملة لعينات متكررة؛ فعند انحياز صفري تحتوي فترته المصممة على الحقيقة دائمًا. أما طريقة فعلية بمستوى ثقة 95% فقد تخطئ حتى دون انحياز. كذلك فإن النقاط والجزء المميز منها رسم تخطيطي، وليست البيانات المستخدمة لحساب التقدير. ## Formal -لنسبة حقيقية $p$ تُقدَّر من $n$ مستجيبًا عشوائيًا، تتبعثر نسبة العينة بخطأ معياري قدره $\sqrt{\dfrac{p(1-p)}{n}}$، وهامش الخطأ التقليدي عند 95% هو $E = 1.96\sqrt{\dfrac{p(1-p)}{n}}$: نحو $\pm 3$ نقاط عند $n = 1000$، ويبلغ أقصى اتساعه عند $p = 0.5$. +في n مشاهدة مستقلة بنتيجتين، ونسبة حقيقية p، يكون الخطأ المعياري لنسبة العينة $\sqrt{p(1-p)/n}$. وعندما يصلح التقريب الطبيعي، يكون الهامش $E=1.96\sqrt{p(1-p)/n}$. نستخدم p ككسر في الصيغة؛ فنختار 52% في أداة التحكم، لكن نحسب باستخدام 0.52. -أما الانحياز فيُضاف إضافة ولا يذوب في المتوسط: طريقة تميل بمقدار $b$ تبلّغ عن نحو $p + b$ مهما كبرت $n$، فتتقارب فترة الاستطلاع المنحاز بثقة تامة على الرقم الخطأ. عشوائية الاختيار، لا حجم العينة، هي الشرط الذي تفترضه الصيغة بصمت. +نضرب E في 100 لقراءته بالنقاط المئوية. عند ثبات p، يؤدي استبدال n بـ4n إلى خفض E إلى النصف. يبلغ الهامش أكبر قيمة عند $p=0.5$. يضيف هذا النموذج التعليمي انحيازًا ثابتًا b إلى مركز التقدير، فيصبح $p+b$، ولا تزيل زيادة n هذا الانزياح. ## Advanced -المستطلعون المحترفون يحاربون الانحياز أكثر مما يحاربون الضجيج: يوزنون المستجيبين ليطابقوا تركيبة السكان في العمر والمنطقة والتعليم، ويطاردون من لا يرد على الهاتف لأن انحياز عدم الاستجابة هو ليتراري دايجست عصرنا، وينشرون «ميل الدار» ليصحح المجمِّعون انحياز كل مؤسسة المعروف. وتجميع استطلاعات كثيرة يقلص الضجيج الصادق ببراعة ولا يفعل شيئًا لميل يتشاركه القطاع كله، ولهذا تخطئ توقعات انتخابية بأكملها في الاتجاه نفسه دفعة واحدة. +في الاستطلاعات الفعلية نجهل p الحقيقي، ولذلك تقدّر طرق الفترات عدم اليقين من البيانات، أو تستخدم قيمة محافظة مثل 0.5. قد تغيّر أوزان الاستطلاع، واختيار مجموعات مترابطة، وعدم الاستجابة، وسحب نسبة كبيرة من المجتمع طريقة حساب عدم اليقين. هامش تفاوت العينات لا يشمل كل هذه الأخطاء تلقائيًا. كما أن تقدير التأييد قبل الانتخابات ليس بحد ذاته تنبؤًا بالنتيجة النهائية. ## Derivation -1. كل مستجيب عشوائي سحبٌ يؤيد باحتمال $p$، فتتبعثر نسبة العينة بخطأ معياري قدره $\sqrt{\dfrac{p(1-p)}{n}}$. -2. مدّ $1.96$ خطأً معياريًا في كل جهة تحصل على هامش الـ95%: ‏$E = 1.96\sqrt{\dfrac{p(1-p)}{n}}$. -3. جذر $\sqrt{n}$ في المقام هو قانون تناقص العوائد: أربعة أضعاف الناس مقابل نصف الهامش، بينما ميلٌ قدره $b$ يزيح المركز ولا ينكمش أبدًا. +1. عند استقلال المشاهدات، يكون تباين نسبة الإجابات ذات النتيجتين p(1−p)/n، وجذره التربيعي هو الخطأ المعياري. +2. عند n = 1000 وp = 0.5، يعطي ضرب الخطأ المعياري في 1.96 نحو 0.031، أي 3.1 نقاط مئوية. +3. وجود الجذر التربيعي في المقام يعني أن زيادة العينة إلى أربعة أمثالها تخفض الهامش إلى النصف. أما الانحياز الثابت المضاف فيبقى دون تغيير. ## Real world -### توقعات الانتخابات -الاستطلاعات الوطنية لنحو ألف شخص تحمل هوامش ±3 نقاط، فالسباقات داخل هذا النطاق لا يحسمها استطلاع أصلًا. +### استطلاع رضا العملاء -### تقييمات المشاهدة -أرقام مشاهدة التلفزيون والبث تأتي من لوحات من بضعة آلاف بيت تتكلم باسم مئات الملايين، بمنطق الملعقة نفسه. +إذا أجاب العملاء شديدو الرضا وحدهم، فقد يبالغ الاستطلاع في تقدير الرضا. زيادة الإجابات من المجموعة المنتقاة نفسها لا تجعلها ممثلة لبقية العملاء بالضرورة. -### المسوح الصحية -هيئات الصحة تقدّر معدلات التدخين والتطعيم من عينات، وتوزنها بعناية لترميم انحياز من يرد على السماعة ومن لا يرد. +### مقارنة أحجام العينات -### عينات الجودة -المصانع تفحص حفنة عشوائية من كل دفعة، والصيغة تحدد حجم الحفنة الذي يجعل نسبة العيوب المعلنة تعني شيئًا. +نختار حجم العينة لتحقيق دقة مطلوبة وفق طريقة محددة لأخذها. لا يوجد حد عام تصبح بعده المشاهدات الإضافية بلا فائدة؛ فقد يكون تقليل هامش صغير إلى هامش أصغر مهمًا. diff --git a/content/lessons/statistics/sampling-and-polls/en.md b/content/lessons/statistics/sampling-and-polls/en.md index fa32740b..14c16be3 100644 --- a/content/lessons/statistics/sampling-and-polls/en.md +++ b/content/lessons/statistics/sampling-and-polls/en.md @@ -1,68 +1,61 @@ --- -title: 'Polls: asking a thousand to know millions' -summary: >- - A fair poll of a thousand people genuinely pins down a country of millions - to within about three points — and a leaning poll of a million people stays - wrong forever, which is why how you ask beats how many you ask. +title: 'Sampling, margins and bias' +summary: 'Separate sampling variability, which falls with sample size, from a systematic bias that more responses alone do not remove.' parameters: - p: p — the country's true support - n: n — people actually polled - bias: bias — how far the polling method leans + p: 'true support in the population' + n: 'n — sample size' + bias: 'upward bias in percentage points' variables: - - the margin of error, the honest half-width of the poll's interval - - the true share being estimated + - 'approximate margin for sampling variation, before bias' + - 'true support proportion; convert percent to a fraction in the formula' --- ## Try it -1. Keep the defaults and look at the field: 540 of the country's millions, with the n ringed people as the actual sample — the published interval sits around the truth. -2. Shrink n to 200: the interval balloons to about ±7 points, too wide to call any close race. -3. Now set bias to 5 with n at 5000: the interval is beautifully tight and confidently wrong — the truth sits outside it, and more people would not help. +1. Set true support to 52%, n = 1000 and bias = 0. The margin is about 3.10 percentage points. Compare the displayed estimate and its interval with the true-support marker. +2. Keep support and bias fixed and reduce n to 200. The margin rises to about 6.92 points. The dots are an illustration of a population, not a literal display of n respondents. +3. Set n = 5000 and bias = 5. The margin falls to about 1.38 points, but the estimate is shifted upward by 5 points plus a small illustrated fluctuation. The narrow interval misses the truth. ## Real-life examples -- **A standard national poll.** A thousand respondents at 52% support: margin about ±3.1 — enough to say "ahead", not enough to call a 51–49 race. -- **The cheap quick poll.** Two hundred respondents: ±6.9 points of honest fog, which is why small polls disagree so loudly. -- **The 1936 catastrophe.** A huge sample with a leaning method: the Literary Digest polled over two million people by car and telephone registries — wealthy households, in 1936 — and still called the wrong president. +1. **1000 respondents.** At true support 52% with zero bias, the model's margin is about 3.10 points. A displayed estimate near 52% need not establish that support exceeds 50%. +2. **200 respondents.** With the same support and zero bias, the margin is about 6.92 points. Less data means more sampling uncertainty under the same assumptions. +3. **A large biased sample.** With n = 5000 and a fixed upward bias of 5 points, the margin is only about 1.38 points. Increasing n reduces random variation but leaves the fixed bias. ## Test yourself -1. Get an honest margin of 1.5 points or better — it takes nearly the whole 5,000. -2. Set n to exactly 200 and see the margin reach about 7 points. -3. Recreate the Literary Digest: a leaning method (bias at least 4.5) with a huge sample (n at least 4500) — tight, confident, wrong. +1. Make the margin at most 1.5 percentage points and keep bias below 0.25 points. +2. Set n = 200 and choose support giving a margin of at least 6.9 percentage points. +3. Set bias to at least 4.5 percentage points and n to at least 4500. ## Intuition -A spoonful tells you how the whole pot of soup tastes — if the pot is stirred. That is the entire miracle of polling: a thousand people, chosen genuinely at random, pin down a country of millions, because the spoon's randomness guarantees it resembles the pot. The field on screen is the pot, the ringed dots are the spoonful, and the published interval below is what the poll can honestly claim. +Different random samples from the same population usually give different support estimates. This variation comes from whom the sample happens to include. Larger independent samples reduce it. A systematic bias is different: a sampling or measurement method may consistently favour one result. Repeating the same biased method more times need not move its average toward the truth. -Two different enemies attack that claim. Honest noise — the luck of who happened to be spooned — shrinks with $\sqrt{n}$, so quadrupling the sample only halves the fog, and past a thousand or so, extra respondents buy almost nothing. Bias is the unstirred pot: if the method itself leans — calling only landlines, polling only one neighbourhood — the whole interval shifts sideways by that lean, and no sample size on Earth shrinks it. A tight interval around the wrong place is the most dangerous object in statistics. +The display separates these effects by adding an adjustable upward bias to a small fixed fluctuation around the true proportion. It is an illustration, not a full repeated-sampling simulation: at zero bias its constructed interval always contains the truth. An actual nominal 95% procedure can miss even without bias. The dots and highlighted subset are schematic, not the data used to compute the estimate. ## Formal -For a true share $p$ estimated from $n$ random respondents, the sample share scatters with standard error $\sqrt{\dfrac{p(1-p)}{n}}$, and the conventional 95% margin of error is $E = 1.96\sqrt{\dfrac{p(1-p)}{n}}$ — about $\pm 3$ points at $n = 1000$, and widest when $p = 0.5$. +For n independent yes-or-no observations with true proportion p, the sample proportion has standard error $\sqrt{p(1-p)/n}$. Under a suitable normal approximation, the margin is $E=1.96\sqrt{p(1-p)/n}$. The formula uses p as a fraction: enter 52% on the control, but calculate with 0.52. -Bias enters additively and does not average out: a method leaning by $b$ reports around $p + b$ however large $n$ grows, so the published interval of a biased poll converges confidently on the wrong number. Randomness of selection, not size, is what the formula silently assumes. +Multiplying E by 100 gives percentage points. At fixed p, replacing n by 4n halves E. The margin is largest at $p=0.5$. This teaching model adds a fixed bias b to the estimate's centre, giving $p+b$; increasing n does not remove that shift. ## Advanced -Real pollsters fight bias more than noise: they weight respondents to match the population's age, region and education, chase the people who do not answer (non-response bias is today's Literary Digest), and publish "house effects" so aggregators can correct each firm's habitual lean. Aggregating many polls shrinks honest noise beautifully but does nothing for a lean shared by the whole industry — which is how entire election forecasts can miss in the same direction at once. +In real surveys the true p is unknown, so interval methods must estimate uncertainty from the data or use a conservative value such as 0.5. Survey weights, clustered sampling, nonresponse and a large sampling fraction can change the uncertainty calculation. A margin describing sampling variation does not automatically include all these errors, and a pre-election support estimate is not itself a forecast of the final result. ## Derivation -1. Each random respondent is a draw that supports with probability $p$, so the sample share scatters with standard error $\sqrt{\dfrac{p(1-p)}{n}}$. -2. Reaching $1.96$ standard errors each side gives the 95% margin $E = 1.96\sqrt{\dfrac{p(1-p)}{n}}$. -3. The $\sqrt{n}$ in the denominator is the law of diminishing returns: four times the respondents, half the margin — while a lean of $b$ points shifts the centre and never shrinks. +1. Under independent sampling, the variance of a yes-or-no proportion is p(1−p)/n. Its square root is the standard error. +2. At n = 1000 and p = 0.5, multiplying the standard error by 1.96 gives approximately 0.031, or 3.1 percentage points. +3. The square root in the denominator means four times the sample size halves the margin. A fixed additive bias remains unchanged. ## Real world -### Election forecasting -National polls of roughly a thousand people carry ±3-point margins — races inside that band are genuinely undecidable by polling. +### Customer surveys -### Audience ratings -TV and streaming ratings come from panels of a few thousand homes, speaking for hundreds of millions of viewers through this same spoonful logic. +A survey answered only by highly satisfied customers can overstate satisfaction. More responses from that same selective group do not necessarily make it representative. -### Medical surveys -Health agencies estimate national rates of smoking or vaccination from samples, weighting hard to repair the bias of who picks up the phone. +### Comparing sample sizes -### Quality sampling -Factories test a random handful from each batch; the formula says how large the handful must be before a claimed defect rate means anything. +Choose a sample size for a required precision under a specified sampling design. There is no universal point beyond which extra observations are useless; reducing a small margin further can still matter. diff --git a/content/ui/ar/poll-sample.yaml b/content/ui/ar/poll-sample.yaml index d9d36565..3470add5 100644 --- a/content/ui/ar/poll-sample.yaml +++ b/content/ui/ar/poll-sample.yaml @@ -1,12 +1,12 @@ -poll.hint: كبّر n فتضيق الفترة — أضف انحيازًا فلن ينقذك أي حجم عيّنة -poll.country: 'البلد · {p}% مؤيدون حقًا' -poll.ringed: 'المحوَّطون: الأشخاص الـ{n} الذين سُئلوا فعلًا' -poll.true: التأييد الحقيقي -poll.asked: المستطلَعون -poll.poll: الاستطلاع يقول -poll.truthMark: الحقيقة -poll.verdictL: هل أمسكت الفترة بها؟ -poll.caught: نعم — ضمن الهامش -poll.missed: 'لا — مخطئ بثقة' -poll.biasNote: 'الطريقة تميل {b} نقطة — وهذا الانزياح لا ينكمش مهما سألت' -poll.caption: الضجيج الصادق لا ينصف إلا بتربيع العيّنة؛ أما الانحياز فينجو من أي عيّنة +poll.hint: 'زيادة n تقلل هامش العينة، والانحياز الثابت ينقل التقدير' +poll.country: 'تمثيل للمجتمع · التأييد الحقيقي {p}%' +poll.ringed: 'تمييز توضيحي · حجم العينة {n}' +poll.true: 'التأييد الحقيقي' +poll.asked: 'حجم العينة' +poll.poll: 'التقدير التوضيحي' +poll.truthMark: 'النسبة الحقيقية' +poll.verdictL: 'هل تشمل الفترة النسبة الحقيقية؟' +poll.caught: 'نعم' +poll.missed: 'لا' +poll.biasNote: 'انحياز موجب ثابت: {b} نقاط مئوية' +poll.caption: 'أربعة أمثال حجم العينة تخفض الهامش إلى النصف، ويبقى الانحياز الثابت' diff --git a/content/ui/en/poll-sample.yaml b/content/ui/en/poll-sample.yaml index 5ae5f09c..a453b5a8 100644 --- a/content/ui/en/poll-sample.yaml +++ b/content/ui/en/poll-sample.yaml @@ -1,12 +1,12 @@ -poll.hint: grow n and the interval tightens — add bias and no sample size will save you -poll.country: 'the country · {p}% truly in favour' -poll.ringed: 'ringed: the {n} people actually asked' -poll.true: true support -poll.asked: people polled -poll.poll: the poll says -poll.truthMark: the truth -poll.verdictL: did the interval catch it? -poll.caught: yes — within the margin -poll.missed: 'no — confidently wrong' -poll.biasNote: 'the method leans {b} points — that shift never shrinks, however many you ask' -poll.caption: honest noise halves only when you quadruple the sample; bias survives any sample +poll.hint: 'Increasing n narrows the sampling margin; fixed bias shifts the estimate' +poll.country: 'population illustration · {p}% true support' +poll.ringed: 'illustrative highlighting · sample size {n}' +poll.true: 'true support' +poll.asked: 'sample size' +poll.poll: 'illustrated estimate' +poll.truthMark: 'true proportion' +poll.verdictL: 'contains the true proportion?' +poll.caught: 'yes' +poll.missed: 'no' +poll.biasNote: 'fixed upward bias: {b} percentage points' +poll.caption: 'Four times the sample size halves the margin; fixed bias is unchanged' From ad1c77508e3e1aa9709a90bdeb625e2ec6f73f24 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:54:48 +0300 Subject: [PATCH 090/124] content: rewrite bayes-theorem for first-time learners in both languages --- .../lessons/statistics/bayes-theorem/ar.md | 61 ++++++++--------- .../lessons/statistics/bayes-theorem/en.md | 66 ++++++++----------- content/ui/ar.yaml | 22 +++---- content/ui/en.yaml | 22 +++---- 4 files changed, 78 insertions(+), 93 deletions(-) diff --git a/content/lessons/statistics/bayes-theorem/ar.md b/content/lessons/statistics/bayes-theorem/ar.md index b32d889d..c951f642 100644 --- a/content/lessons/statistics/bayes-theorem/ar.md +++ b/content/lessons/statistics/bayes-theorem/ar.md @@ -1,67 +1,62 @@ --- title: الاحتمال الشرطي ومبرهنة بايز -summary: >- - فحص دقته 99٪ ونتيجتك موجبة. لماذا لا يعني هذا غالبًا أنك مريض؟ +summary: 'احسب نسبة النتائج الإيجابية الصحيحة من جميع النتائج الإيجابية، مع احتساب الإنذارات الخاطئة.' parameters: - prior: مدى شيوع الحالة - sens: الحساسية، نسبة الموجبين بين المرضى - spec: النوعية، نسبة السالبين بين الأصحّاء + prior: 'الانتشار — نسبة من لديهم الحالة' + sens: 'الحساسية — الإيجابيات بين من لديهم الحالة' + spec: 'النوعية — السلبيات بين من ليست لديهم الحالة' variables: - - الاحتمال القبلي، أي مدى احتمال الحالة قبل أي فحص - - الحساسية، أي عدد مرات ظهور نتيجة موجبة عند وجود الحالة فعلًا - - الاحتمال البعدي، وهو ما تريده فعلًا، احتمال الحالة إذا جاءت النتيجة موجبة + - 'الاحتمال السابق لوجود الحالة' + - 'الحساسية: احتمال نتيجة إيجابية عند وجود الحالة' + - 'الاحتمال اللاحق: احتمال وجود الحالة بعد نتيجة إيجابية' --- ## Try it -1. راقب الشبكة. تقسّم 1000 شخص إلى مصابين (يسار) وأصحّاء (يمين)، وإلى نتيجة موجبة (أعلى) أو سالبة (أسفل). -2. اسحب منزلق «مدى شيوع الحالة» نحو 1%. راقب كيف تطغى النتائج الموجبة الكاذبة عند الأصحّاء على النتائج الموجبة الصحيحة. -3. الآن اسحبه إلى 20%. الفحص نفسه يعني شيئًا مختلفًا تمامًا. معظم النتائج الموجبة أصبحت حقيقية. +1. اجعل نسبة الانتشار 1% والحساسية 99% والنوعية 95%. يتوقع النموذج لكل 1000 شخص 9.9 نتائج إيجابية صحيحة و49.5 إيجابية كاذبة. يقرّب العرض هذه الأعداد، لكنه يحسب الاحتمال اللاحق 16.67% من القيم غير المقربة. +2. ثبّت إعدادات الاختبار وارفع الانتشار إلى 20%. تصبح نسبة أكبر من النتائج الإيجابية لأشخاص لديهم الحالة، ويرتفع الاحتمال اللاحق إلى نحو 83.19%. +3. أعد الانتشار إلى 1% وارفع النوعية إلى 99.5%. يؤدي تقليل النتائج الإيجابية الكاذبة إلى رفع الاحتمال اللاحق إلى نحو 66.67%، مع بقاء الحساسية كما هي. ## Real-life examples -1. **فحص تصوير الثدي.** امرأة واحدة فقط من كل 100 تخضع للفحص مصابة فعلًا بسرطان الثدي. يكتشف الفحص 99% من الحالات الحقيقية، لكنه يخطئ أيضًا مع 5% من الأصحّاء، فتكون معظم النتائج الموجبة إنذارات كاذبة. -2. **فحص سريع في موسم الإنفلونزا.** يصاب مريض واحد من كل 5 في عيادة مزدحمة بالإنفلونزا فعلًا. فحص صائب مع 90% من المرضى و85% من الأصحّاء يعطي نتائج موجبة حقيقية في الغالب. -3. **فحص المخدرات في العمل.** واحد فقط من كل 20 موظفًا يتعاطى المادة المفحوصة فعلًا. حتى فحص دقته 98% ينتج عددًا كافيًا من الإنذارات الكاذبة بين الـ19 الآخرين، ولهذا تُعاد النتيجة الموجبة الواحدة للتأكد. +1. **حالة نادرة افتراضية.** عند انتشار 1% وحساسية 99% ونوعية 95%، تكون نحو سدس النتائج الإيجابية صحيحة. هذه قيم تعليمية، وليست أرقام أداء لاختبار طبي محدد. +2. **حالة أكثر انتشارًا.** عند انتشار 20% وحساسية 90% ونوعية 85%، تكون الأعداد المتوقعة لكل 1000 شخص 180 نتيجة إيجابية صحيحة و120 كاذبة. الاحتمال اللاحق 60%. +3. **إنذارات كاذبة أقل.** عند انتشار 5% وحساسية 98% ونوعية 98%، نتوقع 49 نتيجة إيجابية صحيحة و19 كاذبة لكل 1000 شخص. الاحتمال اللاحق نحو 72.06%. ## Test yourself -1. اضبط المنزلقات حتى تصبح النتيجة الموجبة تعني احتمال إصابة يساوي 50% بالضبط. -2. أبقِ «مدى شيوع الحالة» عند 2% أو أقل، وارفع ثقتك بعد نتيجة موجبة فوق 95%. -3. اجعل «مدى شيوع الحالة» 20% أو أكثر، لكن اجعل الفحص غير دقيق بما يكفي ليبقى اطمئنانك بعد نتيجة موجبة 40% أو أقل. +1. عدّل القيم حتى يصبح احتمال وجود الحالة بعد نتيجة إيجابية نحو 50%. +2. أبقِ الانتشار عند 2% أو أقل، واجعل الاحتمال اللاحق 95% على الأقل. +3. أبقِ الانتشار عند 20% أو أكثر، واجعل الاحتمال اللاحق 40% على الأكثر. ## Intuition -تخيّل 1000 شخص خضعوا للفحص. حسب القيم الأولى، عشرة منهم مصابون فعلًا، ويكتشف الفحص كل هؤلاء العشرة تقريبًا، أي نحو 10 نتائج موجبة صحيحة. لكن بين الـ990 شخصًا الأصحّاء يخطئ الفحص مع 5% منهم، أي نحو 50 شخصًا، فتظهر نتيجتهم موجبة رغم أنهم أصحّاء. فمن أصل نحو 60 نتيجة موجبة، عشر فقط حقيقية. النتيجة الموجبة تعني احتمال مرض يقارب 1 من 6، لا 99%. +قد يكتشف الاختبار معظم من لديهم حالة معينة، ومع ذلك يعطي نتائج إيجابية كاذبة كثيرة عندما تكون الحالة نادرة. في الإعدادات الافتراضية، توجد الحالة لدى 10 أشخاص فقط من كل 1000، وتكون نتيجة معظمهم إيجابية. أما الـ990 الآخرون فهم مجموعة أكبر بكثير؛ لذا فإن نسبة خطأ 5% بينهم تضيف نحو 50 نتيجة إيجابية. لتفسير نتيجة إيجابية، نقارن الإيجابيات الصحيحة بجميع الإيجابيات، لا بجميع من لديهم الحالة. -اسحب منزلق «مدى شيوع الحالة» إلى الأعلى وراقب ثقتك الحقيقية ترتفع معه. الفحص نفسه لم يتغيّر، بل تغيّر فقط مدى شيوع الحالة أصلًا. ولهذا تنتج برامج فحص الأمراض النادرة إنذارات كاذبة كثيرة، ولهذا يطلب الأطباء غالبًا فحصًا ثانيًا مستقلًا قبل بدء العلاج. +هنا نغيّر السؤال من «كم مرة تكون النتيجة إيجابية عند وجود الحالة؟» إلى «بين النتائج الإيجابية، كم مرة توجد الحالة فعلًا؟». الأول هو الحساسية، والثاني هو الاحتمال اللاحق. تقسم المستطيلات المجتمع بحسب وجود الحالة ونتيجة الاختبار. للمناطق الضيقة عرض أدنى مرئي، والأعداد المعروضة مقربة؛ لذلك نعتمد قراءة الاحتمال بدل قياس مساحة الرسم أو قسمة الأعداد المقربة. ## Formal -يتحقّق $P(A \mid B) = \dfrac{P(A \cap B)}{P(B)}$، ويتحقّق $P(B) = P(B \mid A)P(A) + P(B \mid A^c)P(A^c)$ بحسب قاعدة الاحتمال الكلي. عوّض هذا في الصيغة الأولى فتحصل على مبرهنة بايز. +ليكن A حدث وجود الحالة وB حدث النتيجة الإيجابية. بشرط $P(B)>0$، تعطي مبرهنة بايز $P(A\mid B)=\frac{P(B\mid A)P(A)}{P(B)}$. تعني العلامة الرأسية «بشرط»، وتبديل ما قبلها وما بعدها يغيّر السؤال. -بصيغة الأرجحية تكون الأرجحية البعدية حاصل ضرب الأرجحية القبلية في نسبة الإمكان، حيث نسبة الإمكان تساوي الحساسية مقسومة على واحد ناقص النوعية. +احتمال النتيجة الإيجابية هو $P(B)=P(B\mid A)P(A)+P(B\mid A^c)P(A^c)$. يمثل الحدان الإيجابيات الصحيحة والكاذبة. الحساسية هي $P(B\mid A)$، والنوعية هي $P(B^c\mid A^c)$، ومعدل الإيجابيات الكاذبة يساوي واحدًا ناقص النوعية. وتعطينا نسبة الانتشار $P(A)$ في نموذج المجتمع هذا. ## Advanced -يعامل الاستدلال البايزي المعاملات بوصفها متغيّرات عشوائية، إذ يتحقّق $p(\theta \mid \text{data}) \propto p(\text{data} \mid \theta)\,p(\theta)$. تجعل التوزيعات القبلية المرافقة، بيتا لاحتمال برنولي $p$ وغاما لمعدّل بواسون، التحديث بصيغة مغلقة. وفي الحالة العامة نحسبه عدديًا بطرق MCMC. ومغالطة المعدّل الأساسي أن الناس لا يعطون الاحتمال القبلي وزنه الصحيح. +عندما يكون معدل الإيجابيات الكاذبة غير صفري، تساوي الأرجحية اللاحقة الأرجحية السابقة مضروبة في الحساسية ومقسومة على ذلك المعدل. تحديث الاحتمال عدة مرات يتطلب حساب ترابط المشاهدات؛ فاختباران للشخص نفسه ليسا مستقلين تلقائيًا. ويهم أيضًا المجتمع الذي أخذنا منه الاحتمال السابق، والظروف التي قيس فيها أداء الاختبار. ## Derivation -1. التداخل نفسه معدود بطريقتين، وهو الكتلة العلوية اليسرى من الشبكة. -2. كل النتائج الموجبة تساوي الموجبة الصحيحة زائد الموجبة الكاذبة. -3. اقسم لتحصل على نسبة الموجبات الحقيقية من بين كل الموجبات. +1. نكتب احتمال اجتماع A وB بطريقتين، باستخدام كل احتمال شرطي مضروبًا في احتمال الحدث الذي اشترطناه. +2. نقسم النتائج الإيجابية كلها إلى مجموعتين لا تتداخلان: من لديهم الحالة ومن ليس لديهم الحالة. +3. نقسم احتمال الإيجابيات الصحيحة على احتمال الإيجابيات كلها، فنحصل على نسبة وجود الحالة بين أصحاب النتائج الإيجابية. ## Real world -### المسح الطبي -فحوص تصوير الثدي وPSA وما قبل الولادة كلها تعاني معدّلات أساسية منخفضة، ومبرهنة بايز تفسّر نتائجها. +### التنبيهات الآلية -### مرشّحات البريد المزعج -يحدّث المرشّح احتمال أن تكون الرسالة مزعجة كلمة بعد كلمة، ويسمّون هذه الطريقة «بايز الساذج». +قد يطلق كاشف الأعطال تنبيهات لأعطال حقيقية ولحالات تشغيل طبيعية. عندما تندر الأعطال، قد تشكل الإنذارات الكاذبة جزءًا كبيرًا من التنبيهات حتى لو كان معدلها صغيرًا. -### المحاكم والطبّ الشرعي -احتمال تطابق DNA البالغ 1 من مليون لا يعني احتمال براءة 1 من مليون حين تبحث بين ملايين الأشخاص، وهذه مغالطة المدّعي. +### تصنيف الرسائل -### السيارات ذاتية القيادة -تحدّث قراءات الحسّاسات اعتقاد السيارة بمواقع العوائق إطارًا بعد إطار بهذه القاعدة نفسها. +يجمع مصنف الرسائل بين معلومات عن فئات الرسائل وأدلة مستخرجة من الرسالة. تصف قاعدة بايز تحديث الاحتمال، وتعتمد جودة النتيجة على ملاءمة احتمالات النموذج للموقف. diff --git a/content/lessons/statistics/bayes-theorem/en.md b/content/lessons/statistics/bayes-theorem/en.md index 665621b9..387b59bc 100644 --- a/content/lessons/statistics/bayes-theorem/en.md +++ b/content/lessons/statistics/bayes-theorem/en.md @@ -1,72 +1,62 @@ --- title: Conditional probability and Bayes’ theorem -summary: >- - A test that is 99% accurate still misleads you more often than you'd guess — - see why a positive result rarely means what it seems. +summary: 'Find the share of positive results that are true positives by counting both true and false positives.' parameters: - prior: how common the condition is - sens: sensitivity — positives among the ill - spec: specificity — negatives among the healthy + prior: 'prevalence — proportion with the condition' + sens: 'sensitivity — positive results among those with the condition' + spec: 'specificity — negative results among those without it' variables: - - the prior — how likely the condition was before any test - - >- - the sensitivity — how often the test is positive when the condition is - present - - >- - the posterior — what you actually want: the chance of the condition given a - positive test + - 'prior probability that the condition is present' + - 'sensitivity: positive-result probability given the condition' + - 'posterior: condition probability given a positive result' --- ## Try it -1. Watch the grid: it splits 1000 people into those with the condition (left) and without it (right), and into a positive test (top) or negative (bottom). -2. Drag the «how common the condition is» slider down toward 1%. Watch the false positives among the healthy swamp the true positives among the sick. -3. Now drag it up toward 20%. The same test means something very different: most positive results are now real. +1. Set prevalence to 1%, sensitivity to 99% and specificity to 95%. Per 1000 people, the model expects 9.9 true positives and 49.5 false positives. The display rounds these counts, but uses unrounded values for the 16.67% posterior. +2. Keep the test settings and raise prevalence to 20%. More positives now come from people with the condition, and the posterior rises to about 83.19%. +3. Return prevalence to 1% and raise specificity to 99.5%. Reducing false positives raises the posterior to about 66.67%, even though sensitivity stays unchanged. ## Real-life examples -1. **Mammography screening.** Only about 1 in 100 women screened actually has breast cancer; the test catches 99% of real cases but also wrongly flags 5% of healthy women, so most positive results turn out to be false alarms. -2. **Flu season rapid test.** When 1 in 5 patients at a busy clinic really has the flu, a test that is right 90% of the time on the sick and 85% of the time on the healthy gives positive results that are usually genuine. -3. **Workplace drug test.** Only about 1 in 20 employees actually uses the tested drug; even a test that is 98% accurate produces enough false alarms among the other 19 that a single positive result gets checked again. +1. **A hypothetical rare condition.** At prevalence 1%, sensitivity 99% and specificity 95%, about one-sixth of positive results are true positives. These are teaching values, not performance figures for a named medical test. +2. **A more common condition.** With prevalence 20%, sensitivity 90% and specificity 85%, the expected counts per 1000 are 180 true positives and 120 false positives. The posterior is 60%. +3. **Fewer false alarms.** At prevalence 5%, sensitivity 98% and specificity 98%, there are 49 expected true positives and 19 false positives per 1000. The posterior is about 72.06%. ## Test yourself -1. Adjust the sliders until a positive result means exactly a 50% chance of truly having the condition. -2. Keep «how common the condition is» at 2% or below, but push your confidence after a positive test above 95%. -3. Set «how common the condition is» to 20% or higher, but make the test unreliable enough that a positive result still leaves you 40% confident or less. +1. Adjust the controls until the probability of the condition given a positive result is about 50%. +2. Keep prevalence at most 2% and make that posterior probability at least 95%. +3. Keep prevalence at least 20% and make the posterior at most 40%. ## Intuition -Picture 1000 people tested for a condition. With the starting numbers, 10 of them truly have it, and the test catches almost all of them — about 10 true positives. But among the 990 healthy people, 5% of them, about 50, also test positive by mistake. So out of roughly 60 positive results, only 10 are real: a positive test means about a 1-in-6 chance of actually being ill, not 99%. +A test can detect most people with a condition yet produce many false positives when the condition is rare. Out of 1000 people with the default settings, only 10 have the condition, and nearly all test positive. The other 990 form a much larger group, so a 5% false-positive rate produces about 50 additional positives. To interpret a positive result, compare the true positives with all positives, not with all people who have the condition. -Drag the «how common the condition is» slider up and watch your true confidence climb along with it: the test itself has not changed, only how common the condition was to begin with. This is why screening whole healthy populations for rare diseases produces so many false alarms, and why doctors often order a second, independent test before treating anyone. +This changes the question from “How often is the test positive when the condition is present?” to “Among positive results, how often is the condition present?” The first is sensitivity; the second is the posterior probability. The rectangles divide the population by condition and result. Very narrow regions have a minimum display width, and counts are rounded, so use the probability readout rather than measuring pixel areas or dividing rounded counts. ## Formal -$P(A \mid B) = \dfrac{P(A \cap B)}{P(B)}$ and $P(B) = P(B \mid A)P(A) + P(B \mid A^c)P(A^c)$ (total probability). Substituting gives Bayes’ theorem. +Let A mean the condition is present and B mean the result is positive. Provided $P(B)>0$, Bayes' theorem gives $P(A\mid B)=\frac{P(B\mid A)P(A)}{P(B)}$. The vertical bar means “given”; reversing what follows it changes the question. -In odds form: posterior odds = prior odds × likelihood ratio, with LR = sensitivity / (1 − specificity). +The positive-result probability is $P(B)=P(B\mid A)P(A)+P(B\mid A^c)P(A^c)$. The two terms are true positives and false positives. Sensitivity is $P(B\mid A)$, specificity is $P(B^c\mid A^c)$, and the false-positive rate is one minus specificity. Prevalence supplies $P(A)$ for this population model. ## Advanced -Bayesian inference treats parameters as random: $p(\theta \mid \text{data}) \propto p(\text{data} \mid \theta)\,p(\theta)$. Conjugate priors (Beta for a Bernoulli $p$, Gamma for a Poisson rate) make the update closed-form; in general it is done numerically by MCMC. The base-rate fallacy is the human failure to weight the prior. +With a nonzero false-positive rate, posterior odds equal prior odds times sensitivity divided by that false-positive rate. Updating repeatedly requires a likelihood that accounts for dependence between observations; two tests on the same person are not automatically independent. The population used for the prior and the conditions under which test performance was measured both matter. ## Derivation -1. The same overlap counted two ways — the top-left block of the grid. -2. All positives: true positives plus false positives. -3. Divide: the share of positives that are genuine. +1. Express the same overlap, A and B together, using either conditional probability multiplied by its conditioning event's probability. +2. Divide all positive results into two disjoint groups: those with the condition and those without it. +3. Divide the true-positive probability by the total positive probability to obtain the fraction of positives that have the condition. ## Real world -### Medical screening -Mammography, PSA and prenatal tests all suffer from low base rates; results are interpreted with Bayes. +### Automated alerts -### Spam filters -The probability an email is spam given its words is updated word by word — “naive Bayes”. +A detector may flag both real faults and normal operation. When real faults are rare, even a small false-alarm rate can account for many of the alerts. -### Courts and forensics -A DNA match probability of 1 in a million is not a 1-in-a-million chance of innocence when millions of people were searched: the prosecutor’s fallacy. +### Classifying messages -### Self-driving cars -Sensor readings update the car’s belief about where obstacles are, frame by frame, with exactly this rule. +A message classifier combines information about message categories with evidence from the message. Bayes' rule describes the update; the quality of the result depends on whether the probabilities in the model fit the situation. diff --git a/content/ui/ar.yaml b/content/ui/ar.yaml index c189c84c..74728e4f 100644 --- a/content/ui/ar.yaml +++ b/content/ui/ar.yaml @@ -221,17 +221,17 @@ coin.proportion: النسبة حتى الآن coin.gap: البعد عن p coin.again: ↻ من جديد coin.band: 'التظليل: نطاق تقريبي لـ95% من النتائج عند كل عدد ثابت من المحاولات' -bayes.hint: كل فرد من 1000 شخص. اسحب لتغيير مدى شيوع الحالة. -bayes.tp: مريض ونتيجته موجبة -bayes.fp: سليم ونتيجته موجبة -bayes.fn: مريض ونتيجته سالبة -bayes.tn: سليم ونتيجته سالبة -bayes.has: 'لديه الحالة:' -bayes.hasNot: ليس لديه الحالة -bayes.positives: الذين نتيجتهم موجبة -bayes.ofWhichIll: …منهم مرضى فعلًا -bayes.posterior: P(مريض | موجب) -bayes.prior: P(مريض) قبل الفحص +bayes.hint: "تقسيم المجتمع بحسب الحالة والنتيجة؛ اسحب لتغيير نسبة الانتشار." +bayes.tp: "الحالة موجودة والنتيجة إيجابية" +bayes.fp: "الحالة غير موجودة والنتيجة إيجابية" +bayes.fn: "الحالة موجودة والنتيجة سلبية" +bayes.tn: "الحالة غير موجودة والنتيجة سلبية" +bayes.has: "الحالة موجودة" +bayes.hasNot: "الحالة غير موجودة" +bayes.positives: "الإيجابيات لكل 1000 بعد التقريب" +bayes.ofWhichIll: "نسبة وجود الحالة بين الإيجابيات" +bayes.posterior: "احتمال الحالة بعد نتيجة إيجابية" +bayes.prior: "الاحتمال السابق" adhoc.count.title: مستكشف العدّ adhoc.count.summary: بكم طريقة؟ إجابة دقيقة تمامًا، مع رسم كل الترتيبات ما دام عددها قليلًا. adhoc.count.n: n — عدد العناصر المتاحة diff --git a/content/ui/en.yaml b/content/ui/en.yaml index 1789597a..95b5147c 100644 --- a/content/ui/en.yaml +++ b/content/ui/en.yaml @@ -221,17 +221,17 @@ coin.proportion: proportion so far coin.gap: distance from p coin.again: ↻ again coin.band: 'shaded: approximate 95% range at each fixed trial count' -bayes.hint: Everyone in a population of 1000. Drag to change how common the condition is. -bayes.tp: ill, test positive -bayes.fp: healthy, test positive -bayes.fn: ill, test negative -bayes.tn: healthy, test negative -bayes.has: 'has the condition:' -bayes.hasNot: does not have it -bayes.positives: people who test positive -bayes.ofWhichIll: …of whom actually ill -bayes.posterior: P(ill | positive) -bayes.prior: P(ill) before the test +bayes.hint: "Population divided by condition and result; drag to change prevalence." +bayes.tp: "condition present, positive" +bayes.fp: "condition absent, positive" +bayes.fn: "condition present, negative" +bayes.tn: "condition absent, negative" +bayes.has: "condition present" +bayes.hasNot: "condition absent" +bayes.positives: "positive results per 1000 (rounded)" +bayes.ofWhichIll: "condition present among positives" +bayes.posterior: "condition given positive" +bayes.prior: "prior probability" adhoc.count.title: Counting explorer adhoc.count.summary: How many ways? Exact answer, and every arrangement drawn while there are few enough to show. adhoc.count.n: n — items to choose from From 6eeca5503532e979d17d0398214dbac8d186ebcc Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:54:48 +0300 Subject: [PATCH 091/124] content: rewrite expected-value for first-time learners in both languages --- .../lessons/statistics/expected-value/ar.md | 68 +++++++++--------- .../lessons/statistics/expected-value/en.md | 69 +++++++++---------- .../statistics/expected-value/lesson.yaml | 2 +- 3 files changed, 67 insertions(+), 72 deletions(-) diff --git a/content/lessons/statistics/expected-value/ar.md b/content/lessons/statistics/expected-value/ar.md index 13cd0608..3a69296f 100644 --- a/content/lessons/statistics/expected-value/ar.md +++ b/content/lessons/statistics/expected-value/ar.md @@ -1,71 +1,69 @@ --- title: القيمة المتوقّعة -summary: >- - كرر اللعبة مرات كثيرة واحسب متوسط الربح. هذا الرقم يخبرك هل يستحق الرهان. +summary: 'احسب متوسط النتائج بضرب كل نتيجة ممكنة في احتمالها، دون الخلط بين هذا المتوسط ونتيجة مضمونة.' parameters: - x: p — فرصة الفوز - w: w — المبلغ المكسوب - c: c — المبلغ الذي تخسره غير ذلك + x: 'p — احتمال كسب النقاط' + w: 'w — صافي النقاط المكتسبة عند النجاح' + c: 'c — النقاط المفقودة في غير ذلك' variables: - - الكسب العشوائي من لعبة واحدة - - نتيجة ممكنة، مثل كسب w أو خسارة c - - احتمال هذه النتيجة + - 'صافي التغير العشوائي في الرصيد في دور واحد' + - 'نتيجة صافية ممكنة: +w أو −c' + - 'احتمال هذه النتيجة' charts: - - title: يتغيّر متوسط المكاسب بعيد المدى في اللعبة بحسب احتمال الفوز - xLabel: p (فرصة الفوز) - yLabel: الكسب المتوقّع + - title: التغير المتوقع في النقاط بحسب احتمال النجاح + xLabel: p — احتمال النجاح + yLabel: التغير المتوقع في النقاط series: - p·w − (1−p)·c - - لعبة عادلة (صفر) + - توقع صفري --- ## Try it -1. راقب النقطة على الخط: تعرض متوسط كسبك في المرة الواحدة عند القيمة الحالية لـ«p — فرصة الفوز». -2. اسحب «p — فرصة الفوز» يمينًا. راقب قيمة الخط ترتفع من خسارة إلى ربح. -3. جِد النقطة التي يقطع فيها الخط الصفر. هذه لعبة عادلة، تربح فيها بالمتوسط بقدر ما تخسر بالضبط. +1. اجعل p = 0.4 وw = 10 وc = 5. التغير المتوقع في الرصيد هو 0.4 × 10 − 0.6 × 5 = 1، مع أن الدور الواحد يعطي إما +10 أو −5. +2. زد p مع تثبيت w وc. ترتفع النقطة المختارة على الخط لأننا نعطي احتمالًا أكبر للنتيجة الموجبة. +3. اجعل p = 0.5 وw = c = 8. يصبح التوقع صفرًا. مع ذلك، يغيّر كل دور الرصيد، ولا يلزم أن تنتهي جولة محدودة بالرصيد الذي بدأت به. ## Real-life examples -1. **رهان قطعة نقد.** ارمِ قطعة نقد. تربح 8 عند الصورة وتخسر 8 عند الكتابة. هذا رهان عادل تمامًا، متوسط نتيجته صفر. -2. **بطاقة يانصيب متجر.** لديك فرصة 1 من 20 للفوز بجائزة قيمتها 20. إن لم تفز تخسر الـ1 الذي دفعته ثمن البطاقة. هذه بطاقة تستحق الشراء في المتوسط. -3. **رهان جانبي محفوف بالمخاطر.** لديك فرصة 90% للفوز بمبلغ صغير قدره 2، وفرصة 10% لخسارة 15. يبقى المتوسط موجبًا قليلًا، لكن دورة واحدة سيئة الحظ قد تؤلم كثيرًا. +1. **فرصتان متساويتان.** احتمال 50% لكسب 8 نقاط واحتمال 50% لخسارة 8 يعطي تغيرًا متوقعًا يساوي صفرًا. +2. **كسب نادر.** احتمال 5% لكسب 20 نقطة، وخسارة نقطة واحدة في غير ذلك، يعطي توقعًا قدره 0.05. هذه تغيرات صافية في الرصيد؛ فإذا كانت هناك تكلفة ندفعها في كل دور، فيجب طرحها من الكسب أيضًا. +3. **مكاسب صغيرة متكررة.** احتمال 90% لكسب نقطتين واحتمال 10% لخسارة 15 يعطي توقعًا قدره 0.3. لا يلغي المتوسط الموجب احتمال خسارة كبيرة في دور واحد. ## Test yourself -1. اضبط المنزلقات حتى تصبح اللعبة عادلة تمامًا، أي متوسط نتيجتها صفر. -2. اجعل متوسط النتيجة أفضل من 5+ في كل لعبة. -3. جِد لعبة تفوز فيها أقل من نصف المرات، ومع ذلك تظل مربحة في المتوسط. +1. اجعل التغير المتوقع في الرصيد صفرًا. +2. اجعل التغير المتوقع أكبر من 5 نقاط. +3. استخدم احتمال نجاح أقل من 0.5، مع إبقاء التغير المتوقع موجبًا. ## Intuition -تكسب 10 باحتمال 0.4، وإلا تخسر 5. على مدى 100 لعبة تتوقّع نحو 40 فوزًا بمجموع 400+، و60 خسارة بمجموع 300-، أي 100+ إجمالًا، بمعدّل 1+ لكل لعبة. هذا الرقم للّعبة الواحدة هو القيمة المتوقّعة، وتساوي $0.4 \times 10 - 0.6 \times 5 = 1$. اسحب النقطة على طول «p — فرصة الفوز»، وحيث يقطع الخط الصفر تكون اللعبة عادلة. +لنفترض أن الدور يعطي +10 نقاط باحتمال 0.4، و−5 في غير ذلك. في 100 دور مستقل باحتمالات ثابتة، يكون العدد المتوقع 40 كسبًا و60 خسارة. المجموع المتوقع 400−300 = 100 نقطة، أي نقطة واحدة لكل دور. هذا المتوسط الموزون هو $0.4\times10-0.6\times5=1$. مع ذلك، ليست النقطة الواحدة نتيجة ممكنة لدور واحد. -صُمّم كل يانصيب ولعبة كازينو وبوليصة تأمين بحيث يميل هذا الرقم لصالح الدار. تبلغ القيمة المتوقّعة لبطاقة يانصيب ثمنها يوروان نحو يورو واحد عادة، فأنت تدفع في المتوسط يورو مقابل كل بطاقة ثمنًا للإثارة. +يحسب الرسم هذا المتوسط لكل احتمال نجاح من صفر إلى واحد. عند الطرفين تكون القيمة −c وw. يحدد الاحتمال المختار النقطة المميزة، بينما يغيّر تعديل الكسب أو الخسارة الخط نفسه. إذا خرج جزء من الخط عن نطاق الرسم، تبقى الصيغة صالحة. تلخص القيمة المتوقعة متوسطًا، ولا تصف كل النتائج الممكنة أو مقدار اختلافها. ## Formal -$E[X] = \sum_i x_i P(X = x_i)$ للمتغيّر المتقطّع $X$، و$E[X] = \int x f(x)\,dx$ للمتغيّر المتّصل $X$. وتصحّ الخطية $E[aX + bY] = aE[X] + bE[Y]$ دائمًا، سواء كانا مستقلَّين أم لا. +لعدد محدود من النتائج نعرّف $E[X]=\sum_i x_iP(X=x_i)$، بحيث يكون مجموع الاحتمالات واحدًا. نضرب كل نتيجة في احتمالها ثم نجمع. هنا $E[X]=pw-(1-p)c$، حيث p احتمال النجاح، وw صافي الكسب عنده، و−c صافي التغير في غير ذلك. -يقول قانون الأعداد الكبيرة إن متوسط لعبات كثيرة يتقارب إلى $E[X]$. +إذا كان $w+c>0$، يصبح التوقع صفرًا عند $p=c/(w+c)$. وإذا كان w وc كلاهما صفرًا، فالتوقع صفر لكل p. وللمتغيرات ذات التوقعات المحدودة، تتحقق $E[aX+bY]=aE[X]+bE[Y]$ سواء كان X وY مستقلين أم لا. ## Advanced -تتجاهل القيمة المتوقّعة وحدها المخاطرة، فلعبة سانت بطرسبرغ توقّعها لا نهائي لكن لا أحد يدفع كثيرًا ليلعبها. تستبدل نظرية المنفعة، عند برنولي وفون نويمان ومورغنشتيرن، $E[X]$ بـ $E[u(X)]$ لدالة $u$ مقعّرة. ويبيّن معيار كيلي أن تعظيم توقّع لوغاريتم الثروة هو ما ينمّي رأس المال أسرع. +يجعل قانون الأعداد الكبيرة المتوسط المشاهد يقترب من التوقع في محاولات مستقلة ومتطابقة التوزيع، ذات توقع محدود للقيمة المطلقة للنتيجة. يحقق نموذج النتيجتين المحدودتين هنا هذا الشرط. أما ترابط المحاولات أو تغير الاحتمالات أو وجود توقع غير محدود أو غير معرّف، فيحتاج إلى عناية إضافية. وحتى عند تحقق الاقتراب، لا نضمن مجموعًا معينًا في عدد محدود من المحاولات. ## Derivation -1. استخدم النسب على المدى الطويل. -2. اجمع المكاسب واطرح منها الخسائر. -3. لكل لعبة، وزّن كل نتيجة باحتمالها. +1. في أدوار مستقلة كثيرة باحتمال ثابت p، تقترب نسبتا النجاح والإخفاق من p و1−p. والعددان المتوقعان هما Np وN(1−p). +2. نضرب عدد النجاحات في صافي الكسب، ونطرح عدد الإخفاقات مضروبًا في الخسارة. المجموع المتوقع هو Npw−N(1−p)c. +3. نقسم المجموع المتوقع على N، فيكون متوسط التغير لكل دور pw−(1−p)c. وقد يختلف عنه المتوسط المشاهد في تجربة محدودة. ## Real world -### التأمين -القسط هو الدفعة المتوقّعة زائد هامش ربح، فيدفع كثيرون مبلغًا صغيرًا كي تحصل القلّة المتضرّرة على تعويضها. +### تجهيز المستلزمات -### اليانصيب والكازينوهات -تردّ الروليت 97.3% من الرهانات في المتوسط، أي خسارة متوقّعة 2.7% في كل دورة. +إذا كان لفعالية عدة أعداد محتملة للحضور، نحسب عددًا متوقعًا بوزن كل عدد باحتماله. وقد يتطلب التخطيط الاستعداد لحضور مرتفع على نحو غير معتاد، إلى جانب معرفة المتوسط. -### القرارات في ظلّ عدم اليقين -هل تطلق شركة منتجًا جديدًا؟ اضرب ربح كل سيناريو في احتماله ثم اجمع النتائج. +### تصميم الألعاب + +قد تعطي قاعدتان للنقاط التغير المتوقع نفسه، مع تفاوت مختلف جدًا في النتائج. يعيش اللاعب النتائج الفردية، لا المتوسط وحده. diff --git a/content/lessons/statistics/expected-value/en.md b/content/lessons/statistics/expected-value/en.md index 0c71f6d8..310d5ea2 100644 --- a/content/lessons/statistics/expected-value/en.md +++ b/content/lessons/statistics/expected-value/en.md @@ -1,72 +1,69 @@ --- title: Expected value -summary: >- - The average outcome over many repeats — the number that tells you whether a - game, an insurance policy or a bet is worth it. +summary: 'Calculate an average outcome by weighting each possible result by its probability, without treating that average as a guaranteed result.' parameters: - x: p — chance of winning - w: w — amount won - c: c — amount lost otherwise + x: 'p — probability of gaining points' + w: 'w — net points gained on success' + c: 'c — points lost otherwise' variables: - - the random gain from one play - - a possible outcome (win w or lose c) - - its probability + - 'random net score change on one turn' + - 'a possible net change: +w or −c' + - 'probability of that outcome' charts: - - title: Long-run average winnings per play against the win probability - xLabel: p (chance of winning) - yLabel: expected gain + - title: Expected score change against success probability + xLabel: p (success probability) + yLabel: expected score change series: - p·w − (1−p)·c - - fair game (zero) + - zero expectation --- ## Try it -1. Watch the point on the line: it shows your average gain per play at the current «p — chance of winning». -2. Drag «p — chance of winning» to the right. Watch the line's value climb from a loss into a profit. -3. Find where the line crosses zero: that is a fair game, where on average you win exactly what you lose. +1. Set p = 0.4, w = 10 and c = 5. The expected score change is 0.4 × 10 − 0.6 × 5 = 1, even though a single turn gives either +10 or −5. +2. Increase p while keeping w and c fixed. The selected point rises along the line because more probability is assigned to the positive result. +3. Set p = 0.5 and w = c = 8. The expectation is zero. Individual turns still change the score, and a finite run need not finish where it started. ## Real-life examples -1. **Coin-flip bet.** Flip a coin: win 8 on heads, lose 8 on tails — a perfectly fair bet with an average result of zero. -2. **Store raffle ticket.** A 1-in-20 chance to win a prize worth 20, otherwise you lose the 1 you paid for the ticket — worth entering on average. -3. **Risky side bet.** A 90% chance to win a small 2, and a 10% chance to lose 15 — the average is still slightly positive, but a single unlucky spin can hurt a lot. +1. **Equal chances and outcomes.** A 50% chance of gaining 8 points and a 50% chance of losing 8 gives an expected change of zero. +2. **Rare gain.** A 5% chance of gaining 20 points, otherwise losing 1 point, gives expectation 0.05. These are net score changes; if a cost applies on every turn, it must also be subtracted from the gain. +3. **Frequent small gains.** A 90% chance of gaining 2 points and a 10% chance of losing 15 gives expectation 0.3. A positive average does not remove the possibility of a large loss on one turn. ## Test yourself -1. Adjust the sliders until the game is exactly fair — an average result of zero. -2. Make the average result better than +5 per play. -3. Find a game where you win less than half the time, yet it is still profitable on average. +1. Make the expected score change zero. +2. Make the expected score change greater than 5. +3. Use a success probability below 0.5 while keeping the expected score change positive. ## Intuition -You win 10 with probability 0.4, otherwise you lose 5. Over 100 plays you expect about 40 wins (+400) and 60 losses (−300): +100 in total, or +1 per play. That per-play figure is the expected value, $0.4 \times 10 - 0.6 \times 5 = 1$. Drag the point along «p — chance of winning»: where the line crosses zero, the game is fair. +Suppose a turn gives +10 points with probability 0.4 and −5 otherwise. In 100 independent turns with unchanged probabilities, the expected counts are 40 gains and 60 losses. Their expected total is 400−300 = 100 points, or one point per turn. This weighted average is $0.4\times10-0.6\times5=1$. One point is not a possible result of a single turn. -Every lottery, casino game and insurance policy is designed so this number favours the house. The expected value of a €2 lottery ticket is typically about €1 — on average you pay €1 per ticket just for the excitement of playing. +The graph calculates this average for every success probability from zero to one. Its endpoints are −c and w. The selected probability determines the marked value, while changing either score changes the line. If part of the line lies outside the plotting range, the formula still applies. Expected value summarizes an average; it does not describe all the possible outcomes or how widely they differ. ## Formal -$E[X] = \sum_i x_i P(X = x_i)$ for discrete $X$; $E[X] = \int x f(x)\,dx$ for continuous $X$. Linearity: $E[aX + bY] = aE[X] + bE[Y]$ always holds, independent or not. +For finitely many outcomes, $E[X]=\sum_i x_iP(X=x_i)$, with probabilities summing to one. Each outcome is multiplied by its probability. Here $E[X]=pw-(1-p)c$, where p is the success probability, w the net gain on success, and −c the net change otherwise. -The law of large numbers says the average of many plays converges to $E[X]$. +If $w+c>0$, zero expectation occurs at $p=c/(w+c)$. If both w and c are zero, every p gives zero expectation. For variables with finite expectations, $E[aX+bY]=aE[X]+bE[Y]$ whether or not X and Y are independent. ## Advanced -Expected value alone ignores risk: the St Petersburg game has infinite expectation yet nobody would pay much to play. Utility theory (Bernoulli, von Neumann–Morgenstern) replaces $E[X]$ with $E[u(X)]$ for a concave $u$, and the Kelly criterion shows that maximising expected *log* wealth is what grows a bankroll fastest. +The law of large numbers makes the observed average tend to the expectation for independent, identically distributed trials with a finite expected absolute outcome. The finite two-outcome model satisfies this condition. Dependence, changing probabilities and an infinite or undefined expectation require more care. Even with convergence, no finite total is guaranteed. ## Derivation -1. Use the long-run proportions. -2. Add the gains and subtract the losses. -3. Per play: each outcome weighted by its probability. +1. Over many independent turns with the same probability p, the proportions of successes and failures tend to p and 1−p. Their expected counts are Np and N(1−p). +2. Multiply the success count by the net gain and subtract the failure count times the loss. This gives an expected total of Npw−N(1−p)c. +3. Divide the expected total by N. The average change per turn is pw−(1−p)c; a finite observed average can differ. ## Real world -### Insurance -A premium is the expected payout plus a margin: many pay a little so that the few who suffer are paid. +### Planning supplies -### Lotteries and casinos -Roulette returns 97.3% of stakes on average — an expected loss of 2.7% per spin. +If an event has several possible attendance levels, a probability-weighted attendance estimate gives an expected number. Planning may also need to consider unusually busy outcomes, not only the average. -### Decisions under uncertainty -Should a company launch a product? Multiply each scenario’s profit by its probability and add. +### Game design + +Two scoring rules can have the same expected change but very different spreads of results. Players experience the individual outcomes as well as the average. diff --git a/content/lessons/statistics/expected-value/lesson.yaml b/content/lessons/statistics/expected-value/lesson.yaml index af8f2997..68992833 100644 --- a/content/lessons/statistics/expected-value/lesson.yaml +++ b/content/lessons/statistics/expected-value/lesson.yaml @@ -45,7 +45,7 @@ variables: derivation: - "\\text{in } N \\text{ plays: about } Np \\text{ wins and } N(1-p) \\text{ losses}" - \text{total} \approx Np\,w - N(1-p)\,c - - E[X] = \frac{\text{total}}{N} = p\,w - (1-p)\,c + - E[X] = \frac{E[\text{total}]}{N} = p\,w - (1-p)\,c charts: - domain: - 0 From 4eb7d8b9cdd4bf0130ea90e37d5024b2566da579 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:54:48 +0300 Subject: [PATCH 092/124] docs: record completed Statistics editorial review --- content/lessons/EDITORIAL_REVIEW.md | 32 ++++++++++++++--------------- content/lessons/STYLE.en.md | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/content/lessons/EDITORIAL_REVIEW.md b/content/lessons/EDITORIAL_REVIEW.md index b8044cb2..a87bec8f 100644 --- a/content/lessons/EDITORIAL_REVIEW.md +++ b/content/lessons/EDITORIAL_REVIEW.md @@ -1,6 +1,6 @@ # Bilingual editorial review -97 of 390 lessons reviewed. 293 remain. +110 of 390 lessons reviewed. 280 remain. A checked lesson has had both language files rewritten or reviewed against its configuration and visualization source. Automated validation alone does not mark a lesson reviewed. Browser interaction and independent learner review remain separate checks. @@ -416,21 +416,21 @@ Scope: every lesson, including summaries, parameter labels, examples, exercises, - [ ] [the-speed-of-light-is-constant](relativity/the-speed-of-light-is-constant/en.md) · [Arabic](relativity/the-speed-of-light-is-constant/ar.md) - [ ] [the-twin-paradox](relativity/the-twin-paradox/en.md) · [Arabic](relativity/the-twin-paradox/ar.md) -## statistics (0/13) - -- [ ] [bayes-theorem](statistics/bayes-theorem/en.md) · [Arabic](statistics/bayes-theorem/ar.md) -- [ ] [binomial-distribution](statistics/binomial-distribution/en.md) · [Arabic](statistics/binomial-distribution/ar.md) -- [ ] [combinations](statistics/combinations/en.md) · [Arabic](statistics/combinations/ar.md) -- [ ] [confidence-intervals](statistics/confidence-intervals/en.md) · [Arabic](statistics/confidence-intervals/ar.md) -- [ ] [expected-value](statistics/expected-value/en.md) · [Arabic](statistics/expected-value/ar.md) -- [ ] [hypothesis-testing](statistics/hypothesis-testing/en.md) · [Arabic](statistics/hypothesis-testing/ar.md) -- [ ] [law-of-large-numbers](statistics/law-of-large-numbers/en.md) · [Arabic](statistics/law-of-large-numbers/ar.md) -- [ ] [mean-and-spread](statistics/mean-and-spread/en.md) · [Arabic](statistics/mean-and-spread/ar.md) -- [ ] [normal-distribution](statistics/normal-distribution/en.md) · [Arabic](statistics/normal-distribution/ar.md) -- [ ] [permutations](statistics/permutations/en.md) · [Arabic](statistics/permutations/ar.md) -- [ ] [poisson-distribution](statistics/poisson-distribution/en.md) · [Arabic](statistics/poisson-distribution/ar.md) -- [ ] [probability-basics](statistics/probability-basics/en.md) · [Arabic](statistics/probability-basics/ar.md) -- [ ] [sampling-and-polls](statistics/sampling-and-polls/en.md) · [Arabic](statistics/sampling-and-polls/ar.md) +## statistics (13/13) + +- [x] [bayes-theorem](statistics/bayes-theorem/en.md) · [Arabic](statistics/bayes-theorem/ar.md) +- [x] [binomial-distribution](statistics/binomial-distribution/en.md) · [Arabic](statistics/binomial-distribution/ar.md) +- [x] [combinations](statistics/combinations/en.md) · [Arabic](statistics/combinations/ar.md) +- [x] [confidence-intervals](statistics/confidence-intervals/en.md) · [Arabic](statistics/confidence-intervals/ar.md) +- [x] [expected-value](statistics/expected-value/en.md) · [Arabic](statistics/expected-value/ar.md) +- [x] [hypothesis-testing](statistics/hypothesis-testing/en.md) · [Arabic](statistics/hypothesis-testing/ar.md) +- [x] [law-of-large-numbers](statistics/law-of-large-numbers/en.md) · [Arabic](statistics/law-of-large-numbers/ar.md) +- [x] [mean-and-spread](statistics/mean-and-spread/en.md) · [Arabic](statistics/mean-and-spread/ar.md) +- [x] [normal-distribution](statistics/normal-distribution/en.md) · [Arabic](statistics/normal-distribution/ar.md) +- [x] [permutations](statistics/permutations/en.md) · [Arabic](statistics/permutations/ar.md) +- [x] [poisson-distribution](statistics/poisson-distribution/en.md) · [Arabic](statistics/poisson-distribution/ar.md) +- [x] [probability-basics](statistics/probability-basics/en.md) · [Arabic](statistics/probability-basics/ar.md) +- [x] [sampling-and-polls](statistics/sampling-and-polls/en.md) · [Arabic](statistics/sampling-and-polls/ar.md) ## thermodynamics (0/11) diff --git a/content/lessons/STYLE.en.md b/content/lessons/STYLE.en.md index 83da3b18..cbf089db 100644 --- a/content/lessons/STYLE.en.md +++ b/content/lessons/STYLE.en.md @@ -37,6 +37,6 @@ Run `pnpm check` after editing. It validates structure, formulas and challenge s ## Reviewed examples and remaining work -See [the lesson-by-lesson review checklist](EDITORIAL_REVIEW.md) for coverage. The Numbers, Functions, Algebra, Discrete, Geometry, Trigonometry and Calculus sections have received a complete bilingual editorial pass under this guide. +See [the lesson-by-lesson review checklist](EDITORIAL_REVIEW.md) for coverage. The Numbers, Functions, Algebra, Discrete, Geometry, Trigonometry, Calculus and Statistics sections have received a complete bilingual editorial pass under this guide. The remaining lessons still need individual review of their summaries, controls, explanations, examples and challenges. Do not treat a global phrase replacement or a successful build as an editorial review. From 17f618a087cdc14f0211f2cae9410fedae4509d6 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 23:13:27 +0300 Subject: [PATCH 093/124] content: rewrite newtons-second-law for first-time learners in both languages --- .../lessons/physics/newtons-second-law/ar.md | 60 +++++++++--------- .../lessons/physics/newtons-second-law/en.md | 62 +++++++++---------- content/ui/ar/block-force.yaml | 5 ++ content/ui/en/block-force.yaml | 5 ++ src/viz/physics/BlockForce.vue | 11 ++-- 5 files changed, 74 insertions(+), 69 deletions(-) create mode 100644 content/ui/ar/block-force.yaml create mode 100644 content/ui/en/block-force.yaml diff --git a/content/lessons/physics/newtons-second-law/ar.md b/content/lessons/physics/newtons-second-law/ar.md index b31de991..533af0dd 100644 --- a/content/lessons/physics/newtons-second-law/ar.md +++ b/content/lessons/physics/newtons-second-law/ar.md @@ -1,15 +1,14 @@ --- title: قانون نيوتن الثاني -summary: >- - ادفع أقوى يتسارع الجسم أكثر، وإن كان أثقل احتجت قوة أكبر. لهذا للشاحنة محرك أقوى. +summary: 'اربط محصلة القوى المؤثرة في جسم ثابت الكتلة بمعدل تغير سرعته المتجهة.' parameters: - F: القوة F - m: الكتلة m + F: 'F — محصلة القوة الأفقية' + m: 'm — الكتلة' variables: - - القوة المحصِّلة التي تدفع الجسم - - كتلة الجسم، ويظهرها حجمه - - التسارع الناتج، وهو F مقسومًا على m - - سرعة الجسم، وتتزايد بثبات تحت تسارع ثابت + - 'مجموع القوى الخارجية الأفقية المؤثرة في الجسم' + - 'كتلة الجسم الثابتة' + - 'التسارع: معدل تغير السرعة المتجهة' + - 'السرعة المتجهة، وتبدأ من صفر في كل دورة عرض' charts: - title: السرعة والموضع عبر الزمن xLabel: t (s) @@ -21,51 +20,50 @@ charts: ## Try it -1. راقب الصندوق. يبدأ ساكنًا ثم يتسارع مع دفع السهم له. -2. ارفع المنزلق «القوة F». يصل الصندوق إلى نهاية الأرضية أسرع بكثير. -3. الآن ارفع «الكتلة m» بدلًا منها. الدفع نفسه لا يكاد يحرّك الصندوق الأثقل. التسارع = القوة ÷ الكتلة. +1. اجعل F = 10 N وm = 2 kg. التسارع 5 m/s²؛ أي إن السرعة المتجهة تزيد بمقدار 5 m/s كل ثانية ما دامت محصلة القوة هذه تؤثر. +2. أبقِ m = 2 kg وارفع F إلى 20 N. يتضاعف التسارع إلى 10 m/s². يبدأ الجسم من السكون كلما غيّرت أحد الإعدادات. +3. أبقِ F = 20 N وارفع m إلى 4 kg. يعود التسارع إلى 5 m/s². يمثل حجم الجسم كتلته؛ استخدم قراءة التسارع للمقارنة، ولا تعامل أطوال الأسهم كقياسات دقيقة. ## Real-life examples -1. **دفع عربة التسوق.** دفعة ثابتة قدرها 20 N على عربة كتلتها 15 kg تزيد سرعتها نحو 1.3 m/s كل ثانية. -2. **ركل كرة القدم.** ركلة قوية قدرها 50 N على كرة كتلتها 0.5 kg تعطي تسارعًا هائلًا، ولهذا تنطلق الكرة من قدمك بسرعة كبيرة. -3. **تحريك صندوق ثقيل.** قوة 30 N على صندوق كتلته 20 kg بالكاد تحركه: 1.5 m/s². +1. **عربة في نموذج مثالي.** محصلة قوة أفقية 20 N على عربة كتلتها 15 kg تعطي تسارعًا 20/15 ≈ 1.33 m/s². يجب أن تكون القوى المقاومة محسوبة ضمن هذه المحصلة. +2. **جسم خفيف.** محصلة قوة 50 N على كتلة 0.5 kg تعطي تسارعًا 100 m/s². إذا أثرت مدة 0.1 s، تغيّرت السرعة بمقدار 10 m/s؛ فمدة التأثير مهمة أيضًا. +3. **جسم أثقل.** محصلة قوة 30 N على كتلة 20 kg تعطي تسارعًا 1.5 m/s². إذا بدأ الجسم من السكون، تصبح سرعته بعد ثانيتين 3 m/s، وتبلغ إزاحته 3 m. ## Test yourself -1. اجعل تسارع الصندوق 2 m/s² بالضبط. -2. اجعل الكتلة 10 kg، ثم جد القوة التي تعطي تسارعًا قدره 1.5 m/s². -3. اجعل التسارع هادئًا حتى 0.5 m/s². +1. اجعل التسارع 2 m/s². +2. اجعل m = 10 kg، واختر القوة التي تعطي تسارعًا 1.5 m/s². +3. اجعل التسارع قريبًا من 0.5 m/s². ## Intuition -تخيل أنك تدفع عربة تسوّق كتلتها 15 كجم بقوة ثابتة قدرها 20 نيوتن، أي بقدر دفعة يد قوية. حرّك المنزلق «القوة F» وراقب السهم البرتقالي على الصندوق يكبر أو يصغر تبعًا له. الدفعة الأقوى تجعل الصندوق ينطلق من خط البداية أسرع، وترى الأثر فور تحريك المنزلق. +دفع الجسم لا يحدد سرعته مباشرة؛ فمحصلة القوة تغيّر سرعته المتجهة. في هذا النموذج، تؤدي قوة 10 N على جسم كتلته 2 kg إلى تسارع 5 m/s². إذا بدأ من السكون، تصبح سرعته 5 m/s بعد ثانية و10 m/s بعد ثانيتين، بشرط استمرار محصلة القوة نفسها. -الآن أبقِ الدفعة كما هي وحرّك المنزلق «الكتلة m» إلى الأعلى، حتى يكبر الصندوق على الشاشة كأنه شاحنة توصيل محمّلة. الدفعة نفسها بالكاد تحرّكه الآن. يتقلص السهم الأخضر الذي يمثل التسارع رغم أن السهم البرتقالي الذي يمثل القوة لم يتغيّر، لأن القوة نفسها تحرّك الآن كتلة أكبر بكثير. +تعني «محصلة القوة» الأثر المجمع لكل القوى الخارجية، بما فيها المقاومة إن وجدت. عند ثبات المحصلة، تؤدي مضاعفة الكتلة إلى خفض التسارع إلى النصف. وعند ثبات الكتلة، تؤدي مضاعفة المحصلة إلى مضاعفة التسارع. تعيد الحركة الجسم إلى البداية بعد وصوله إلى حافة الشاشة لتكرار العرض؛ هذا ليس جزءًا من القانون الفيزيائي. ويعرض الرسم السفلي السرعة والإزاحة بوحدتيهما المختلفتين على مقياس عددي مشترك. ## Formal -ينص قانون نيوتن الثاني على أن القوة المحصِّلة المؤثرة في جسم تساوي معدل تغيّر زخمه، إذ $F = \dfrac{dp}{dt}$. +لجسم ثابت الكتلة في إطار مرجعي قصوري، تتحقق العلاقة $\mathbf F_{\mathrm{net}}=m\mathbf a$. الإطار القصوري هو إطار يحافظ فيه الجسم على سرعة متجهة ثابتة إذا كانت محصلة القوى عليه صفرًا. القوة والتسارع كميتان متجهتان، لذلك تنطبق العلاقة على مركباتهما في كل اتجاه. -بالنسبة لجسم ثابت الكتلة، يكون الزخم $p = mv$، وبالتالي $F = m\dfrac{dv}{dt} = ma$. أي أن القوة تساوي الكتلة مضروبة في التسارع. +في مثالنا ذي البعد الواحد، $a=F/m$، حيث نقيس الكتلة بالكيلوغرام، والقوة بالنيوتن، والتسارع بالمتر لكل ثانية مربعة. ومع محصلة ثابتة وبداية من السكون عند موضع الصفر، تكون $v=at$ و$x=\tfrac12at^2$. انعدام المحصلة يعني انعدام التسارع، ولا يعني بالضرورة انعدام السرعة. ## Advanced -بصورة عامة $\mathbf{F} = d\mathbf{p}/dt$. وبالنسبة للكتلة المتغيرة، كالصاروخ، يكون لحد $\dot m$ أهمية. وبمعلومية $\mathbf{F}(\mathbf{x}, \mathbf{v}, t)$ يكون القانون معادلة تفاضلية من الرتبة الثانية، فالموضع والسرعة عند لحظة واحدة يحددان الحركة كلها. +لمجموعة ثابتة من الجسيمات، تساوي محصلة القوى الخارجية مشتقة الزخم الكلي بالنسبة إلى الزمن: F = dp/dt. في الميكانيكا الكلاسيكية، زخم جسيم ثابت الكتلة هو p = mv، فنحصل على F = ma. أما الصاروخ فيطرد مادة تحمل زخمًا؛ لذلك يجب إدخال هذا الزخم في الموازنة، ولا يكفي اشتقاق كتلة الصاروخ المتغيرة وحدها. ## Derivation -1. الزخم هو الكتلة مضروبة في السرعة، وهو مقياس لمدى صعوبة إيقاف شيء متحرك. -2. تُعرَّف القوة بأنها سرعة تغيّر الزخم عبر الزمن. -3. عندما تبقى الكتلة ثابتة تخرج من داخل المشتقة، فتصبح القوة مساوية للكتلة مضروبة في التسارع. +1. زخم جسيم ثابت الكتلة في الميكانيكا الكلاسيكية يساوي كتلته مضروبة في سرعته المتجهة. +2. يربط قانون نيوتن الثاني محصلة القوى الخارجية بمعدل تغير زخم النظام الذي نتتبعه. +3. عند ثبات الكتلة نخرجها من الاشتقاق. مشتقة السرعة المتجهة هي التسارع، فنحصل على F = ma. ## Real world -### السيارات -المحرك الأقوى يبذل قوة أكبر، فتتسارع السيارة نفسها بشكل أسرع عند كتلة معينة. +### مقارنة الأحمال -### الصواريخ -كلما أحرق الصاروخ وقوده انخفضت كتلته، فيُنتِج الدفع نفسه تسارعًا أكبر فأكبر. +المحصلة نفسها تعطي العربة المحملة تسارعًا أقل من العربة الفارغة. وعند مقارنة قوتي دفع مطبقتين، يجب حساب اختلاف المقاومة أيضًا. -### الرياضة -تحتاج كرة دفع ثقل أثقل إلى دفعة أكبر بكثير من كرة خفيفة لتغادر اليد بالتسارع نفسه. +### تغير الاتجاه + +يمكن أن يتسارع جسم مع ثبات مقدار سرعته إذا تغيّر اتجاهها. الحركة الدائرية مثال على ذلك؛ فالتسارع لا يعني زيادة مقدار السرعة فقط. diff --git a/content/lessons/physics/newtons-second-law/en.md b/content/lessons/physics/newtons-second-law/en.md index 3e08d5d4..bf381f1f 100644 --- a/content/lessons/physics/newtons-second-law/en.md +++ b/content/lessons/physics/newtons-second-law/en.md @@ -1,17 +1,14 @@ --- title: Newton's second law -summary: >- - Push harder and something speeds up faster; push the same object once it's - heavier and you need much more force for the same effect, which is why - trucks need bigger engines than small cars. +summary: 'Relate the net force on a constant-mass object to how quickly its velocity changes.' parameters: - F: force F - m: mass m + F: 'F — net horizontal force' + m: 'm — mass' variables: - - the net force pushing the block - - 'the block''s mass, shown by its size' - - 'the resulting acceleration, F divided by m' - - 'the block''s velocity, which grows steadily under constant acceleration' + - 'sum of external horizontal forces on the block' + - 'constant mass of the block' + - 'acceleration: rate of change of velocity' + - 'velocity, starting from zero in each animation cycle' charts: - title: Velocity and position over time xLabel: t (s) @@ -23,51 +20,50 @@ charts: ## Try it -1. Watch the crate. It starts still and speeds up as the arrow pushes it. -2. Raise the slider «force F». The crate reaches the end of the floor much sooner. -3. Now raise «mass m» instead. The same push barely moves the heavier crate. Acceleration = force ÷ mass. +1. Set F = 10 N and m = 2 kg. The acceleration is 5 m/s²: velocity increases by 5 m/s each second while this net force acts. +2. Keep m = 2 kg and raise F to 20 N. Acceleration doubles to 10 m/s². Changing a control restarts the block from rest. +3. Keep F = 20 N and raise m to 4 kg. Acceleration returns to 5 m/s². The block's size represents mass; compare the acceleration readout rather than treating arrow lengths as exact measurements. ## Real-life examples -1. **Pushing a shopping cart.** A steady 20 N push on a 15 kg cart: it speeds up by about 1.3 m/s every second. -2. **Kicking a football.** A hard kick of 50 N on a 0.5 kg ball gives a huge acceleration, which is why the ball leaves your foot so fast. -3. **Moving a heavy box.** 30 N on a 20 kg box barely gets it going: 1.5 m/s². +1. **An ideal cart.** A net horizontal force of 20 N on a 15 kg cart gives acceleration 20/15 ≈ 1.33 m/s². Any opposing forces must already be included in that net force. +2. **A light object.** A net force of 50 N on 0.5 kg gives 100 m/s². If it acts for 0.1 s, the velocity changes by 10 m/s; the duration matters too. +3. **A heavier block.** A net force of 30 N on 20 kg gives 1.5 m/s². Starting from rest, after 2 s the velocity is 3 m/s and the displacement is 3 m. ## Test yourself -1. Make the crate accelerate at exactly 2 m/s². -2. Set the mass to 10 kg, then find the force that gives an acceleration of 1.5 m/s². -3. Make the acceleration as gentle as 0.5 m/s². +1. Make the acceleration 2 m/s². +2. Set m = 10 kg and choose a force giving acceleration 1.5 m/s². +3. Make the acceleration approximately 0.5 m/s². ## Intuition -Picture pushing a 15 kg shopping cart with a steady 20 N push — about as hard as a firm shove. Drag the slider "force F" and watch the orange arrow on the crate grow or shrink to match: a bigger push always makes the crate leap off the starting line faster, and you see the effect the moment you move the slider. +Pushing an object does not directly set its speed. The net force changes its velocity. In this model a 10 N force on a 2 kg block produces an acceleration of 5 m/s². Starting from rest, the block reaches 5 m/s after one second and 10 m/s after two seconds, provided the same net force continues to act. -Now keep the push the same and drag "mass m" up instead, until the block on screen grows as big as a loaded delivery truck. The same push barely moves it now — the green acceleration arrow shrinks even though the orange force arrow hasn't changed, because the same push now has far more mass to share it with. +Net force means the combined effect of all external forces, including any resistance. With the net force fixed, doubling the mass halves the acceleration. With the mass fixed, doubling the net force doubles it. The animation repeatedly starts from rest when the block reaches the screen edge; this reset is for display, not part of the physical law. The lower chart plots velocity and displacement with their different units on a shared numerical scale. ## Formal -Newton's second law states that the net force on an object equals the rate of change of its momentum: $F = \dfrac{dp}{dt}$. +For a constant-mass object in an inertial frame, $\mathbf F_{\mathrm{net}}=m\mathbf a$. An inertial frame is one in which an object with zero net force maintains constant velocity. Force and acceleration are vectors, so the relation applies to their components in each direction. -For an object of constant mass, momentum is $p = mv$, so $F = m\dfrac{dv}{dt} = ma$ — force equals mass times acceleration. +In this one-dimensional example, $a=F/m$, with mass in kilograms, force in newtons and acceleration in metres per second squared. For constant net force and a start from rest at zero position, $v=at$ and $x=\tfrac12at^2$. Zero net force means zero acceleration, not necessarily zero velocity. ## Advanced -In general $\mathbf{F} = d\mathbf{p}/dt$; for variable mass (a rocket) the $\dot m$ term matters. Given $\mathbf{F}(\mathbf{x}, \mathbf{v}, t)$ the law is a second-order ODE, so position and velocity at one instant determine the whole motion. +For a fixed set of particles, the external net force is the time derivative of total momentum, F = dp/dt. In classical mechanics, a constant-mass particle has p = mv, giving F = ma. Applying momentum balance to a rocket requires accounting for the momentum carried away by expelled material; differentiating the rocket's changing mass alone is not sufficient. ## Derivation -1. Momentum is mass times velocity — a measure of how hard it is to stop something moving. -2. Force is defined as how quickly momentum changes over time. -3. When the mass stays constant it comes out of the derivative, leaving force equal to mass times acceleration. +1. For a constant-mass particle in classical mechanics, momentum is mass multiplied by velocity. +2. Newton's second law relates external net force to the rate of change of momentum for the system being followed. +3. With mass constant, take it outside the derivative. The derivative of velocity is acceleration, giving F = ma. ## Real world -### Cars -A more powerful engine applies more force, so the same car accelerates faster for a given mass. +### Comparing loads -### Rockets -As a rocket burns fuel its mass falls, so the same thrust produces ever greater acceleration. +The same net force gives a loaded cart less acceleration than an empty cart. A comparison of applied pushes must also account for differences in resistance. -### Sports -A heavier shot put needs a much larger push than a light ball to leave the hand with the same acceleration. +### Changing direction + +An object can accelerate while keeping the same speed if its direction changes. Circular motion is an example, so “acceleration” means more than speeding up. diff --git a/content/ui/ar/block-force.yaml b/content/ui/ar/block-force.yaml new file mode 100644 index 00000000..53c921d8 --- /dev/null +++ b/content/ui/ar/block-force.yaml @@ -0,0 +1,5 @@ +block.force: 'محصلة القوة F' +block.mass: 'الكتلة m' +block.acceleration: 'التسارع a = F/m' +block.velocity: 'السرعة المتجهة v' +block.time: 'الزمن t' diff --git a/content/ui/en/block-force.yaml b/content/ui/en/block-force.yaml new file mode 100644 index 00000000..a1b76248 --- /dev/null +++ b/content/ui/en/block-force.yaml @@ -0,0 +1,5 @@ +block.force: 'net force F' +block.mass: 'mass m' +block.acceleration: 'acceleration a = F/m' +block.velocity: 'velocity v' +block.time: 'time t' diff --git a/src/viz/physics/BlockForce.vue b/src/viz/physics/BlockForce.vue index af33987b..fb2de8af 100644 --- a/src/viz/physics/BlockForce.vue +++ b/src/viz/physics/BlockForce.vue @@ -1,6 +1,7 @@ From de47213b9a6fdce63f073d495c11c9993683b216 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 23:35:53 +0300 Subject: [PATCH 122/124] content: rewrite sound-intensity-and-decibels for first-time learners in both languages --- .../waves/sound-intensity-and-decibels/ar.md | 61 +++++++++--------- .../waves/sound-intensity-and-decibels/en.md | 63 +++++++++---------- content/ui/ar/decibel.yaml | 18 ++---- content/ui/en/decibel.yaml | 18 ++---- src/viz/waves/SoundIntensityAndDecibels.vue | 11 ++-- 5 files changed, 72 insertions(+), 99 deletions(-) diff --git a/content/lessons/waves/sound-intensity-and-decibels/ar.md b/content/lessons/waves/sound-intensity-and-decibels/ar.md index cb3bcee1..f3dfae3a 100644 --- a/content/lessons/waves/sound-intensity-and-decibels/ar.md +++ b/content/lessons/waves/sound-intensity-and-decibels/ar.md @@ -1,67 +1,62 @@ --- title: شدة الصوت والديسيبل -summary: >- - الصوت يخفت مع البعد، والديسيبل يحوّل الشدة إلى أرقام: همسة 30، وطائرة 120. +summary: 'اربط نسب الشدة بفروق الديسيبل، ثم احسب انخفاض مستوى مصدر نقطي مثالي مع المسافة.' parameters: - dB0: مستوى المصدر عند 1 m - r: البُعد r + dB0: 'β₀ — مستوى الشدة عند 1 m' + r: 'r — البُعد عن المصدر' variables: - - مستوى الصوت بالديسيبل، ومستوى المصدر عند 1 m - - شدة الصوت، وأضعف شدة مسموعة - - قدرة المصدر - - البُعد عن المصدر، والبُعد المرجعي 1 m + - 'مستوى الشدة وقيمته عند المسافة المرجعية' + - 'الشدة والشدة المرجعية الثابتة' + - 'القدرة الصوتية الكلية للمصدر المثالي' + - 'البُعد والمسافة المرجعية البالغة 1 m' --- ## Try it -1. اقرأ الديسيبل قرب المصدر، ثم حرّك منزلق البُعد r إلى الخارج. تنخفض القراءة كلما ابتعدت. -2. ارفع منزلق مستوى المصدر dB0 لترى كيف يرفع مصدر أعلى صوتًا المنحنى كله عند كل بُعد. -3. راقب علامة السلامة. بمجرد أن تتجاوز القراءة 85 dB تُنبّه إلى خطر التعرض الطويل، وفوق 120 dB تُنبّه إلى خطر فوري. +1. اجعل المستوى عند 1 m يساوي 100 dB، واجعل r = 1 m. تكون القراءة 100 dB والانخفاض بسبب المسافة صفرًا. +2. انتقل إلى r = 2 m ثم 4 m. تخفض كل مضاعفة للمسافة مستوى النموذج بنحو 6.02 dB. +3. اجعل r = 10 m. يصبح المستوى 80 dB، أي بانخفاض 20 dB. ارفع المستوى المرجعي للمصدر بمقدار 10 dB؛ ترتفع القراءة بالمقدار نفسه. ## Real-life examples -1. **همسة قرب أذنك.** مصدر هادئ جدًا قريب منك (dB0 = 30، r = 1 m) يقع عند مستوى الهمس، يُسمع بسهولة في غرفة هادئة. -2. **الوقوف قرب شارع مزدحم.** مصدر بجهارة محرك عابر عن قرب (dB0 = 90، r = 5 m) يبقى عاليًا بما يكفي ليصعّب الحديث. -3. **طائرة نفاثة عن بُعد.** حتى على بُعد مئة متر من محرك طائرة نفاثة (dB0 = 140، r = 100 m)، يبقى المستوى عاليًا بما يكفي ليهدد السمع دون حماية. +1. **عند المسافة المرجعية.** مصدر نموذجي مستواه 30 dB عند 1 m يعطي 30 dB عندما تكون r = 1 m. +2. **على بُعد خمسة أمتار.** مصدر مستواه 90 dB عند 1 m يعطي نحو 76.0 dB عند 5 m، بانخفاض يقارب 14.0 dB. +3. **على بُعد مئة متر.** مصدر مستواه 140 dB عند 1 m يعطي 100 dB عند 100 m في هذا النموذج المثالي. لا يمثل هذا الإعداد قياسًا لمحرك أو مكان بعينه. ## Test yourself -1. اعثر على بُعد تهبط عنده القراءة إلى 85 dB بالضبط، عتبة ضرر التعرض الطويل. -2. اعثر على بُعد تصل عنده القراءة إلى 120 dB، عتبة الخطر الفوري. -3. ابتعد بما يكفي لتهبط القراءة دون 30 dB، بجهارة همسة. +1. ابحث عن إعدادات تعطي مستوى محسوبًا مقداره 85 dB. +2. ابحث عن إعدادات تعطي مستوى محسوبًا مقداره 120 dB. +3. اجعل المستوى المحسوب أقل من 30 dB. ## Intuition -قف قرب مكبر صوت، فقد يكون مزعج الجهارة. امشِ إلى منتصف الغرفة، ويبدو المكبر نفسه أهدأ بوضوح، رغم أنه لم يتغيّر إطلاقًا. ينتشر الصوت من مصدره في كل اتجاه، فتُوزَّع الطاقة نفسها على كرة تكبر باستمرار كلما ابتعدت عن المصدر. عند ضعف البُعد، تُوزَّع طاقة الصوت على أربعة أضعاف المساحة. لذلك لا تصل كل بقعة من تلك الكرة، بما فيها أذنك، إلا ربع الشدة السابقة. +تخيل القدرة الصوتية نفسها تتوزع بالتساوي على كرات تكبر مساحتها تدريجيًا. عند مضاعفة البُعد تصبح مساحة الكرة أربعة أضعاف، فيصل إلى كل متر مربع ربع القدرة السابقة. هذه القدرة لكل وحدة مساحة هي الشدة. يفترض النموذج مصدرًا نقطيًا منفردًا في فضاء مفتوح، دون انعكاس أو امتصاص. -مدى هذه الشدة هائل. تفصل بين الهمسة ومحرك الطائرة النفاثة نسبة تقارب تريليون مرة في الشدة الخام. لهذا تُقاس الجهارة على سلّم ديسيبل مضغوط بدل رقم شدة عادي. كل 10 dB إضافية تعني عشرة أضعاف الشدة، لكنها تعني للأذن تقريبًا ضعف الجهارة المُدرَكة فقط. وكل 20 dB تقابل ابتعاد مصدر الصوت أو اقترابه عشرة أضعاف. +يعبّر الديسيبل عن نسبة بمقياس لوغاريتمي. زيادة الشدة عشرة أضعاف تضيف 10 dB، وزيادتها مئة ضعف تضيف 20 dB. هذه نسب للشدة، ولا تعني نسبًا مساوية لعلو الصوت الذي ندركه. ومحور المسافة لوغاريتمي أيضًا؛ فالمسافة المرسومة من 1 إلى 10 m تساوي المرسومة من 10 إلى 100 m. لذلك يظهر قانون التربيع العكسي هنا خطًا مستقيمًا. ## Formal -يُعرَّف مستوى الصوت بالديسيبل بالصيغة $\beta = 10\log_{10}(I/I_0)$، وهي تقارن شدة صوت $I$ بأضعف شدة يمكن لأذن بشرية كشفها، $I_0$. قدرة مصدر $P$ تنتشر على كرة مساحتها $4\pi r^2$، لذلك تنخفض الشدة بالصيغة $I = P/(4\pi r^2)$، وهذا قانون التربيع العكسي. +لمصدر نقطي يشع قدرة صوتية P بالتساوي في كل الاتجاهات، تكون $I=P/(4\pi r^2)$. مستوى الشدة هو $\beta=10\log_{10}(I/I_0)$، مع المرجع $I_0=10^{-12}\ \mathrm{W/m^2}$. هذه قيمة مرجعية، وليست عتبة سمع واحدة لكل شخص وتردد. -الجمع بين الصيغتين يعطي المستوى عند أي بُعد مباشرة من المستوى عند بُعد مرجعي 1 m، $\beta(r) = \beta_0 - 20\log_{10}(r/r_0)$. مضاعفة البُعد عن مصدر تُنقص المستوى دائمًا بنحو 6 dB، أيًّا كانت جهارة المصدر في الأصل. +باستخدام المصدر نفسه عند المسافة المرجعية $r_0=1\ \mathrm{m}$، يكون المستوى $\beta(r)=\beta_0-20\log_{10}(r/r_0)$. تغير مضاعفة r المستوى بمقدار $-20\log_{10}2\approx-6.02\ \mathrm{dB}$. تعني قيمة الديسيبل السالبة شدة أقل من المرجع، لا شدة فيزيائية سالبة. ## Advanced -يعتمد ضرر السمع على المستوى ومدة التعرض معًا. التعرض المستمر فوق نحو 85 dB طوال يوم عمل كامل يُعدّ خطرًا، لكن 85 dB نفسها لبضع دقائق آمنة عادة. دفعة واحدة فوق نحو 120 إلى 140 dB قد تسبب ضررًا فوريًا ودائمًا مهما قصرت مدتها. لهذا لا يكفي سلّم الديسيبل وحده لتحديد خطر السمع، بل لا بد أيضًا من معرفة مدة التعرض نفسها. +مستوى الشدة ومستوى ضغط الصوت والقياسات الموزونة حسب التردد كميات مختلفة. في موجة مستوية منتشرة ذات معاوقة صوتية ثابتة، تتناسب الشدة مع مربع سعة الضغط؛ ومن ذلك تأتي صيغة فيها 20 مضروبة في لوغاريتم نسبة الضغط. يتنبأ هذا العرض بالانتشار الهندسي المثالي فقط، ولا يقيس التعرض للصوت ولا يحدد سلامته على السمع. ## Derivation -1. تنتشر قدرة المصدر على كرة تتمدد، فتنخفض الشدة بالصيغة $I = P/(4\pi r^2)$. -2. يقارن مستوى الصوت تلك الشدة بأضعف شدة مسموعة على سلّم لوغاريتمي، $\beta = 10\log_{10}(I/I_0)$. -3. الجمع بين الصيغتين يحوّل البُعد مباشرة إلى تغيّر في المستوى من مرجع معروف، $\beta(r) = \beta_0 - 20\log_{10}(r/r_0)$. +1. نقسم القدرة الصوتية الثابتة على مساحة كرة مركزها المصدر. +2. نعبّر عن الشدة نسبةً إلى المرجع الثابت باستخدام لوغاريتم للأساس عشرة. +3. نحسب فرق المستوى بين مسافتين؛ فتتحول نسبة الشدة ذات التربيع العكسي إلى سالب عشرين مضروبًا في لوغاريتم نسبة المسافتين. ## Real world -### معايير حماية السمع -تحدّ قواعد سلامة أماكن العمل من مدة تعرض العامل لصوت فوق نحو 85 dB دون حماية أذن، مُنقصةً الوقت المسموح تقريبًا إلى النصف مع كل 3 dB إضافية. +### مقارنة القياسات -### سماعات إلغاء الضوضاء -تقيس السماعات الصوت الوارد وتولّد موجة معاكسة لإلغائه، وأكثر فعاليتها ضد الطنين المنخفض الثابت حيث يسهل التنبؤ بمستويات الديسيبل ومطابقتها. +تحتاج قيمة الديسيبل إلى تحديد المرجع ونوع القياس. فرق 10 dB في مستوى الشدة يعني أن الشدة تضاعفت عشر مرات. -### أنظمة ضوضاء المدن -تضع مدن كثيرة حدودًا بالديسيبل على ضوضاء البناء والمرور في ساعات معينة، مقيسة بالسلّم اللوغاريتمي نفسه المستخدم هنا. +### الصوت في الغرف -### حدود صوت الحفلات والقاعات -كثيرًا ما تحدّ قاعات الموسيقى الحية مستوى الصوت قرب المسرح لحماية الجمهور والفنانين معًا من ضرر دائم في السمع قد ينتج عن التعرض لساعات طويلة. +تغير الجدران والامتصاص واتجاهية المصدر قاعدة المسافة البسيطة. حساب المصدر النقطي في فضاء مفتوح نموذج أولي، لا تنبؤ كامل بما يحدث في الغرفة. diff --git a/content/lessons/waves/sound-intensity-and-decibels/en.md b/content/lessons/waves/sound-intensity-and-decibels/en.md index 9a536f67..fa006537 100644 --- a/content/lessons/waves/sound-intensity-and-decibels/en.md +++ b/content/lessons/waves/sound-intensity-and-decibels/en.md @@ -1,69 +1,62 @@ --- title: Sound intensity and decibels -summary: >- - Sound spreads out and fades with distance the way light from a bulb does, - and the decibel scale turns that fading intensity into the loudness numbers - used from a 30 dB whisper to a 120 dB jet, and the levels that damage hearing. +summary: 'Connect intensity ratios to decibel differences, then calculate how an ideal point source’s level falls with distance.' parameters: - dB0: source level at 1 m - r: distance r + dB0: 'β₀ — intensity level at 1 m' + r: 'r — distance from the source' variables: - - sound level in decibels, and the source's level at 1 m - - sound intensity, and the faintest audible intensity - - source power - - distance from the source, and the reference distance 1 m + - 'intensity level and its reference-distance value' + - 'intensity and the fixed reference intensity' + - 'total acoustic power of the ideal source' + - 'distance and reference distance of 1 m' --- ## Try it -1. Read the decibel readout close to the source, then drag the distance slider r outward. The level drops as you move away. -2. Raise the source level slider dB0 to see how a louder source shifts the whole curve upward at every distance. -3. Watch the safety marker: once the readout crosses 85 dB it flags prolonged exposure as risky, and past 120 dB it flags immediate danger. +1. Set the level at 1 m to 100 dB and r = 1 m. The received level is 100 dB and the distance-related drop is zero. +2. Move to r = 2 m, then 4 m. Each doubling lowers the model's level by about 6.02 dB. +3. Set r = 10 m. The level is 80 dB, a 20 dB drop. Raise the source's reference level by 10 dB; the received level also rises by 10 dB. ## Real-life examples -1. **A whisper close to your ear.** A very quiet source right next to you (dB0 = 30, r = 1 m) sits at the whisper level, easily heard in a quiet room. -2. **Standing near a busy street.** A source as loud as a passing engine at close range (dB0 = 90, r = 5 m) still reaches a level loud enough to make conversation difficult. -3. **A jet at a distance.** Even a hundred metres from a jet engine (dB0 = 140, r = 100 m), the level stays high enough to risk hearing damage without protection. +1. **At the reference distance.** A model source rated 30 dB at 1 m gives 30 dB at r = 1 m. +2. **Five metres away.** A source rated 90 dB at 1 m gives about 76.0 dB at 5 m, a drop of about 14.0 dB. +3. **A hundred metres away.** A source rated 140 dB at 1 m gives 100 dB at 100 m in this ideal model. The setting is not a measurement of a particular engine or venue. ## Test yourself -1. Find a distance where the level drops to exactly the 85 dB long-exposure damage threshold. -2. Find a distance where the level reaches the 120 dB immediate-danger threshold. -3. Move far enough away that the level drops below 30 dB, as quiet as a whisper. +1. Find settings that give a calculated level of 85 dB. +2. Find settings that give a calculated level of 120 dB. +3. Make the calculated level less than 30 dB. ## Intuition -Stand near a loudspeaker and it can be uncomfortably loud; walk halfway across the room and it sounds noticeably quieter, even though the speaker itself has not changed. Sound spreads outward from its source in every direction, so the same total energy is stretched over an ever-larger sphere as it travels — twice as far away, the sound's energy is spread over four times the area, so each patch of that sphere (including your ear) receives only a quarter as much. +Imagine the same sound power spreading evenly over larger and larger spheres. Doubling the distance makes the sphere's area four times as large. Each square metre then receives one quarter of the power. This power per area is intensity. The model assumes an isolated point source in open space, without reflections or absorption. -Because that intensity range is so enormous — a whisper and a jet engine differ by a factor of roughly a trillion in raw intensity — loudness is measured on a compressed decibel scale instead of a plain intensity number. Every extra 10 dB means ten times the intensity, but because of how the ear perceives it, roughly twice as loud to a listener; every 20 dB corresponds to the sound source being ten times farther away or ten times closer. +Decibels express a ratio on a logarithmic scale. Ten times the intensity adds 10 dB; one hundred times adds 20 dB. These are intensity ratios, not equal ratios of perceived loudness. The distance axis is logarithmic too: the spacing from 1 to 10 m matches the spacing from 10 to 100 m. That makes this inverse-square law appear as a straight line in the plot. ## Formal -Sound level in decibels is defined as $\beta = 10\log_{10}(I/I_0)$, comparing a sound's intensity $I$ against the faintest intensity a human ear can detect, $I_0$. Because a source's power $P$ spreads over a sphere of area $4\pi r^2$, intensity falls off as $I = P/(4\pi r^2)$, an inverse-square law. +For an isotropic point source of acoustic power P, $I=P/(4\pi r^2)$. Intensity level is $\beta=10\log_{10}(I/I_0)$ with reference $I_0=10^{-12}\ \mathrm{W/m^2}$. This is a reference value, not a universal hearing threshold for every person and frequency. -Combining the two gives the level at any distance directly from the level at a 1 m reference distance: $\beta(r) = \beta_0 - 20\log_{10}(r/r_0)$. Doubling the distance from a source always drops the level by about 6 dB, regardless of how loud the source is to begin with. +Using the same source at reference distance $r_0=1\ \mathrm{m}$, the level is $\beta(r)=\beta_0-20\log_{10}(r/r_0)$. Doubling r changes it by $-20\log_{10}2\approx-6.02\ \mathrm{dB}$. A negative decibel value means intensity below the reference, not negative physical intensity. ## Advanced -Hearing damage depends on both level and exposure time: continuous exposure above roughly 85 dB for a full working day is considered risky, but the same 85 dB for a few minutes is generally safe, while a single burst above about 120–140 dB can cause immediate, permanent damage regardless of duration — which is why the decibel scale alone does not fully capture hearing risk without also asking "for how long?" +Intensity level, sound pressure level and frequency-weighted measurements are distinct quantities. In a progressive plane wave with fixed acoustic impedance, intensity is proportional to squared pressure amplitude; this produces a 20-log formula for pressure ratios. The current illustration predicts ideal geometric spreading only. It does not measure exposure or determine hearing safety. ## Derivation -1. A source's power spreads over an expanding sphere, so intensity falls off as $I = P/(4\pi r^2)$. -2. Sound level compares that intensity against the faintest audible intensity on a logarithmic scale, $\beta = 10\log_{10}(I/I_0)$. -3. Combining the two turns distance directly into a change in level from a known reference, $\beta(r) = \beta_0 - 20\log_{10}(r/r_0)$. +1. Divide constant acoustic power by the area of a sphere centred on the source. +2. Express intensity relative to the fixed reference using a base-ten logarithm. +3. Take the level difference between two distances; the inverse-square intensity ratio becomes a minus-20-log distance term. ## Real world -### Hearing protection standards -Workplace safety rules limit how long workers may be exposed to sound above about 85 dB without ear protection, roughly halving the allowed time for every extra 3 dB. +### Comparing measurements -### Noise-cancelling headphones -Headphones measure incoming sound and generate an opposite wave to cancel it, most effective against the low, steady hum where decibel levels are easiest to predict and match. +A decibel value needs a stated reference and measurement type. A difference of 10 dB in intensity level corresponds to a factor of ten in intensity. -### City noise ordinances -Many cities set decibel limits on construction and traffic noise at certain hours, measured with the same logarithmic scale used here. +### Sound in rooms -### Concert and venue sound limits -Live music venues often cap sound levels near the stage to protect both audiences and performers from levels that, sustained for hours, risk lasting hearing damage. +Walls, absorption and source directionality alter the simple distance rule. The open-space point-source calculation is a starting model, not a complete room prediction. diff --git a/content/ui/ar/decibel.yaml b/content/ui/ar/decibel.yaml index 76ca5d34..e4a329e4 100644 --- a/content/ui/ar/decibel.yaml +++ b/content/ui/ar/decibel.yaml @@ -1,12 +1,6 @@ -decibel.hint: اسحب على طول المنحنى لتقريب المستمع أو إبعاده -decibel.r: البُعد r -decibel.level: مستوى الصوت -decibel.status: الحالة -decibel.safe: آمن -decibel.caution: تعرض طويل خطر -decibel.danger: خطر فوري -decibel.whisper: همسة -decibel.damage: حد الضرر بعد 8 ساعات -decibel.jet: محرك طائرة -decibel.xlabel: البُعد عن المصدر (مقياس لوغاريتمي، 1–100 m) -decibel.ylabel: المستوى (dB) +decibel.hint: 'اسحب على المنحنى لتغيير البُعد عن المصدر المثالي' +decibel.r: 'البُعد r' +decibel.level: 'مستوى الشدة' +decibel.drop: 'الانخفاض عن المستوى عند 1 m' +decibel.xlabel: 'المسافة (مقياس لوغاريتمي، m)' +decibel.ylabel: 'مستوى الشدة (dB)' diff --git a/content/ui/en/decibel.yaml b/content/ui/en/decibel.yaml index d502fbbb..8839ec70 100644 --- a/content/ui/en/decibel.yaml +++ b/content/ui/en/decibel.yaml @@ -1,12 +1,6 @@ -decibel.hint: drag along the curve to move the listener nearer or farther -decibel.r: distance r -decibel.level: sound level -decibel.status: status -decibel.safe: safe -decibel.caution: long exposure risky -decibel.danger: immediate danger -decibel.whisper: whisper -decibel.damage: 8h damage limit -decibel.jet: jet engine -decibel.xlabel: distance from source (log scale, 1–100 m) -decibel.ylabel: level (dB) +decibel.hint: 'drag along the curve to change distance from the ideal source' +decibel.r: 'distance r' +decibel.level: 'intensity level' +decibel.drop: 'drop from the level at 1 m' +decibel.xlabel: 'distance (log scale, m)' +decibel.ylabel: 'intensity level (dB)' diff --git a/src/viz/waves/SoundIntensityAndDecibels.vue b/src/viz/waves/SoundIntensityAndDecibels.vue index 20639c7b..0fdab2b2 100644 --- a/src/viz/waves/SoundIntensityAndDecibels.vue +++ b/src/viz/waves/SoundIntensityAndDecibels.vue @@ -19,7 +19,6 @@ const DB_BOT = -10 const dB0 = computed(() => props.params.dB0 ?? 100) const r = computed(() => props.params.r ?? 5) const level = computed(() => dB0.value - 20 * Math.log10(r.value)) -const danger = computed(() => (level.value >= 120 ? 'var(--neg)' : level.value >= 85 ? 'var(--accent-2)' : 'var(--pos)')) const pxX = (rr: number) => PX0 + (Math.log10(Math.max(1, rr)) / 2) * (PX1 - PX0) const pxY = (db: number) => PY1 - ((db - DB_BOT) / (DB_TOP - DB_BOT)) * (PY1 - PY0) @@ -48,8 +47,8 @@ function pick(e: PointerEvent) { const readouts = computed(() => [ { label: t('decibel.r'), value: fmt(r.value, 1) + ' m', color: 'var(--accent)' }, - { label: t('decibel.level'), value: fmt(level.value, 1) + ' dB', color: danger.value }, - { label: t('decibel.status'), value: level.value >= 120 ? t('decibel.danger') : level.value >= 85 ? t('decibel.caution') : t('decibel.safe'), color: danger.value }, + { label: t('decibel.level'), value: fmt(level.value, 1) + ' dB', color: 'var(--accent-2)' }, + { label: t('decibel.drop'), value: fmt(dB0.value - level.value, 1) + ' dB' }, ]) @@ -63,12 +62,10 @@ const readouts = computed(() => [ {{ mark }} - {{ t('decibel.whisper') }} - {{ t('decibel.damage') }} - {{ t('decibel.jet') }} + {{ mark }} - + {{ t('decibel.xlabel') }} {{ t('decibel.ylabel') }} From 49f6aeb53d548e78633c49e54481ee841745a541 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 23:35:53 +0300 Subject: [PATCH 123/124] content: rewrite polarisation for first-time learners in both languages --- content/lessons/waves/polarisation/ar.md | 59 +++++++++++------------ content/lessons/waves/polarisation/en.md | 61 +++++++++++------------- content/ui/ar/polar.yaml | 6 +-- content/ui/en/polar.yaml | 6 +-- 4 files changed, 60 insertions(+), 72 deletions(-) diff --git a/content/lessons/waves/polarisation/ar.md b/content/lessons/waves/polarisation/ar.md index 1eab11bc..ac443abf 100644 --- a/content/lessons/waves/polarisation/ar.md +++ b/content/lessons/waves/polarisation/ar.md @@ -1,66 +1,61 @@ --- title: الاستقطاب -summary: >- - مرشح الاستقطاب لا يمرر إلا اهتزاز الضوء الموافق لاتجاهه. مرشحان متعامدان يحجبان الضوء. +summary: 'تتبّع كيف يختار مرشّحا استقطاب مثاليان اتجاه المجال الكهربائي، وانتبه إلى الشدة التي تُنسب إليها كل نسبة مئوية.' parameters: - theta: الزاوية بين المرشّحين θ + theta: 'θ — الزاوية بين محورَي النفاذ' variables: - - شدة الضوء غير المستقطب قبل أي مرشّح - - الشدة بعد المرشّح الأول - - الشدة بعد المرشّح الثاني - - الزاوية بين محوري المرشّحين + - 'شدة الضوء غير المستقطب قبل المرشّحين' + - 'الشدة بعد المرشّح المثالي الأول' + - 'الشدة بعد المرشّح المثالي الثاني' + - 'الزاوية بين محورَي نفاذ المرشّحين' --- ## Try it -1. راقب أسهم المجال تهتز في كل اتجاه قبل المرشّح الأول، ثم تستقر على اهتزاز باتجاه واحد بعده. -2. حرّك منزلق الزاوية θ نحو 90°. تخفت جهارة الخرج نحو الصفر مع حجب المرشّح الثاني مزيدًا من الضوء. -3. أعد θ نحو 0°. يتوافق المرشّحان تقريبًا، ويمرّ عبر الثاني تقريبًا كل ما مرّ عبر الأول. +1. اجعل θ = 0°. يمرر المرشّح المثالي الأول 50% من شدة الضوء الأصلي غير المستقطب. يمرر الثاني الموازي له كل ما بقي، فتظل القراءة النهائية 50% من الأصل. +2. اجعل θ = 45°. يمرر المرشّح الثاني نصف ما يصله؛ لذلك تصبح القراءة النهائية 25% من الأصل، لا 50%. +3. اجعل θ = 90° ثم 180°. يعطي تعامد المحورين نفاذًا صفريًا في النموذج المثالي، بينما يعيد نصف دورة توافقهما ويعيد النفاذ إلى 50% من الشدة الأصلية. ## Real-life examples -1. **مرشّحان متوافقان.** مع توافق المرشّحين (θ = 0°)، يمرّ عبر الثاني تقريبًا كل ما مرّ عبر الأول. -2. **مرشّحان متعامدان.** عند زاوية قائمة (θ = 90°)، تحجب حيلة «المرشّحات المتعامدة» الكلاسيكية تقريبًا كل الضوء بينهما. -3. **نظارة شمسية مستقطبة أمام شاشة LCD.** بميل جزئي (θ = 45°)، تعتم شاشة هاتف أو حاسوب محمول بوضوح عند النظر إليها عبر نظارة شمسية مستقطبة بزاوية، لأن ضوءها أصلاً مستقطب. +1. **مرشّحان متوافقان.** عند 0°، يكون I₁/I₀ = 1/2 وI₂/I₀ = 1/2. لا يسبب المرشّح المثالي الثاني فقدًا إضافيًا. +2. **مرشّحان متعامدان.** عند 90°، تكون I₂ = 0. قد تمرر المرشّحات الحقيقية مقدارًا صغيرًا متبقيًا، لا يشمله هذا الحساب المثالي. +3. **زاوية 45°.** عند 45°، تكون I₂/I₁ = 1/2، لكن I₂/I₀ = 1/4. حدّد دائمًا الشدة التي تقارن بها. ## Test yourself -1. اجعل المرشّحين متعامدين تمامًا. -2. اضبط الزاوية بحيث يمرّ نصف الضوء الواصل إلى المرشّح الثاني بالضبط. -3. قرّب المرشّحين من التوافق التام، ضمن 20° من التطابق. +1. اجعل محورَي المرشّحين متعامدين بزاوية 90°. +2. مرّر نصف الشدة التي تصل إلى المرشّح الثاني. +3. اجعل المحورين على بُعد أقل من 20° من التوافق، قرب 0° أو 180°. ## Intuition -يهتز المجال الكهربائي للضوء جانبيًا وهو ينتقل للأمام، تمامًا كحركة موجة على حبل صعودًا وهبوطًا. لكن الضوء العادي يهتز في كل اتجاه جانبي معًا، ممتزجًا. المرشّح المستقطِب أشبه بسياج خشبي لذلك الاهتزاز. لا يسمح إلا بمرور جزء الاهتزاز الموافق لفتحاته، ويحجب الباقي. لذلك يهتز الضوء الخارج من الجهة الأخرى باتجاه واحد فقط. +للموجة الضوئية المنتقلة إلى الأمام، يقع المجال الكهربائي في المستوى العمودي على اتجاه الانتقال. يعني الاستقطاب الخطي أن المجال يهتز على محور ثابت في ذلك المستوى. أما الضوء غير المستقطب فلا يفضّل اتجاهًا مستعرضًا عند أخذ المتوسط الزمني. توضح الاتجاهات المرسومة قبل المرشّح هذا المزيج؛ وليست مجموعة حرفية من المجالات المتزامنة. -أضف مرشّحًا ثانيًا خلف الأول. لا يمرّ عبره إلا جزء ذلك الاهتزاز المُضيَّق أصلاً الذي لا يزال موافقًا لفتحات المرشّح الثاني. أدر المرشّح الثاني بحيث تسير فتحاته في الاتجاه نفسه لفتحات الأول، ويمرّ تقريبًا كل ما مرّ عبر الأول عبره أيضًا. أدره الآن بزاوية قائمة على الأول، فلا يتوافق شيء تقريبًا، ويُحجب الضوء. +يمرر المستقطِب المثالي مركبة المجال الواقعة على محور نفاذه. يختار المرشّح الثاني المركبة الواقعة على محور آخر. عند تعامد المحورين تساوي تلك المركبة صفرًا، وعند توافقهما يمر الضوء المستقطب كله عبر المرشّح المثالي الثاني. تشير الخطوط المرسومة إلى محاور النفاذ؛ ولا تصف آلية عمل مادة الاستقطاب الحقيقية ميكانيكيًا. ## Formal -حين يعبر ضوء غير مستقطب مرشّحًا أول، تُنصَّف شدته، $I_1 = \tfrac{1}{2}I_0$، ويخرج مستقطبًا على محور ذلك المرشّح. مرشّح ثانٍ بزاوية $\theta$ عن الأول يُمرّر بعدها جزءًا $\cos^2\theta$ من تلك الشدة، وهذا هو قانون مالوس، $I_2 = I_1\cos^2\theta$. +لشدة ضوء وارد غير مستقطب $I_0$، يعطي المستقطِب المثالي الأول $I_1=I_0/2$. يصل الضوء إلى المرشّح الثاني مستقطبًا خطيًا. إذا صنع محور نفاذه زاوية θ مع ذلك الاستقطاب، أعطى قانون مالوس $I_2=I_1\cos^2\theta$. -الجمع بين الخطوتين يعطي الجهارة الكاملة بعد المرشّحين، وهي دالة في الزاوية بينهما وحدها، $I_2 = \tfrac{1}{2}I_0\cos^2\theta$. تهبط هذه الجهارة بسلاسة من نفاذ كامل عند $\theta = 0°$ إلى صفر عند $\theta = 90°$. +إذن $I_2/I_0=\tfrac12\cos^2\theta$، بينما $I_2/I_1=\cos^2\theta$. تستخدم قراءات الشاشة الضوء الأصلي مرجعًا. عند $\theta=45^\circ$، تكون النسبتان $1/4$ و$1/2$ على الترتيب. ويعيد دوران 180° محور النفاذ إلى اتجاه مكافئ لاتجاهه الأول. ## Advanced -السماء نفسها مستقطبة جزئيًا بفعل تشتّت ضوء الشمس عن جزيئات الهواء، وأقوى ما يكون هذا الاستقطاب عند 90° من الشمس. بعض الحيوانات، ومنها النحل، تستطيع إدراك نمط استقطاب السماء هذا مباشرة، وتستخدمه للملاحة حتى حين تحتجب الشمس نفسها خلف الغيوم. +يكون إسقاط سعة المجال $E_2=E_1\cos\theta$، وتتناسب الشدة مع مربع السعة في الوسط نفسه؛ وهذا يفسر التربيع في قانون مالوس. إذا كان الضوء الأول مستقطبًا أصلًا، فلا يخفض المرشّح الأول شدته إلى النصف بالضرورة. وللمرشّحات الحقيقية امتصاص ونفاذ متبقٍّ عند التعامد. أطوال المجالات وتظليل الشاشة توضيحية؛ استخدم نسب الشدة العددية للمقارنة. ## Derivation -1. تفقد حزمة غير مستقطبة نصف شدتها عبورًا للمرشّح الأول، وتخرج مستقطبة على محوره. -2. يعطي قانون مالوس الجزء الذي يُمرّره مرشّح ثانٍ بزاوية $\theta$ من تلك الشدة المستقطبة، $\cos^2\theta$. -3. ضرب الخطوتين معًا يعطي نفاذ المرشّحين الكامل، $I_2 = \tfrac12 I_0\cos^2\theta$. +1. نأخذ المتوسط على اتجاهات الضوء غير المستقطب، فيمرر المرشّح المثالي الأول نصف الشدة الواردة. +2. نسقط المجال المستقطب خطيًا على المحور الثاني، ثم نربّع نسبة السعتين لنحصل على نسبة الشدتين. +3. نضرب نسبتي النفاذ للتعبير عن الشدة النهائية نسبةً إلى الضوء الأصلي. ## Real world -### النظارات الشمسية المستقطبة -تستخدم النظارات الشمسية مرشّحًا مستقطبًا رأسيًا لحجب الوهج المنعكس بقوة عن الماء والطرق، وهو وهج مستقطب أفقيًا، وهذا ما لا يقدر عليه زجاج ملوّن عادي. +### الوهج المستقطب -### شاشات LCD -تولّد شاشات LCD ضوءًا مستقطبًا مباشرة، ولهذا قد يعتم النظر إليها عبر مرشّح مستقطِب ثانٍ (أو نظارة شمسية مائلة) أو حتى تختفي تمامًا بحسب الزاوية. +قد يكون الضوء المنعكس مستقطبًا جزئيًا. يستطيع مرشّح استقطاب موجّه بصورة مناسبة تقليل تلك المركبة انتقائيًا. -### نظارات السينما ثلاثية الأبعاد -تستقطب بعض أنظمة العرض ثلاثي الأبعاد صورتي العين اليسرى واليمنى باتجاهين مختلفين، وتستخدم عدسات مستقطبة موافقة في النظارة كي ترى كل عين صورتها وحدها. +### النظر إلى شاشة LCD عبر مرشّح -### مرشّحات التصوير الفوتوغرافي -يستخدم المصورون مرشّحات مستقطبة لتقليل وهج الانعكاس عن الماء والزجاج ولتعميق زرقة السماء، وكلاهما أثر لحجب ضوء مستقطب بقوة انتقائيًا. +تصدر شاشات LCD كثيرة ضوءًا مستقطبًا خطيًا. يغير تدوير مستقطِب آخر أمامها السطوع النافذ؛ ولا يلزم أن يحقق هذا الضوء افتراض عدم الاستقطاب المستخدم في الخطوة الأولى هنا. diff --git a/content/lessons/waves/polarisation/en.md b/content/lessons/waves/polarisation/en.md index abeec775..d82f41cd 100644 --- a/content/lessons/waves/polarisation/en.md +++ b/content/lessons/waves/polarisation/en.md @@ -1,68 +1,61 @@ --- title: Polarisation -summary: >- - Light's electric field wiggles sideways as it travels, and a polarising - filter only lets through the sideways wiggle lined up with it — which is - why two filters at right angles block almost all the light between them. +summary: 'Follow how two ideal polarising filters select electric-field directions, and keep track of which intensity each percentage refers to.' parameters: - theta: angle between filters θ + theta: 'θ — angle between transmission axes' variables: - - the unpolarised light's intensity before either filter - - the intensity after the first filter - - the intensity after the second filter - - the angle between the two filters' axes + - 'unpolarised input intensity before both filters' + - 'intensity after the first ideal filter' + - 'intensity after the second ideal filter' + - 'angle between the two transmission axes' --- ## Try it -1. Watch the field arrows wiggle in every direction before the first filter, then settle into wiggling one way only after it. -2. Drag the angle slider θ toward 90°. The output brightness fades toward zero as the second filter blocks more and more of the light. -3. Bring θ back toward 0°. The two filters line up and nearly all the light that made it through the first filter now makes it through the second too. +1. Set θ = 0°. The first ideal filter passes 50% of the original unpolarised intensity. The aligned second filter passes all of that remainder, so the final reading is still 50% of the original. +2. Set θ = 45°. The second filter passes half of what reaches it. The final reading is therefore 25% of the original, not 50%. +3. Set θ = 90°, then 180°. Crossed axes give zero transmission in the ideal model; a half-turn aligns the axes again and restores 50% of the original intensity. ## Real-life examples -1. **Two filters lined up.** With the filters aligned (θ = 0°), almost all the light that passed the first filter also passes the second. -2. **Two filters crossed.** At a right angle (θ = 90°), the classic "crossed polarisers" trick blocks almost all the light between them. -3. **Polarised sunglasses against an LCD screen.** Tilted partway (θ = 45°), a phone or laptop screen — whose light is itself already polarised — visibly dims when viewed through polarised sunglasses at an angle. +1. **Aligned filters.** At 0°, I₁/I₀ = 1/2 and I₂/I₀ = 1/2. The second ideal filter causes no further loss. +2. **Crossed filters.** At 90°, I₂ = 0. Real filters may transmit a small residual amount, which this ideal calculation omits. +3. **A 45° angle.** At 45°, I₂/I₁ = 1/2 but I₂/I₀ = 1/4. Always name the input you are comparing with. ## Test yourself -1. Cross the two filters completely. -2. Set the angle so exactly half the light reaching the second filter gets through. -3. Get the two filters nearly aligned, within 20° of matching. +1. Cross the filters by setting their axes 90° apart. +2. Transmit half of the intensity arriving at the second filter. +3. Bring the axes within less than 20° of alignment, near either 0° or 180°. ## Intuition -Light's electric field wiggles sideways as it travels forward, like the up-and-down motion of a wave on a rope — except ordinary light wiggles in every sideways direction at once, mixed together. A polarising filter is like a picket fence for that wiggle: it only lets through the part of the wiggle lined up with its own slots, and blocks the rest, so light coming out the other side wiggles in just one direction. +For a light wave travelling forward, the electric field lies in the plane perpendicular to travel. Linear polarisation means that the field oscillates along one fixed axis in that plane. Unpolarised light has no preferred transverse orientation when averaged over time. The many directions drawn before the filter illustrate this mixture, rather than a literal set of synchronized fields. -Add a second filter behind the first, and only the part of that already-narrowed wiggle that still lines up with the second filter's slots gets through. Turn the second filter so its slots run the same way as the first, and almost everything that got through the first filter gets through the second too. Turn it to run exactly across the first, at a right angle, and essentially nothing lines up — the light is blocked. +An ideal polariser transmits the field component along its transmission axis. A second filter selects the component along another axis. When the axes are perpendicular, that component is zero. When they agree, all the already-polarised light passes the second ideal filter. The drawn bars mark transmission axes; they are not a mechanical description of how a real polarising material works. ## Formal -After unpolarised light passes a first filter, its intensity is halved, $I_1 = \tfrac{1}{2}I_0$, and it emerges polarised along that filter's axis. A second filter at angle $\theta$ to the first then passes a fraction $\cos^2\theta$ of that intensity, Malus's law: $I_2 = I_1\cos^2\theta$. +For unpolarised input intensity $I_0$, an ideal first polariser gives $I_1=I_0/2$. The light reaching the second filter is linearly polarised. If its transmission axis is at angle θ to that polarisation, Malus's law gives $I_2=I_1\cos^2\theta$. -Combining the two steps gives the full brightness after both filters as a function of the angle between them alone, $I_2 = \tfrac{1}{2}I_0\cos^2\theta$, which falls smoothly from full transmission at $\theta = 0°$ to zero at $\theta = 90°$. +Therefore $I_2/I_0=\tfrac12\cos^2\theta$, while $I_2/I_1=\cos^2\theta$. The screen readouts use the original input as reference. At $\theta=45^\circ$, these ratios are $1/4$ and $1/2$, respectively. A 180° rotation leaves a transmission axis equivalent to its starting orientation. ## Advanced -The sky itself is partly polarised by sunlight scattering off air molecules, strongest at 90° from the Sun; some animals, including bees, can sense this polarisation pattern directly and use it to navigate even when the Sun itself is hidden behind clouds. +The field amplitude projects as $E_2=E_1\cos\theta$, and intensity is proportional to squared amplitude in the same medium; this explains the square in Malus's law. If the initial light is already polarised, the first filter does not generally halve its intensity. Real filters have absorption and imperfect extinction. Field lengths and screen shading in the illustration are schematic; use the numerical intensity ratios for comparisons. ## Derivation -1. An unpolarised beam loses half its intensity passing through the first filter, emerging polarised along its axis. -2. Malus's law gives the fraction of that polarised intensity a second filter at angle $\theta$ transmits, $\cos^2\theta$. -3. Multiplying the two steps together gives the full two-filter transmission, $I_2 = \tfrac12 I_0\cos^2\theta$. +1. Average over the orientations of unpolarised input: the ideal first filter transmits half the incident intensity. +2. Project the linearly polarised field onto the second axis and square the amplitude ratio to obtain the intensity ratio. +3. Multiply the two transmission fractions to express the final intensity relative to the original input. ## Real world -### Polarised sunglasses -Sunglasses use a vertical polarising filter to block strongly horizontally-polarised glare reflected off water and roads, which ordinary tinted glass cannot do. +### Polarised glare -### LCD screens -LCD screens generate polarised light directly, which is why viewing one through a second polarising filter (or tilted sunglasses) can dim or blank it out depending on the angle. +Reflected light can be partly polarised. A suitably oriented polarising filter can reduce that component selectively. -### 3D cinema glasses -Some 3D projection systems polarise the left-eye and right-eye images differently and use matching polarised lenses in the glasses so each eye sees only its own image. +### Viewing an LCD through a filter -### Photography filters -Photographers use polarising filters to cut reflected glare off water and glass and to deepen a blue sky, both effects of blocking strongly polarised light selectively. +Many LCD displays emit linearly polarised light. Rotating another polariser in front of them changes the transmitted brightness; that input need not obey the unpolarised first-step assumption used here. diff --git a/content/ui/ar/polar.yaml b/content/ui/ar/polar.yaml index 99df82dd..4817b697 100644 --- a/content/ui/ar/polar.yaml +++ b/content/ui/ar/polar.yaml @@ -1,7 +1,7 @@ -polar.hint: يستقر الضوء غير المستقطب على اتجاه واحد بعد المرشّح 1، ثم يقصّه المرشّح 2 أكثر +polar.hint: 'يختار المرشّح المثالي الأول اتجاه الاستقطاب، ويمرر الثاني مركبته على محور آخر' polar.theta: الزاوية بين المرشّحين θ -polar.i1: بعد المرشّح 1 -polar.i2: بعد المرشّح 2 +polar.i1: 'بعد الأول (% من الأصل)' +polar.i2: 'بعد الثاني (% من الأصل)' polar.unpolarised: ضوء غير مستقطب polar.filter1: المرشّح 1 polar.filter2: المرشّح 2 diff --git a/content/ui/en/polar.yaml b/content/ui/en/polar.yaml index b93b30e2..d11a6c3d 100644 --- a/content/ui/en/polar.yaml +++ b/content/ui/en/polar.yaml @@ -1,7 +1,7 @@ -polar.hint: unpolarised light settles into one direction after filter 1, then filter 2 cuts it further +polar.hint: 'the first ideal filter selects a polarisation; the second projects it onto another axis' polar.theta: angle between filters θ -polar.i1: after filter 1 -polar.i2: after filter 2 +polar.i1: 'after filter 1 (% of input)' +polar.i2: 'after filter 2 (% of input)' polar.unpolarised: unpolarised light polar.filter1: filter 1 polar.filter2: filter 2 From 84691ed9ae018598d68f713901b3020f194585c1 Mon Sep 17 00:00:00 2001 From: ru44 <18311071+ru44@users.noreply.github.com> Date: Mon, 16 Nov 2026 23:35:53 +0300 Subject: [PATCH 124/124] docs: record completed bilingual Waves review --- content/lessons/EDITORIAL_REVIEW.md | 36 ++++++++++++++--------------- content/lessons/STYLE.en.md | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/content/lessons/EDITORIAL_REVIEW.md b/content/lessons/EDITORIAL_REVIEW.md index 115af55c..55f7bfde 100644 --- a/content/lessons/EDITORIAL_REVIEW.md +++ b/content/lessons/EDITORIAL_REVIEW.md @@ -1,6 +1,6 @@ # Bilingual editorial review -125 of 390 lessons reviewed. 265 remain. +140 of 390 lessons reviewed. 250 remain. A checked lesson has had both language files rewritten or reviewed against its configuration and visualization source. Automated validation alone does not mark a lesson reviewed. Browser interaction and independent learner review remain separate checks. @@ -462,20 +462,20 @@ Scope: every lesson, including summaries, parameter labels, examples, exercises, - [x] [unit-circle](trigonometry/unit-circle/en.md) · [Arabic](trigonometry/unit-circle/ar.md) - [x] [vector-components](trigonometry/vector-components/en.md) · [Arabic](trigonometry/vector-components/ar.md) -## waves (0/15) - -- [ ] [damped-oscillation-resonance](waves/damped-oscillation-resonance/en.md) · [Arabic](waves/damped-oscillation-resonance/ar.md) -- [ ] [diffraction](waves/diffraction/en.md) · [Arabic](waves/diffraction/ar.md) -- [ ] [doppler-effect](waves/doppler-effect/en.md) · [Arabic](waves/doppler-effect/ar.md) -- [ ] [interference-and-beats](waves/interference-and-beats/en.md) · [Arabic](waves/interference-and-beats/ar.md) -- [ ] [polarisation](waves/polarisation/en.md) · [Arabic](waves/polarisation/ar.md) -- [ ] [reflection-and-echoes](waves/reflection-and-echoes/en.md) · [Arabic](waves/reflection-and-echoes/ar.md) -- [ ] [refraction-snells-law](waves/refraction-snells-law/en.md) · [Arabic](waves/refraction-snells-law/ar.md) -- [ ] [sine-wave](waves/sine-wave/en.md) · [Arabic](waves/sine-wave/ar.md) -- [ ] [sound-intensity-and-decibels](waves/sound-intensity-and-decibels/en.md) · [Arabic](waves/sound-intensity-and-decibels/ar.md) -- [ ] [speed-of-sound](waves/speed-of-sound/en.md) · [Arabic](waves/speed-of-sound/ar.md) -- [ ] [standing-waves](waves/standing-waves/en.md) · [Arabic](waves/standing-waves/ar.md) -- [ ] [thin-lenses](waves/thin-lenses/en.md) · [Arabic](waves/thin-lenses/ar.md) -- [ ] [total-internal-reflection](waves/total-internal-reflection/en.md) · [Arabic](waves/total-internal-reflection/ar.md) -- [ ] [transverse-and-longitudinal](waves/transverse-and-longitudinal/en.md) · [Arabic](waves/transverse-and-longitudinal/ar.md) -- [ ] [wave-basics](waves/wave-basics/en.md) · [Arabic](waves/wave-basics/ar.md) +## waves (15/15) + +- [x] [damped-oscillation-resonance](waves/damped-oscillation-resonance/en.md) · [Arabic](waves/damped-oscillation-resonance/ar.md) +- [x] [diffraction](waves/diffraction/en.md) · [Arabic](waves/diffraction/ar.md) +- [x] [doppler-effect](waves/doppler-effect/en.md) · [Arabic](waves/doppler-effect/ar.md) +- [x] [interference-and-beats](waves/interference-and-beats/en.md) · [Arabic](waves/interference-and-beats/ar.md) +- [x] [polarisation](waves/polarisation/en.md) · [Arabic](waves/polarisation/ar.md) +- [x] [reflection-and-echoes](waves/reflection-and-echoes/en.md) · [Arabic](waves/reflection-and-echoes/ar.md) +- [x] [refraction-snells-law](waves/refraction-snells-law/en.md) · [Arabic](waves/refraction-snells-law/ar.md) +- [x] [sine-wave](waves/sine-wave/en.md) · [Arabic](waves/sine-wave/ar.md) +- [x] [sound-intensity-and-decibels](waves/sound-intensity-and-decibels/en.md) · [Arabic](waves/sound-intensity-and-decibels/ar.md) +- [x] [speed-of-sound](waves/speed-of-sound/en.md) · [Arabic](waves/speed-of-sound/ar.md) +- [x] [standing-waves](waves/standing-waves/en.md) · [Arabic](waves/standing-waves/ar.md) +- [x] [thin-lenses](waves/thin-lenses/en.md) · [Arabic](waves/thin-lenses/ar.md) +- [x] [total-internal-reflection](waves/total-internal-reflection/en.md) · [Arabic](waves/total-internal-reflection/ar.md) +- [x] [transverse-and-longitudinal](waves/transverse-and-longitudinal/en.md) · [Arabic](waves/transverse-and-longitudinal/ar.md) +- [x] [wave-basics](waves/wave-basics/en.md) · [Arabic](waves/wave-basics/ar.md) diff --git a/content/lessons/STYLE.en.md b/content/lessons/STYLE.en.md index a07b8ac6..61363923 100644 --- a/content/lessons/STYLE.en.md +++ b/content/lessons/STYLE.en.md @@ -37,6 +37,6 @@ Run `pnpm check` after editing. It validates structure, formulas and challenge s ## Reviewed examples and remaining work -See [the lesson-by-lesson review checklist](EDITORIAL_REVIEW.md) for coverage. The Numbers, Functions, Algebra, Discrete, Geometry, Trigonometry, Calculus, Statistics and Physics sections have received a complete bilingual editorial pass under this guide. +See [the lesson-by-lesson review checklist](EDITORIAL_REVIEW.md) for coverage. The Numbers, Functions, Algebra, Discrete, Geometry, Trigonometry, Calculus, Statistics, Physics and Waves sections have received a complete bilingual editorial pass under this guide. The remaining lessons still need individual review of their summaries, controls, explanations, examples and challenges. Do not treat a global phrase replacement or a successful build as an editorial review.